From 761736fc6adda709c8d0523a3f255db587d1d525 Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 13 Feb 2014 22:24:06 +0000 Subject: remove prehistoric unnecessary object references git-svn-id: http://piwigo.org/svn/trunk@27370 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/block.class.php | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'include/block.class.php') diff --git a/include/block.class.php b/include/block.class.php index 966573ad6..3cb0b7021 100644 --- a/include/block.class.php +++ b/include/block.class.php @@ -49,7 +49,7 @@ class BlockManager */ public function load_registered_blocks() { - trigger_action('blockmanager_register_blocks', array(&$this)); + trigger_action('blockmanager_register_blocks', array($this)); } /** @@ -71,16 +71,15 @@ class BlockManager /** * Add a block with the menu. Usually called in 'blockmanager_register_blocks' event. * - * @param RegisteredBlock &$block + * @param RegisteredBlock $block */ - public function register_block(&$block) + public function register_block($block) { if (isset($this->registered_blocks[$block->get_id()])) { - trigger_error("Block '".$block->get_id()."' is already registered", E_USER_WARNING); return false; } - $this->registered_blocks[$block->get_id()] = &$block; + $this->registered_blocks[$block->get_id()] = $block; return true; } @@ -111,7 +110,7 @@ class BlockManager $idx++; } $this->sort_blocks(); - trigger_action('blockmanager_prepare_display', array(&$this)); + trigger_action('blockmanager_prepare_display', array($this)); $this->sort_blocks(); } @@ -140,16 +139,15 @@ class BlockManager * Returns a visible block. * * @param string $block_id - * @return &DisplayBlock|null + * @return DisplayBlock|null */ - public function &get_block($block_id) + public function get_block($block_id) { - $tmp = null; if (isset($this->display_blocks[$block_id])) { return $this->display_blocks[$block_id]; } - return $tmp; + return null; } /** @@ -193,7 +191,7 @@ class BlockManager global $template; $template->set_filename('menubar', $file); - trigger_action('blockmanager_apply', array(&$this) ); + trigger_action('blockmanager_apply', array($this) ); foreach ($this->display_blocks as $id=>$block) { @@ -279,17 +277,17 @@ class DisplayBlock public $raw_content; /** - * @param RegisteredBlock &$block + * @param RegisteredBlock $block */ public function __construct($block) { - $this->_registeredBlock = &$block; + $this->_registeredBlock = $block; } /** - * @return &RegisteredBlock + * @return RegisteredBlock */ - public function &get_block() + public function get_block() { return $this->_registeredBlock; } -- cgit v1.2.3