[geeklog-hg] geeklog: Merged with upstream

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Fri Oct 2 13:51:49 EDT 2015


changeset 9628:ba179174077a
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/ba179174077a
user: Tom
date: Fri Oct 02 13:47:10 2015 -0400
description:
Merged with upstream

diffstat:

 plugins/spamx/SLVbase.class.php |   2 +-
 public_html/lib-common.php      |  34 +++++++++++++++-------------------
 system/lib-topic.php            |   4 ++--
 3 files changed, 18 insertions(+), 22 deletions(-)

diffs (93 lines):

diff -r 44821e0c4479 -r ba179174077a plugins/spamx/SLVbase.class.php
--- a/plugins/spamx/SLVbase.class.php	Fri Oct 02 13:45:46 2015 -0400
+++ b/plugins/spamx/SLVbase.class.php	Fri Oct 02 13:47:10 2015 -0400
@@ -79,7 +79,7 @@
         $cli = new XML_RPC_Client('/slv.php', 'http://www.linksleeve.org');
 
         if ($this->_debug) {
-            $client->setDebug(1);
+            $cli->setDebug(1);
         }
 
         $resp = $cli->send($msg, $_SPX_CONF['timeout']);
diff -r 44821e0c4479 -r ba179174077a public_html/lib-common.php
--- a/public_html/lib-common.php	Fri Oct 02 13:45:46 2015 -0400
+++ b/public_html/lib-common.php	Fri Oct 02 13:47:10 2015 -0400
@@ -8158,7 +8158,6 @@
 {
     global $_CONF, $_USER, $LANG_404;
 
-
     if (function_exists('CUSTOM_handle404')) {
         CUSTOM_handle404($alternate_url);
         exit;
@@ -8168,31 +8167,27 @@
     header('HTTP/1.1 404 Not Found');
     header('Status: 404 Not Found');
 
-    $display .= COM_startBlock($LANG_404[1]);
-    if (isset($_SERVER['SCRIPT_URI'])) {
-        $url = strip_tags($_SERVER['SCRIPT_URI']);
-    } else {
-        $request = $_SERVER['REQUEST_URI'];
-        $url = 'http://' . $_SERVER['HTTP_HOST'] . strip_tags($request);
-    }
-
     // Add log stuff
+    $url = COM_getCurrentURL();
     if (isset($_USER['uid'])) {
         $byuser = $_USER['uid'] . '@' . $_SERVER['REMOTE_ADDR'];
     } else {
         $byuser = 'anon@' . $_SERVER['REMOTE_ADDR'];
     }
     $refurl = $_SERVER['HTTP_REFERER'];
-    $remoteaddress = $_SERVER['REMOTE_ADDR'];
-    $timestamp = @strftime( '%c' );
-    $logentry = "404 Error generated by $byuser for url: $url - Referring url: $refurl";
+    $timestamp = @strftime('%c');
+    $logentry = "404 Error generated by $byuser for url: $url";
+    if (! empty($refurl)) {
+        $logentry .= " - Referring url: $refurl";
+    }
+    $logentry = str_replace(array('<?', '?>'), array('(@', '@)'), $logentry);
+
     $logfile = $_CONF['path_log'] . '404.log';
-    if (!$file = fopen($logfile, 'a')) {
-
-    } else {
-        fputs( $file, "$timestamp - $logentry \n" );
-    }
-
+    if ($file = fopen($logfile, 'a')) {
+        fputs($file, "$timestamp - $logentry \n");
+    }
+
+    $display = COM_startBlock($LANG_404[1]);
     $display .= sprintf($LANG_404[2], $url);
     if ($alternate_url != '') {
         $display .= sprintf($LANG_404[4], $alternate_url);
@@ -8200,7 +8195,8 @@
         $display .= $LANG_404[3];
     }
     $display .= COM_endBlock();
-    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG_404[1]));
+    $display = COM_createHTMLDocument($display,
+                                      array('pagetitle' => $LANG_404[1]));
 
     COM_output($display);
     exit; // Do not want to go any further
diff -r 44821e0c4479 -r ba179174077a system/lib-topic.php
--- a/system/lib-topic.php	Fri Oct 02 13:45:46 2015 -0400
+++ b/system/lib-topic.php	Fri Oct 02 13:47:10 2015 -0400
@@ -1393,9 +1393,9 @@
                     $url = '';
                     $use_block = 'breadcrumb_item_nolink';
                 } else {
-                    $url = $_CONF['site_url'] . '/index.php';
+                    $url = $_CONF['site_url'] . '/';
                     if ($value['tid'] != TOPIC_ROOT) {
-                        $url .= '?topic=' . $value['tid'];
+                        $url .= 'index.php?topic=' . $value['tid'];
                     }
                     $use_block = 'breadcrumb_item';
                 }



More information about the geeklog-cvs mailing list