Exemple #1
0
 static function getInstance($front_call = null)
 {
     if (!self::$instance) {
         self::$instance = new news_module_common($front_call);
     }
     return self::$instance;
 }
Exemple #2
0
 function news_module_front()
 {
     global $TMS;
     $this->_module_name = 'news';
     //true так как front_call
     $this->_common_obj = news_module_common::getInstance(true);
     $this->_tree = $this->_common_obj->obj_tree;
     parent::__construct();
 }
 function add_comment_news($params)
 {
     Common::call_common_instance('news');
     $news = news_module_common::getInstance();
     if ($n = $news->select_news($params['id'])) {
         if ($tread = $news->obj_tree->ReadNodeParam($n['ctg_id'], 'Tread')) {
             $this->result["result_code"] = $this->_addcomment(array('CobjectId' => $params['id'], 'tread' => $tread, 'Module' => 'news', 'Marker' => $n['header']), $params['comment']);
         }
     }
 }
Exemple #4
0
 function common_call($front_call = null)
 {
     $this->_module_name = 'news';
     $this->_common_obj =& news_module_common::getInstance();
     $this->_tree =& $this->_common_obj->obj_tree;
 }