tinycm 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 | 5ddec5a1e5bc |
files | config.cgi index.cgi plugins/cloud/cloud.cgi |
line diff
1.1 --- a/config.cgi Tue Jan 07 18:28:46 2014 +0100 1.2 +++ b/config.cgi Tue Jan 07 23:50:04 2014 +0100 1.3 @@ -1,9 +1,6 @@ 1.4 # CM configuration 1.5 # 1.6 1.7 -# CM URL for redirection and RSS 1.8 -WEB_URL="http://localhost/cgi-bin/tinycm/" 1.9 - 1.10 # Administrator email. 1.11 ADMIN_MAIL="root@$SERVER_NAME" 1.12
2.1 --- a/index.cgi Tue Jan 07 18:28:46 2014 +0100 2.2 +++ b/index.cgi Tue Jan 07 23:50:04 2014 +0100 2.3 @@ -11,7 +11,6 @@ 2.4 . config.cgi 2.5 2.6 tiny="$PWD" 2.7 -po="en fr" 2.8 content="content" 2.9 wiki="$content/wiki" 2.10 index="index" 2.11 @@ -658,12 +657,24 @@ 2.12 cachesize="$(du -sh $cache | awk '{print $1}')" 2.13 [ "$HG" != "yes" ] && hg=$(gettext "disabled") 2.14 [ "$HG" == "yes" ] && hg=$(gettext "enabled") 2.15 + # Source all plugins.conf to get DASHBOARD_TOOLS and ADMIN_TOOLS 2.16 + ADMIN_TOOLS="" 2.17 + DASHBOARD_TOOLS="" 2.18 + for p in $(ls $plugins) 2.19 + do 2.20 + . $plugins/$p/$p.conf 2.21 + done 2.22 + if check_auth && ! admin_user; then 2.23 + ADMIN_TOOLS="" 2.24 + fi 2.25 echo "<h2>$d</h2>" 2.26 if check_auth; then 2.27 cat << EOT 2.28 <div id="tools"> 2.29 <a href='$script?log'>Activity log</a> 2.30 <a href='$script?ls'>List files</a> 2.31 + $DASHBOARD_TOOLS 2.32 + $ADMIN_TOOLS 2.33 </div> 2.34 2.35 <pre> 2.36 @@ -735,7 +746,7 @@ 2.37 # Generate a default index on first run 2.38 if [ ! -f "$wiki/$index.txt" ]; then 2.39 if ! default_index; then 2.40 - echo "<pre class='error'>Directory : content/ is not writable" 2.41 + echo "<pre class='error'>Directory : content/ is not writable</pre>" 2.42 html_footer && exit 0 2.43 fi 2.44 fi
3.1 --- a/plugins/cloud/cloud.cgi Tue Jan 07 18:28:46 2014 +0100 3.2 +++ b/plugins/cloud/cloud.cgi Tue Jan 07 23:50:04 2014 +0100 3.3 @@ -111,7 +111,7 @@ 3.4 for f in $(ls ${cloud}) 3.5 do 3.6 case $f in 3.7 - *.png|*.jpg) image="images/image.png" ;; 3.8 + *.png|*.jpg|*.gif) image="images/image.png" ;; 3.9 *) image="images/empty.png" ;; 3.10 esac 3.11 cat << EOT