Ignore:
Timestamp:
Feb 13, 2014, 11:24:06 PM (10 years ago)
Author:
rvelices
Message:

remove prehistoric unnecessary object references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/block.class.php

    r26461 r27370  
    5050  public function load_registered_blocks()
    5151  {
    52     trigger_action('blockmanager_register_blocks', array(&$this));
     52    trigger_action('blockmanager_register_blocks', array($this));
    5353  }
    5454 
     
    7272   * Add a block with the menu. Usually called in 'blockmanager_register_blocks' event.
    7373   *
    74    * @param RegisteredBlock &$block
    75    */
    76   public function register_block(&$block)
     74   * @param RegisteredBlock $block
     75   */
     76  public function register_block($block)
    7777  {
    7878    if (isset($this->registered_blocks[$block->get_id()]))
    7979    {
    80       trigger_error("Block '".$block->get_id()."' is already registered", E_USER_WARNING);
    8180      return false;
    8281    }
    83     $this->registered_blocks[$block->get_id()] = &$block;
     82    $this->registered_blocks[$block->get_id()] = $block;
    8483    return true;
    8584  }
     
    112111    }
    113112    $this->sort_blocks();
    114     trigger_action('blockmanager_prepare_display', array(&$this));
     113    trigger_action('blockmanager_prepare_display', array($this));
    115114    $this->sort_blocks();
    116115  }
     
    141140   *
    142141   * @param string $block_id
    143    * @return &DisplayBlock|null
    144    */
    145   public function &get_block($block_id)
    146   {
    147     $tmp = null;
     142   * @return DisplayBlock|null
     143   */
     144  public function get_block($block_id)
     145  {
    148146    if (isset($this->display_blocks[$block_id]))
    149147    {
    150148      return $this->display_blocks[$block_id];
    151149    }
    152     return $tmp;
     150    return null;
    153151  }
    154152
     
    194192
    195193    $template->set_filename('menubar', $file);
    196     trigger_action('blockmanager_apply', array(&$this) );
     194    trigger_action('blockmanager_apply', array($this) );
    197195
    198196    foreach ($this->display_blocks as $id=>$block)
     
    280278
    281279  /**
    282    * @param RegisteredBlock &$block
     280   * @param RegisteredBlock $block
    283281   */
    284282  public function __construct($block)
    285283  {
    286     $this->_registeredBlock = &$block;
    287   }
    288 
    289   /**
    290    * @return &RegisteredBlock
    291    */
    292   public function &get_block()
     284    $this->_registeredBlock = $block;
     285  }
     286
     287  /**
     288   * @return RegisteredBlock
     289   */
     290  public function get_block()
    293291  {
    294292    return $this->_registeredBlock;
Note: See TracChangeset for help on using the changeset viewer.