예제 #1
0
파일: worker.php 프로젝트: rmiddle/feg
 static function update($ids, $fields, $flush_cache = true)
 {
     parent::_update($ids, 'worker', $fields);
     if ($flush_cache) {
         self::clearCache();
     }
 }
예제 #2
0
파일: message.php 프로젝트: rmiddle/feg
 static function update($ids, $fields)
 {
     if (isset($fields['params'])) {
         @($fields['params_json'] = json_encode($fields['params']));
     } else {
         @($fields['params_json'] = "");
     }
     unset($fields['params']);
     parent::_update($ids, 'message', $fields);
 }
예제 #3
0
파일: export_type.php 프로젝트: rmiddle/feg
 static function update($ids, $fields)
 {
     if (isset($fields['params'])) {
         @($fields['params_json'] = json_encode($fields['params']));
     } else {
         @($fields['params_json'] = "");
     }
     unset($fields['params']);
     parent::_update($ids, 'export_type', $fields);
     self::clearCache();
 }
예제 #4
0
 static function update($ids, $fields)
 {
     if (!is_array($ids)) {
         $ids = array($ids);
     }
     /*
      * Make a diff for the requested objects in batches
      */
     foreach ($ids as $id) {
         $objects = DAO_CustomerRecipient::get($id);
         $object_changes = array();
         $pre_fields = get_object_vars($objects);
         $changes = array();
         foreach ($fields as $field_key => $field_val) {
             // Make sure the value of the field actually changed
             if ($pre_fields[$field_key] != $field_val) {
                 $changes[$field_key] = array('from' => $pre_fields[$field_key], 'to' => $field_val);
             }
         }
         // If we had changes
         if (!empty($changes)) {
             $object_changes[$id] = array('model' => array_merge($pre_fields, $fields), 'changes' => $changes);
         }
         /*
          * Make the changes
          */
         parent::_update($ids, 'customer_recipient', $fields);
     }
     /*
      * Trigger an event about the changes
      */
     if (!empty($object_changes)) {
         $eventMgr = DevblocksPlatform::getEventService();
         $eventMgr->trigger(new Model_DevblocksEvent('dao.customer.recipient.update', array('objects' => $object_changes)));
     }
 }
예제 #5
0
 static function update($ids, $fields)
 {
     parent::_update($ids, 'import_source', $fields);
     self::clearCache();
 }
예제 #6
0
 static function update($ids, $fields)
 {
     parent::_update($ids, 'message_recipient', $fields);
 }
예제 #7
0
파일: stats.php 프로젝트: rmiddle/feg
 static function update($ids, $fields)
 {
     parent::_update($ids, 'stats', $fields);
 }