Exemplo n.º 1
0
 function update($id, $data = array())
 {
     $this_item = $this->get_one($id);
     check_allowed_category($this_item['category_id'], LZ_RESPONSE == 'text');
     if ($data['category_id']) {
         check_allowed_category($data['category_id'], LZ_RESPONSE == 'text');
     }
     return parent::update($id, $data);
 }
Exemplo n.º 2
0
 function update($id, $data)
 {
     global $cache;
     check_allowed_category($id, LZ_RESPONSE == 'text');
     if ($data['status'] == 2) {
         include_once LZ_BASEPATH . 'model/item.php';
         $item = new LZ_Item();
         if (!$item->exists(array('status' => 3, 'category_id' => $id))) {
             $data['item_id'] = $item->add(array('category_id' => $id, 'status' => 3, 'publish_time' => time()));
         } else {
             $this_item = $item->get_one(array('status' => 3, 'category_id' => $id));
             $data['item_id'] = $this_item['item_id'];
         }
     }
     $re = parent::update($id, $data);
     $cache->clear_uri('#admin/category');
     return $re;
 }
Exemplo n.º 3
0
 function update($id, $data = array())
 {
     $this_paper = $this->get_one($id);
     return parent::update($id, $data);
 }