tinycm diff index.cgi @ rev 37
Few small change
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Jan 07 23:50:04 2014 +0100 (2014-01-07) |
parents | 41bca604bd31 |
children | 30e39dd19525 |
line diff
1.1 --- a/index.cgi Tue Jan 07 18:28:46 2014 +0100 1.2 +++ b/index.cgi Tue Jan 07 23:50:04 2014 +0100 1.3 @@ -11,7 +11,6 @@ 1.4 . config.cgi 1.5 1.6 tiny="$PWD" 1.7 -po="en fr" 1.8 content="content" 1.9 wiki="$content/wiki" 1.10 index="index" 1.11 @@ -658,12 +657,24 @@ 1.12 cachesize="$(du -sh $cache | awk '{print $1}')" 1.13 [ "$HG" != "yes" ] && hg=$(gettext "disabled") 1.14 [ "$HG" == "yes" ] && hg=$(gettext "enabled") 1.15 + # Source all plugins.conf to get DASHBOARD_TOOLS and ADMIN_TOOLS 1.16 + ADMIN_TOOLS="" 1.17 + DASHBOARD_TOOLS="" 1.18 + for p in $(ls $plugins) 1.19 + do 1.20 + . $plugins/$p/$p.conf 1.21 + done 1.22 + if check_auth && ! admin_user; then 1.23 + ADMIN_TOOLS="" 1.24 + fi 1.25 echo "<h2>$d</h2>" 1.26 if check_auth; then 1.27 cat << EOT 1.28 <div id="tools"> 1.29 <a href='$script?log'>Activity log</a> 1.30 <a href='$script?ls'>List files</a> 1.31 + $DASHBOARD_TOOLS 1.32 + $ADMIN_TOOLS 1.33 </div> 1.34 1.35 <pre> 1.36 @@ -735,7 +746,7 @@ 1.37 # Generate a default index on first run 1.38 if [ ! -f "$wiki/$index.txt" ]; then 1.39 if ! default_index; then 1.40 - echo "<pre class='error'>Directory : content/ is not writable" 1.41 + echo "<pre class='error'>Directory : content/ is not writable</pre>" 1.42 html_footer && exit 0 1.43 fi 1.44 fi