Permalink
Browse files

git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@4715 6…

…f6e1ebd-4c2b-0410-823f-f34bde69bce9
  • Loading branch information...
1 parent 9839de3 commit 44ef119e72d0665bfae171208ce1a88f2d9fb0d2 @eddieajau eddieajau committed Aug 24, 2006
@@ -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)) {
@@ -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')) {
@@ -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')) {
@@ -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')) {
@@ -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;
}
@@ -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)) {
@@ -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 )) {
@@ -23,7 +23,7 @@ class JAdminCSSMenu extends JTree
function __construct()
{
- $this->_root =& new JMenuNode('ROOT');
+ $this->_root = new JMenuNode('ROOT');
$this->_current = & $this->_root;
}
@@ -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' );
@@ -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' );
View
@@ -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>';
?>
@@ -203,7 +203,7 @@ function &_loadModel( $modelName, $prefix )
}
}
- $model = & new $modelClass();
+ $model = new $modelClass();
return $model;
}
@@ -241,7 +241,7 @@ function &_loadView( $viewName, $classPrefix='' )
}
else
{
- $view = & new $viewClass( $this );
+ $view = new $viewClass( $this );
$view->setTemplatePath($path.DS.'tmpl');
return $view;
}
@@ -33,7 +33,7 @@ class JTree extends JObject
function __construct()
{
- $this->_root = & new JNode('ROOT');
+ $this->_root = new JNode('ROOT');
$this->_current = & $this->_root;
}
@@ -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;
@@ -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();
}
}
@@ -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
@@ -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];
@@ -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');
@@ -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']))
@@ -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;
}
@@ -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']);
}
}
}
@@ -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
@@ -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
@@ -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;
@@ -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');
@@ -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;
@@ -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;
}
}
@@ -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;
}
}
@@ -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;
}
@@ -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;
@@ -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.
@@ -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
{
@@ -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)
{
@@ -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
@@ -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())
@@ -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)
@@ -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();
@@ -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
{
Oops, something went wrong.

0 comments on commit 44ef119

Please sign in to comment.