[geeklog-cvs] geeklog: Fixed formatting and ensure that URLs don't end in a sl...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Aug 9 07:03:23 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d5af47ccf048
changeset: 7244:d5af47ccf048
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Aug 09 11:05:38 2009 +0200
description:
Fixed formatting and ensure that URLs don't end in a slash (as per Geeklog's conventions)

diffstat:

 public_html/admin/sectest.php |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r c0541179fa32 -r d5af47ccf048 public_html/admin/sectest.php
--- a/public_html/admin/sectest.php	Sun Aug 09 10:33:39 2009 +0200
+++ b/public_html/admin/sectest.php	Sun Aug 09 11:05:38 2009 +0200
@@ -118,10 +118,14 @@
         $p = explode('/', $u2);
         if (count($p) > 1) {
             $cut = strlen($p[count($p) - 1]) + 1;
-            $url = substr($u, 0, -$cut) . '/';
+            $url = substr($u, 0, -$cut);
         }
     }
 
+    if (!empty($url) && (substr($url, -1) == '/')) {
+        $url = substr($url, 0, -1);
+    }
+
     return $url;
 }
 
@@ -192,7 +196,7 @@
     $retval = '';
 
     $retval .= '<li>';
-    $retcode = doHeadRequest($baseurl . $urltocheck, $errmsg);
+    $retcode = doHeadRequest($baseurl  . '/' . $urltocheck, $errmsg);
     if ($retcode == 777) {
         $retval .= $errmsg;
         $failed_tests++;
@@ -304,8 +308,9 @@
             $instUrl = $_CONF['site_url'] . '/docs/english/install.html';
         }
         $instUrl .= '#public_html';
-        $display .= sprintf($LANG_SECTEST['public_html'],
-                      COM_createLink($LANG_SECTEST['installation'], $instUrl));
+        $display .= '<li>' . sprintf($LANG_SECTEST['public_html'],
+                      COM_createLink($LANG_SECTEST['installation'], $instUrl))
+                 . '</li>' . LB;
         $failed_tests++;
     }
 



More information about the geeklog-cvs mailing list