# HG changeset patch # User Dan # Date 1199153787 18000 # Node ID 105457df35e52c27781c337d36d603fba2ac14d5 # Parent 5d62ef764b0dcbd2e1814e7eb6e6e60fba3270d0 Integrating patch for PHP 6.0-dev compatibility diff -r 5d62ef764b0d -r 105457df35e5 includes/clientside/static/misc.js --- a/includes/clientside/static/misc.js Thu Dec 27 11:35:00 2007 -0500 +++ b/includes/clientside/static/misc.js Mon Dec 31 21:16:27 2007 -0500 @@ -123,18 +123,19 @@ function disableUnload(message) { if(typeof message != 'string') message = 'You may want to save your changes first.'; - var body = document.getElementsByTagName('body'); - body = body[0]; - body._unloadmsg = message; - body.onbeforeunload = function() { return this._unloadmsg }; + window._unloadmsg = message; + window.onbeforeunload = function(e) + { + if ( !e ) + e = window.event; + e.returnValue = window._unloadmsg; + } } function enableUnload() { - var body = document.getElementsByTagName('body'); - body = body[0]; - body.onbeforeunload = null; - body._unloadmsg = null; + window._unloadmsg = null; + window.onbeforeunload = null; } /** diff -r 5d62ef764b0d -r 105457df35e5 includes/common.php --- a/includes/common.php Thu Dec 27 11:35:00 2007 -0500 +++ b/includes/common.php Mon Dec 31 21:16:27 2007 -0500 @@ -56,7 +56,7 @@ $_starttime = microtime_float(); // Verbose error reporting -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_STRICT); // // Determine the location of Enano as an absolute path. diff -r 5d62ef764b0d -r 105457df35e5 includes/rijndael.php --- a/includes/rijndael.php Thu Dec 27 11:35:00 2007 -0500 +++ b/includes/rijndael.php Mon Dec 31 21:16:27 2007 -0500 @@ -10,8 +10,6 @@ * @license BSD-style license */ -error_reporting(E_ALL); - define ('ENC_HEX', 201); define ('ENC_BASE64', 202); define ('ENC_BINARY', 203); @@ -1028,7 +1026,8 @@ return (int)$n; } - function encrypt($str, $key) { + // The third parameter is to ensure compatibility with php 6.0-dev + function encrypt($str, $key, $unused = ENC_HEX) { if ($str == "") { return ""; @@ -1062,7 +1061,8 @@ return $this->long2str($v, false); } - function decrypt($str, $key) { + // The third parameter is to ensure compatibility with php 6.0-dev + function decrypt($str, $key, $unused = ENC_HEX) { if ($str == "") { return ""; } diff -r 5d62ef764b0d -r 105457df35e5 includes/sessions.php --- a/includes/sessions.php Thu Dec 27 11:35:00 2007 -0500 +++ b/includes/sessions.php Mon Dec 31 21:16:27 2007 -0500 @@ -1663,7 +1663,6 @@ unset($sidbak); $message .= "$prot://".$_SERVER['HTTP_HOST'].$p.$aklink; $message .= "\n\nSincerely yours, \n$admin_user and the ".$_SERVER['HTTP_HOST']." administration team"; - error_reporting(E_ALL); if(getConfig('smtp_enabled') == '1') { $result = smtp_send_email($r['email'], getConfig('site_name').' website account activation', preg_replace("#(?extract_vars($filename); if($session->sid_super) $as = htmlspecialchars(urlSeparator).'auth='.$session->sid_super; else $as = ''; - error_reporting(E_ALL); $random_id = sha1(microtime().''); // A temp value /*