Changeset 5675


Ignorieren:
Zeitstempel:
31.08.2010 17:46:50 (vor 8 Jahren)
Autor:
cuma
Nachricht:

rrdstats & vnstat: enable back-buttons even if the browser-history is empty

Ort:
trunk/make
Dateien:
2 bearbeitet

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/make/rrdstats/files/root/usr/lib/cgi-bin/rrdstats/main.cgi

    r5671 r5675  
    512512            sec_end 
    513513        done 
    514         echo "<br><center><input type=\"button\" value=\"Back\" onclick=\"javascript:history.go(-1)\" /></center>" 
     514        [ -n "$HTTP_REFERER" ] && backdest="history.go(-1)" || backdest="window.location.href='$SCRIPT_NAME'" 
     515        echo "<br><center><input type=\"button\" value=\"Back\" onclick=\"javascript:$backdest\" /></center>" 
    515516        ;; 
    516517    *) 
  • trunk/make/vnstat-cgi/files/root/usr/lib/cgi-bin/vnstat/stats.cgi

    r5630 r5675  
    3535        [ $ifcnt -ne 1 ] && echo "</a>" 
    3636    done 
    37     [ $ifcnt -ne 1 ] && echo "<br><input type=\"button\" value=\"Back\" onclick=\"javascript:history.go(-1)\" />" 
     37    if [ $ifcnt -ne 1 ]; then 
     38        [ -n "$HTTP_REFERER" ] && backdest="history.go(-1)" || backdest="window.location.href='$SCRIPT_NAME'" 
     39        echo "<br><input type=\"button\" value=\"Back\" onclick=\"javascript:$backdest\" />" 
     40    fi 
    3841else 
    3942    #mainpage 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.