Beispiel #1
0
 public function insert(&$data)
 {
     if ($data['content']) {
         $data['content'] = base64_encode($data['content']);
     }
     return parent::insert($data);
 }
Beispiel #2
0
 public function insert(&$data)
 {
     $info_object = kernel::service('sensitive_information');
     if (is_object($info_object)) {
         $info_object->opinfo($data, 'b2c_mdl_delivery', __FUNCTION__);
     }
     return parent::insert($data);
 }
Beispiel #3
0
 public function insert($params)
 {
     $params = $this->valid_insert($params);
     if (!$params) {
         return false;
     }
     return parent::insert($params);
 }
Beispiel #4
0
 public function insert(&$data)
 {
     if ($this->has_static($data['static']) || $this->has_url($data['url'])) {
         return false;
     }
     $res = parent::insert($data);
     if ($res) {
         kernel::single('site_route_static')->set_dispatch($data['static'], $data);
         kernel::single('site_route_static')->set_genurl($data['url'], $data);
     }
     return $res;
 }
Beispiel #5
0
 function insert($data)
 {
     $role_id = parent::insert($data);
     if ($role_id && is_array($data['actions'])) {
         $sql = 'INSERT INTO `sdb_base_lnk_acts` (`role_id`,`action_id`) VALUES ';
         foreach ($data['actions'] as $action_id) {
             $actions[] = "({$role_id},{$action_id})";
         }
         $sql .= implode($actions, ',') . ';';
         $a = $this->db->exec($sql);
     }
     return $role_id;
 }
Beispiel #6
0
 /**
  * 重写insert方法
  * @param mixed 需要插入记录的数组
  * @return boolean
  */
 public function insert(&$data)
 {
     $is_inserted = parent::insert($data);
     if ($is_inserted) {
         $obj_extends_service = vmc::servicelist('b2c.api_sales_rule_goods_extends_actions');
         if ($obj_extends_service) {
             foreach ($obj_extends_service as $obj) {
                 $obj->extend_insert($data);
             }
         }
     }
     return $is_inserted;
 }
Beispiel #7
0
 public function insert(&$params)
 {
     $params = $this->format_params($params);
     if (!$params) {
         return false;
     }
     if ($id = parent::insert($params)) {
         kernel::single('site_module_base')->create_site_config();
         return $id;
     } else {
         return false;
     }
 }
Beispiel #8
0
 /**
  * 添加节点
  * @var array $params
  * @access public
  * @return boolean
  */
 public function insert($params)
 {
     $params = $this->valid_insert($params);
     if (!$params) {
         return false;
     }
     $insert_id = parent::insert($params);
     if ($insert_id) {
         $this->upgrade_parent($insert_id);
         return $this->update_menu_path($insert_id);
         //更新菜单路径信息
     } else {
         return false;
     }
 }
Beispiel #9
0
 /**
  * 插入数据
  * @param array $params 插入的数据
  * @return bool|int 返回插入结果
  */
 public function insert(&$params)
 {
     $params = $this->valid_insert($params);
     if (!$params) {
         return false;
     }
     $insert_id = parent::insert($params);
     if ($insert_id) {
         $rows = $this->getList('article_id', array('id' => $insert_id));
         kernel::single('content_article_detail')->delete_body_kvstore($rows[0]['article_id']);
         kernel::single('content_article_detail')->store_detail_change();
         return $insert_id;
     } else {
         return false;
     }
 }
Beispiel #10
0
 /**
  * 插入数据.
  *
  * @param array $params 插入的数据
  *
  * @return bool|int 返回插入结果
  */
 public function insert(&$params)
 {
     $params = $this->valid_insert($params);
     if (!$params) {
         return false;
     }
     $params['uptime'] = time();
     if (empty($params['pubtime'])) {
         $params['pubtime'] = $params['uptime'];
     }
     $insert_id = parent::insert($params);
     if ($insert_id) {
         vmc::singleton('content_article_detail')->delete_index_kvstore($insert_id);
         vmc::singleton('content_article_detail')->store_detail_change();
         return $insert_id;
     } else {
         return false;
     }
 }
Beispiel #11
0
 public function insert($params)
 {
     $params = $this->valid_insert($params);
     if (!$params) {
         return false;
     }
     $params['uptime'] = time();
     if (empty($params['pubtime'])) {
         $params['pubtime'] = $params['uptime'];
     }
     return parent::insert($params);
 }
Beispiel #12
0
 /**
  * 添加节点
  * @var array $params
  * @access public
  * @return boolean
  */
 public function insert($params)
 {
     $params = $this->valid_insert($params);
     if (!$params) {
         return false;
     }
     $insert_id = parent::insert($params);
     if ($insert_id) {
         $this->upgrade_parent($insert_id);
         kernel::single('content_article_node')->delete_node_kvstore($insert_id);
         //todo: 清空kvstore值,以免冲突
         kernel::single('content_article_node')->store_nodes_change();
         return $this->update_node_path($insert_id);
         //更新节点路径信息
     } else {
         return false;
     }
 }