r2426 Moved logging information to session from URL
authorDenis Yeldandi <dyeldandi@gmail.com>
Tue, 10 Feb 2009 10:59:04 +0000 (10:59 +0000)
committerDenis Yeldandi <dyeldandi@gmail.com>
Tue, 10 Feb 2009 10:59:04 +0000 (10:59 +0000)
inc/functions.php
inc/init.php
inc/interface.php

index ac80f25194038a1ab1ef36682e43d1f9c63315b8..a017158b2b48181c88898173b22d7136663e5583 100644 (file)
@@ -1248,7 +1248,7 @@ function buildWideRedirectURL ($log, $nextpage = NULL, $nexttab = NULL, $moreArg
        $url = "${root}?page=${nextpage}&tab=${nexttab}";
        if (isset ($page[$nextpage]['bypass']))
                $url .= '&' . $page[$nextpage]['bypass'] . '=' . $_REQUEST[$page[$nextpage]['bypass']];
-       $url .= "&log=" . urlencode (base64_encode (serialize ($log)));
+
        if (count($moreArgs)>0)
        {
                foreach($moreArgs as $arg=>$value)
@@ -1264,6 +1264,8 @@ function buildWideRedirectURL ($log, $nextpage = NULL, $nexttab = NULL, $moreArg
                                $url .= '&'.urlencode($arg).'='.urlencode($value);
                }
        }
+
+       $_SESSION['log'] = $log;
        return $url;
 }
 
index 413f7fa90f75edc57c98110d61ff41049dc9457a..a3ba26ca16c5227b43eee93cf2c221b2b9900db7 100644 (file)
@@ -129,6 +129,10 @@ authenticate(); // sometimes this generates autotags
 // Note that we don't perform autorization here, so each 1st level page
 // has to do it in its way, e.g. to call authorize().
 
+
+session_start();
+
+
 $pageno = (isset ($_REQUEST['page'])) ? $_REQUEST['page'] : 'index';
 // Special handling of tab number to substitute the "last" index where applicable.
 // Always show explicitly requested tab, substitute the last used name in case
index c6197b68f764c3bc49775a3c181e4dea4653cc7a..83e2671942f1cc203ed6b95cbec14718ac9c5b7d 100644 (file)
@@ -1076,8 +1076,12 @@ function showMessageOrError ()
                echo "<div class=msg_success>${_REQUEST['message']}</div>";
        elseif (isset ($_REQUEST['error']))
                echo "<div class=msg_error>${_REQUEST['error']}</div>";
-       elseif (isset ($_REQUEST['log']))
-               printLog (unserialize (base64_decode ($_REQUEST['log'])));
+       elseif (isset ($_SESSION['log']))
+       {
+               error_log(print_r($_SESSION['log'],1));
+               printLog ($_SESSION['log']);
+               unset($_SESSION['log']);
+       }
 }
 
 // This function renders a form for port edition.