Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…f6e1ebd-4c2b-0410-823f-f34bde69bce9
  • Loading branch information
eddieajau committed Aug 24, 2006
1 parent 9839de3 commit 44ef119
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 59 deletions.
4 changes: 2 additions & 2 deletions administrator/components/com_content/models/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ function init($type='')
if ($type) {
require_once(JPATH_COM_CONTENT.'helpers'.DS.$type.'.php');
$class = 'JContentHelper'.ucfirst($type);
$this->_helper =& new $class($this);
$this->_helper = new $class($this);
$this->_helper->setXmlPath( JPATH_COM_CONTENT.'helpers'.DS.'xml' );
$name = $this->_helper->getWizardName();
} else {
$name = 'content';
}

// Instantiate wizard
$this->_wizard =& new JWizard($mainframe, $name);
$this->_wizard = new JWizard($mainframe, $name);

// Load the XML if helper is set
if (isset($this->_helper)) {
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_menus/models/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function &getControlParams()
{
// Get the control parameters
$item =& $this->getItem();
$params =& new JParameter($item->control);
$params = new JParameter($item->control);

// Override params with request params if they are present.
if ($control = JRequest::getVar('control', false, '', 'array')) {
Expand Down Expand Up @@ -125,7 +125,7 @@ function &getStateParams()
{
// Get the state parameters
$item =& $this->getItem();
$params =& new JParameter($item->params);
$params = new JParameter($item->params);

if ($state =& $this->_getStateXML()) {
if (is_a($state, 'JSimpleXMLElement')) {
Expand All @@ -140,7 +140,7 @@ function &getAdvancedParams()
{
// Get the state parameters
$item =& $this->getItem();
$params =& new JParameter($item->params);
$params = new JParameter($item->params);

if ($state =& $this->_getStateXML()) {
if (is_a($state, 'JSimpleXMLElement')) {
Expand Down Expand Up @@ -356,7 +356,7 @@ function &_getHelper()
if ($item->type && file_exists(COM_MENUS.'helpers'.DS.$item->type.'.php')) {
require_once(COM_MENUS.'helpers'.DS.$item->type.'.php');
$class = 'JMenuHelper'.ucfirst($item->type);
$helper =& new $class($this);
$helper = new $class($this);
} else {
$helper = false;
}
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_menus/models/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ function init($type='component')
if ($type) {
require_once(COM_MENUS.'helpers'.DS.$type.'.php');
$class = 'JMenuHelper'.ucfirst($type);
$this->_helper =& new $class($this);
$this->_helper = new $class($this);
$this->_helper->setXmlPath( COM_MENUS.'helpers'.DS.'xml' );
$name = $this->_helper->getWizardName();
} else {
$name = 'menu';
}

// Instantiate wizard
$this->_wizard =& new JWizard($mainframe, $name);
$this->_wizard = new JWizard($mainframe, $name);

// Load the XML if helper is set
if (isset($this->_helper)) {
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 @@ -293,7 +293,7 @@ function saveUser( )
/*
* Lets create a new JUser object
*/
$user = & new JUser(JRequest::getVar( 'id', 0, 'post', 'int'));
$user = new JUser(JRequest::getVar( 'id', 0, 'post', 'int'));
$original_gid = $user->get('gid');

if (!$user->bind( $_POST )) {
Expand Down
2 changes: 1 addition & 1 deletion administrator/modules/mod_cssmenu/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class JAdminCSSMenu extends JTree

function __construct()
{
$this->_root =& new JMenuNode('ROOT');
$this->_root = new JMenuNode('ROOT');
$this->_current = & $this->_root;
}

Expand Down
2 changes: 1 addition & 1 deletion components/com_contact/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}

// Create the controller
$controller = & new $controllerName( 'display' );
$controller = new $controllerName( 'display' );

// need to tell the controller where to look for views and models
$controller->setViewPath( JPATH_COM_CONTACT . '/views' );
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

// Create the controller
$cParams = JSiteHelper::getControlParams();
$controller = & new JContentController( 'display' );
$controller = new JContentController( 'display' );

// need to tell the controller where to look for views and models
$controller->setViewPath( dirname( __FILE__ ).DS.'views' );
Expand Down
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
$mainframe->triggerEvent( 'onAfterDisplay' );

JDEBUG ? $_PROFILER->mark( 'afterDisplayOutput' ) : null;

echo '<div style="background-color:white">';
JDEBUG ? $_PROFILER->report( true, $mainframe->getCfg( 'debug_db' ) ) : null;
echo '</div>';
?>
4 changes: 2 additions & 2 deletions libraries/joomla/application/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function &_loadModel( $modelName, $prefix )
}
}

$model = & new $modelClass();
$model = new $modelClass();
return $model;
}

Expand Down Expand Up @@ -241,7 +241,7 @@ function &_loadView( $viewName, $classPrefix='' )
}
else
{
$view = & new $viewClass( $this );
$view = new $viewClass( $this );
$view->setTemplatePath($path.DS.'tmpl');
return $view;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/common/abstract/tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class JTree extends JObject

function __construct()
{
$this->_root = & new JNode('ROOT');
$this->_root = new JNode('ROOT');
$this->_current = & $this->_root;
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/document/error/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function display( $cache = false, $compress = false, $params = array())
function _initEngine($template)
{
jimport('joomla.template.template');
$instance =& new JTemplate();
$instance = new JTemplate();

//set a reference to the document in the engine
$instance->doc =& $this;
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ function &getXMLParser( $type = 'DOM', $options = array())
{
if( !isset($options['lite']) || $options['lite']) {
jimport('domit.xml_domit_lite_include');
$doc =& new DOMIT_Lite_Document();
$doc = new DOMIT_Lite_Document();
} else {
jimport('domit.xml_domit_include');
$doc =& new DOMIT_Document();
$doc = new DOMIT_Document();
}
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/presentation/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function __construct($name, $request='wizVal')
{
global $mainframe;
$this->_step = JRequest::getVar('step', 0, '', 'int');
$this->_registry =& new JParameter('');
$this->_registry = new JParameter('');
$this->_regPath = 'wizard.'.$name;

// Get the step data from the session
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/registry/registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function &getInstance($id, $namespace = 'default')
}

if (empty ($instances[$id])) {
$instances[$id] = & new JRegistry($namespace);
$instances[$id] = new JRegistry($namespace);
}

return $instances[$id];
Expand Down Expand Up @@ -441,7 +441,7 @@ function _loadFormat($format)
$lformat = strtolower($format);
if(jimport('joomla.registry.format.'.$lformat)) {
$return = null;
eval('$return =& new JRegistryFormat'.$format.'();');
eval('$return = new JRegistryFormat'.$format.'();');
return $return;
} else {
die('Unable to load format');
Expand Down
48 changes: 24 additions & 24 deletions libraries/phpxmlrpc/xmlrpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ function xmlrpc_ee($parser, $name, $rebuild_xmlrpcvals = true)
if ($rebuild_xmlrpcvals)
{
// build the xmlrpc val out of the data received, and substitute it
$temp =& new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']);
$temp = new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']);
// in case we got info about underlying php class, save it
// in the object we're rebuilding
if (isset($GLOBALS['_xh']['php_class']))
Expand Down Expand Up @@ -1036,7 +1036,7 @@ function& send($msg, $timeout=0, $method='')
}
elseif(is_string($msg))
{
$n =& new xmlrpcmsg('');
$n = new xmlrpcmsg('');
$n->payload = $msg;
$msg = $n;
}
Expand Down Expand Up @@ -1605,7 +1605,7 @@ function multicall($msgs, $timeout=0, $method='http', $fallback=true)
}
else
{
$result =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']);
$result = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']);
}
}
}
Expand Down Expand Up @@ -1652,17 +1652,17 @@ function _try_multicall($msgs, $timeout, $method)
$calls = array();
foreach($msgs as $msg)
{
$call['methodName'] =& new xmlrpcval($msg->method(),'string');
$call['methodName'] = new xmlrpcval($msg->method(),'string');
$numParams = $msg->getNumParams();
$params = array();
for($i = 0; $i < $numParams; $i++)
{
$params[$i] = $msg->getParam($i);
}
$call['params'] =& new xmlrpcval($params, 'array');
$calls[] =& new xmlrpcval($call, 'struct');
$call['params'] = new xmlrpcval($params, 'array');
$calls[] = new xmlrpcval($call, 'struct');
}
$multicall =& new xmlrpcmsg('system.multicall');
$multicall = new xmlrpcmsg('system.multicall');
$multicall->addParam(new xmlrpcval($calls, 'array'));

// Attempt RPC call
Expand Down Expand Up @@ -1714,7 +1714,7 @@ function _try_multicall($msgs, $timeout, $method)
return false; // Bad value
}
// Normal return value
$response[$i] =& new xmlrpcresp($val[0], 0, '', 'phpvals');
$response[$i] = new xmlrpcresp($val[0], 0, '', 'phpvals');
break;
case 2:
/// @todo remove usage of @: it is apparently quite slow
Expand All @@ -1728,7 +1728,7 @@ function _try_multicall($msgs, $timeout, $method)
{
return false;
}
$response[$i] =& new xmlrpcresp(0, $code, $str);
$response[$i] = new xmlrpcresp(0, $code, $str);
break;
default:
return false;
Expand Down Expand Up @@ -1761,7 +1761,7 @@ function _try_multicall($msgs, $timeout, $method)
return false; // Bad value
}
// Normal return value
$response[$i] =& new xmlrpcresp($val->arraymem(0));
$response[$i] = new xmlrpcresp($val->arraymem(0));
break;
case 'struct':
$code = $val->structmem('faultCode');
Expand All @@ -1774,7 +1774,7 @@ function _try_multicall($msgs, $timeout, $method)
{
return false;
}
$response[$i] =& new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
$response[$i] = new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
break;
default:
return false;
Expand Down Expand Up @@ -2238,7 +2238,7 @@ function &parseResponseHeaders(&$data, $headers_processed=false)
if(!$data = decode_chunked($data))
{
error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to rebuild the chunked data received from server');
$r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);
$r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);
return $r;
}
}
Expand Down Expand Up @@ -2267,14 +2267,14 @@ function &parseResponseHeaders(&$data, $headers_processed=false)
else
{
error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to decode the deflated data received from server');
$r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);
$r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);
return $r;
}
}
else
{
error_log('XML-RPC: xmlrpcmsg::parseResponse: the server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
$r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']);
$r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']);
return $r;
}
}
Expand Down Expand Up @@ -2313,7 +2313,7 @@ function &parseResponse($data='', $headers_processed=false, $return_type='xmlrpc
if($data == '')
{
error_log('XML-RPC: xmlrpcmsg::parseResponse: no response received from server.');
$r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_data'], $GLOBALS['xmlrpcstr']['no_data']);
$r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_data'], $GLOBALS['xmlrpcstr']['no_data']);
return $r;
}

Expand Down Expand Up @@ -2358,7 +2358,7 @@ function &parseResponse($data='', $headers_processed=false, $return_type='xmlrpc
// if user wants back raw xml, give it to him
if ($return_type == 'xml')
{
$r =& new xmlrpcresp($data, 0, '', 'xml');
$r = new xmlrpcresp($data, 0, '', 'xml');
$r->hdrs = $GLOBALS['_xh']['headers'];
$r->_cookies = $GLOBALS['_xh']['cookies'];
return $r;
Expand Down Expand Up @@ -2436,7 +2436,7 @@ function &parseResponse($data='', $headers_processed=false, $return_type='xmlrpc
/// @todo echo something for user?
}

$r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
$r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
$GLOBALS['xmlrpcstr']['invalid_return'] . ' ' . $GLOBALS['_xh']['isf_reason']);
}
// third error check: parsing of the response has somehow gone boink.
Expand Down Expand Up @@ -2482,7 +2482,7 @@ function &parseResponse($data='', $headers_processed=false, $return_type='xmlrpc
$errno = -1;
}

$r =& new xmlrpcresp(0, $errno, $errstr);
$r = new xmlrpcresp(0, $errno, $errstr);
}
else
{
Expand Down Expand Up @@ -3013,7 +3013,7 @@ function php_xmlrpc_decode($xmlrpc_val, $options=array())
function &php_xmlrpc_encode($php_val, $options=array())
{
$type = gettype($php_val);
$xmlrpc_val =& new xmlrpcval;
$xmlrpc_val = new xmlrpcval;

switch($type)
{
Expand Down Expand Up @@ -3272,7 +3272,7 @@ function wrap_php_function($funcname, $newfuncname='')
$code = "function $xmlrpcfuncname(\$msg) {\n";

// start to introspect PHP code
$func =& new ReflectionFunction($funcname);
$func = new ReflectionFunction($funcname);
if($func->isInternal())
{
// Note: from PHP 5.1.0 onward, we will possibly be able to use invokeargs
Expand Down Expand Up @@ -3480,7 +3480,7 @@ function wrap_php_function($funcname, $newfuncname='')
*/
function wrap_xmlrpc_method($client, $methodname, $signum=0, $timeout=0, $protocol='', $newfuncname='')
{
$msg =& new xmlrpcmsg('system.methodSignature');
$msg = new xmlrpcmsg('system.methodSignature');
$msg->addparam(new xmlrpcval($methodname));
$response =& $client->send($msg, $timeout, $protocol);
if(!$response || $response->faultCode())
Expand Down Expand Up @@ -3518,7 +3518,7 @@ function wrap_xmlrpc_method($client, $methodname, $signum=0, $timeout=0, $protoc
$desc = $desc->arraymem($signum);
}
$code = "function $xmlrpcfuncname (";
$innercode = "\$client =& new xmlrpc_client('$client->path', '$client->server');\n";
$innercode = "\$client = new xmlrpc_client('$client->path', '$client->server');\n";
// copy all client fields to the client that will be generated runtime
// (this provides for future expansion of client obj)
foreach($client as $fld => $val)
Expand All @@ -3531,7 +3531,7 @@ function wrap_xmlrpc_method($client, $methodname, $signum=0, $timeout=0, $protoc
}
$innercode .= "\$client->setDebug(\$debug);\n";
$innercode .= "\$client->return_type = 'xmlrpcvals';\n";
$innercode .= "\$msg =& new xmlrpcmsg('$methodname');\n";
$innercode .= "\$msg = new xmlrpcmsg('$methodname');\n";

// param parsing
$plist = array();
Expand All @@ -3557,7 +3557,7 @@ function wrap_xmlrpc_method($client, $methodname, $signum=0, $timeout=0, $protoc
}
if($ptype == 'dateTime.iso8601' || $ptype == 'base64')
{
$innercode .= "\$p$i =& new xmlrpcval(\$p$i, '$ptype');\n";
$innercode .= "\$p$i = new xmlrpcval(\$p$i, '$ptype');\n";
}
else
{
Expand Down
Loading

0 comments on commit 44ef119

Please sign in to comment.