Example #1
0
 static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new comments_module_common();
     }
     return self::$instance;
 }
Example #2
0
 function comments_module_front()
 {
     global $TMS;
     $this->_module_name = 'comments';
     //true так как front_call
     $this->_common_obj = comments_module_common::getInstance(true);
     $this->_tree = $this->_common_obj->obj_tree;
     parent::__construct();
     $TMS->registerHandlerObj($this->_module_name, $this);
 }
Example #3
0
 function show_edit_category($params)
 {
     $n = $this->_tree->getNodeInfo($params['id']);
     if (Common::is_module_exists('comments')) {
         Common::call_common_instance('comments');
         $comments =& comments_module_common::getInstance();
         $treads = XARRAY::arr_to_lev($comments->obj_tree->GetChildsParam(1, '%', true), 'basic', 'params', 'Alias');
         $this->result['category_data']['Tread'] = XHTML::arr_select_opt($treads, $n['params']['Tread']);
         unset($n['params']['Tread']);
     }
     $this->result['category_data']['basic'] = $n['basic'];
     $this->result['category_data'] = array_merge($this->result['category_data'], $n['params']);
 }
Example #4
0
 function common_call($front_call = null)
 {
     $this->_common_obj =& comments_module_common::getInstance();
     $this->_tree = $this->_common_obj->obj_tree;
 }