[geeklog-cvs] geeklog: Recycled some existing bits and pieces for a more promi...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Jun 17 06:22:49 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a10c297ec922
changeset: 7124:a10c297ec922
user:      Dirk Haun <dirk at haun-online.de>
date:      Wed Jun 17 12:19:56 2009 +0200
description:
Recycled some existing bits and pieces for a more prominent reminder to remove the install script

diffstat:

 public_html/index.php |  29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diffs (39 lines):

diff -r 2c5f2140eb1e -r a10c297ec922 public_html/index.php
--- a/public_html/index.php	Mon Jun 15 15:51:47 2009 -0400
+++ b/public_html/index.php	Wed Jun 17 12:19:56 2009 +0200
@@ -144,6 +144,35 @@
     $display .= COM_showMessage (COM_applyFilter ($_GET['msg'], true), $plugin);
 }
 
+if (SEC_inGroup('Root')) {
+    $done = DB_getItem($_TABLES['vars'], 'value', "name = 'security_check'");
+    if ($done != 1) {
+        /**
+         * we don't have the path to the admin directory, so try to figure it
+         * out from $_CONF['site_admin_url']
+         * @todo FIXME: this duplicates some code from admin/sectest.php
+         */
+        $adminurl = $_CONF['site_admin_url'];
+        if (strrpos($adminurl, '/') == strlen($adminurl)) {
+            $adminurl = substr($adminurl, 0, -1);
+        }
+        $pos = strrpos($adminurl, '/');
+        if ($pos === false) {
+            // only guessing ...
+            $installdir = $_CONF['path_html'] . 'admin/install';
+        } else {
+            $installdir = $_CONF['path_html'] . substr($adminurl, $pos + 1)
+                        . '/install';
+        }
+
+        if (is_dir($installdir)) {
+            // deliberatly NOT print the actual path to the install dir
+            $secmsg = sprintf($LANG_SECTEST['remove_inst'], '')
+                    . ' ' . $MESSAGE[92];
+            $display .= COM_showMessageText($secmsg);
+        }
+    }
+}
 
 // Show any Plugin formatted blocks
 // Requires a plugin to have a function called plugin_centerblock_<plugin_name>



More information about the geeklog-cvs mailing list