Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility Updates #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function edit(&$uid, $menutype, $option)
$lists['link'] = mosAdminMenus::Link($menu, $uid);

// get params definitions
$params =& new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
$params =new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');

submit_content_menu_html::edit($menu, $lists, $params, $option);
}
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_users/admin.users.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function editUser($uid = '0', $option = 'users')
$lists['sendEmail'] = mosHTML::yesnoRadioList('sendEmail', 'class="inputbox" size="1"', $row->sendEmail);

$file = $mainframe->getPath('com_xml', 'com_users');
$params =& new mosUserParameters($row->params, $file, 'component');
$params =new mosUserParameters($row->params, $file, 'component');

HTML_users::edituser($row, $contact, $lists, $option, $uid, $params);
}
Expand Down
2 changes: 1 addition & 1 deletion administrator/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
if ($_VERSION->SITE == 1 && @$mosConfig_admin_expired === '1')
{
$file = $mainframe->getPath('com_xml', 'com_users');
$params =& new mosParameters($my->params, $file, 'component');
$params =new mosParameters($my->params, $file, 'component');

$now = time();

Expand Down
3 changes: 2 additions & 1 deletion administrator/modules/mod_pathway.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
{
$html .= " / ";
// try to miss edit functions
if ($task != '' && !eregi('edit', $task))
//if ($task != '' && !eregi('edit', $task))
if ($task != '' && !preg_match('/edit/i', $task))
{
$html .= "<a href=\"index2.php?option=$option\">$option</a>";
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_user/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function userEdit($option, $uid, $submitvalue)
$row->username = trim($row->username);

$file = $mainframe->getPath('com_xml', 'com_users');
$params =& new mosUserParameters($row->params, $file, 'component');
$params =new mosUserParameters($row->params, $file, 'component');

HTML_user::userEdit($row, $option, $submitvalue, $params);
}
Expand Down
6 changes: 3 additions & 3 deletions includes/PEAR/PEAR.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
* destructor, use error_log(), syslog() or something similar.
*
* IMPORTANT! To use the emulated destructors you need to create the
* objects by reference: $obj =& new PEAR_child;
* objects by reference: $obj =new PEAR_child;
*
* @category pear
* @package PEAR
Expand Down Expand Up @@ -630,12 +630,12 @@ function &raiseError($message = null,
}
if ($skipmsg)
{
$a = & new $ec($code, $mode, $options, $userinfo);
$a = new $ec($code, $mode, $options, $userinfo);
return $a;
}
else
{
$a = & new $ec($message, $code, $mode, $options, $userinfo);
$a = new $ec($message, $code, $mode, $options, $userinfo);
return $a;
}
}
Expand Down
3 changes: 2 additions & 1 deletion includes/domit/xml_domit_lite_parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,8 @@ function parse(&$myXMLDoc, $xmlText, $preserveCDATA = true)
//seem to work consistently across versions of PHP and Expat
if (!$this->xmlDoc->preserveWhitespace)
{
$xmlText = eregi_replace('>' . "[[:space:]]+" . '<', '><', $xmlText);
//$xmlText = eregi_replace('>' . "[[:space:]]+" . '<', '><', $xmlText);
$xmlText = preg_replace('/>[[:space:]]+</i', '><', $xmlText);
}

$success = xml_parse($parser, $xmlText);
Expand Down
2 changes: 1 addition & 1 deletion includes/joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ function initSessionAdmin($option, $task)
{
$errorlevel = error_reporting();
error_reporting(0);
$params =& new mosParameters($my->params, $file, 'component');
$params = new mosParameters($my->params, $file, 'component');
error_reporting($errorlevel);
}

Expand Down
2 changes: 1 addition & 1 deletion includes/patTemplate/patTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ function &loadModule($moduleType, $moduleName, $params = array(), $new = false)
return patErrorManager::raiseError(PATTEMPLATE_ERROR_MODULE_NOT_FOUND, "Module file $moduleFile does not contain class $moduleClass.");
}

$this->_modules[$moduleType][$sig] = & new $moduleClass;
$this->_modules[$moduleType][$sig] = new $moduleClass;
if (method_exists($this->_modules[$moduleType][$sig], 'setTemplateReference'))
{
$this->_modules[$moduleType][$sig]->setTemplateReference($this);
Expand Down
2 changes: 1 addition & 1 deletion includes/patTemplate/patTemplate/Dump/XUL.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function displayFooter()
if ($_GET['mode'] == 'debug')
{
require_once 'XML/Beautifier.php';
$fmt = & new XML_Beautifier(array('indent' => ' '));
$fmt = new XML_Beautifier(array('indent' => ' '));
echo '<pre>';
echo htmlspecialchars($fmt->formatString($this->_doc->serialize()));
echo '</pre>';
Expand Down
2 changes: 1 addition & 1 deletion includes/patTemplate/patTemplate/Function/Highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function call($params, $content)
$params['numbers'] = constant($params['numbers']);
}

$renderer = & new Text_Highlighter_Renderer_HTML($params);
$renderer = new Text_Highlighter_Renderer_HTML($params);
$highlighter = & Text_Highlighter::factory($type);
$highlighter->setRenderer($renderer);
return $highlighter->highlight(trim($content));
Expand Down
2 changes: 1 addition & 1 deletion includes/patTemplate/patTemplate/OutputFilter/BBCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function _prepare()
return false;
}

$this->BBCode = & new patBBCode();
$this->BBCode = new patBBCode();

if (isset($this->_params['skinDir']))
$this->BBCode->setSkinDir($this->_params['skinDir']);
Expand Down
4 changes: 2 additions & 2 deletions includes/phpInputFilter/class.inputfilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ function decode($source)
// url decode
$source = html_entity_decode($source, ENT_QUOTES, "ISO-8859-1");
// convert decimal
$source = preg_replace('/&#(\d+);/me', "chr(\\1)", $source); // decimal notation
$source = preg_replace_callback('/&#(\d+);/m',function($m) { return chr($m[1]); }, $source); // decimal notation
// convert hex
$source = preg_replace('/&#x([a-f0-9]+);/mei', "chr(0x\\1)", $source); // hex notation
$source = preg_replace_callback('/&#x([a-f0-9]+);/mi',function($m) { return chr($m[1]); }, $source); // hex notation
return $source;
}

Expand Down