compat patches for php7

This commit is contained in:
Andrew Dolgov 2015-12-04 09:29:58 +03:00
parent 9bd422c2e7
commit 1bd552ee31
3 changed files with 7 additions and 7 deletions

View File

@ -935,7 +935,7 @@ class Feeds extends Handler_Protected {
//$reply['headlines']['content'] =& $ret[5]['content']; //$reply['headlines']['content'] =& $ret[5]['content'];
//$reply['headlines']['toolbar'] =& $ret[5]['toolbar']; //$reply['headlines']['toolbar'] =& $ret[5]['toolbar'];
$reply['headlines'] =& $ret[5]; $reply['headlines'] = $ret[5];
if (!$next_unread_feed) if (!$next_unread_feed)
$reply['headlines']['id'] = $feed; $reply['headlines']['id'] = $feed;

4
classes/pref/feeds.php Normal file → Executable file
View File

@ -297,7 +297,7 @@ class Pref_Feeds extends Handler_Protected {
if ($_REQUEST['mode'] != 2) { if ($_REQUEST['mode'] != 2) {
$fl['items'] = array($root); $fl['items'] = array($root);
} else { } else {
$fl['items'] =& $root['items']; $fl['items'] = $root['items'];
} }
return $fl; return $fl;
@ -410,7 +410,7 @@ class Pref_Feeds extends Handler_Protected {
if (isset($item['items']['_reference'])) { if (isset($item['items']['_reference'])) {
$data_map[$item['id']] = array($item['items']); $data_map[$item['id']] = array($item['items']);
} else { } else {
$data_map[$item['id']] =& $item['items']; $data_map[$item['id']] = $item['items'];
} }
} }
if ($item['id'] == 'root') { if ($item['id'] == 'root') {

8
lib/phpmailer/class.phpmailer.php Normal file → Executable file
View File

@ -1853,23 +1853,23 @@ class PHPMailer {
// return false; // return false;
// } // }
// } // }
$magic_quotes = get_magic_quotes_runtime(); /*$magic_quotes = get_magic_quotes_runtime();
if ($magic_quotes) { if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) { if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime(0); set_magic_quotes_runtime(0);
} else { } else {
ini_set('magic_quotes_runtime', 0); ini_set('magic_quotes_runtime', 0);
} }
} }*/
$file_buffer = file_get_contents($path); $file_buffer = file_get_contents($path);
$file_buffer = $this->EncodeString($file_buffer, $encoding); $file_buffer = $this->EncodeString($file_buffer, $encoding);
if ($magic_quotes) { /*if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) { if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime($magic_quotes); set_magic_quotes_runtime($magic_quotes);
} else { } else {
ini_set('magic_quotes_runtime', $magic_quotes); ini_set('magic_quotes_runtime', $magic_quotes);
} }
} }*/
return $file_buffer; return $file_buffer;
} catch (Exception $e) { } catch (Exception $e) {
$this->SetError($e->getMessage()); $this->SetError($e->getMessage());