當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonDBChild::post_updateItem方法代碼示例

本文整理匯總了PHP中CommonDBChild::post_updateItem方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonDBChild::post_updateItem方法的具體用法?PHP CommonDBChild::post_updateItem怎麽用?PHP CommonDBChild::post_updateItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonDBChild的用法示例。


在下文中一共展示了CommonDBChild::post_updateItem方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Ticket

 function post_updateItem($history = 1)
 {
     global $CFG_GLPI;
     $job = new Ticket();
     $donotif = $CFG_GLPI["use_mailing"];
     if (isset($this->input['_disablenotif'])) {
         $donotif = false;
     }
     if ($job->getFromDB($this->fields["tickets_id"])) {
         if (count($this->updates) && $donotif) {
             $options = array('validation_id' => $this->fields["id"], 'validation_status' => $this->fields["status"]);
             NotificationEvent::raiseEvent('validation_answer', $job, $options);
         }
         // Set global validation to accepted to define one
         if ($job->fields['global_validation'] == 'waiting' || self::getNumberValidationForTicket($this->fields["tickets_id"]) == 1 || self::isAllValidationsHaveSameStatusForTicket($this->fields["tickets_id"])) {
             $input['id'] = $this->fields["tickets_id"];
             $input['global_validation'] = $this->fields["status"];
             $job->update($input);
         }
     }
     parent::post_updateItem($history);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:22,代碼來源:ticketvalidation.class.php

示例2: IPAddress

 function post_updateItem($history = 1)
 {
     global $DB;
     if (count($this->updates)) {
         // Update Ticket Tco
         if (in_array("itemtype", $this->updates) || in_array("items_id", $this->updates)) {
             $ip = new IPAddress();
             // Update IPAddress
             foreach ($DB->request('glpi_networknames', array('itemtype' => 'NetworkPort', 'items_id' => $this->getID())) as $dataname) {
                 foreach ($DB->request('glpi_ipaddresses', array('itemtype' => 'NetworkName', 'items_id' => $dataname['id'])) as $data) {
                     $ip->update(array('id' => $data['id'], 'mainitemtype' => $this->fields['itemtype'], 'mainitems_id' => $this->fields['items_id']));
                 }
             }
         }
     }
     parent::post_updateItem($history);
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:17,代碼來源:networkport.class.php

示例3:

 /**
  * @see CommonDBTM::post_updateItem()
  **/
 function post_updateItem($history = 1)
 {
     if (isset($this->oldvalues['name']) || isset($this->oldvalues['entities_id'])) {
         $link = new IPAddress_IPNetwork();
         $link->cleanDBonItemDelete($this->getType(), $this->getID());
         $link->addIPAddress($this);
     }
     parent::post_updateItem($history);
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:12,代碼來源:ipaddress.class.php

示例4:

 /**
  * @see CommonDBTM::post_updateItem()
  **/
 function post_updateItem($history = 1)
 {
     global $CFG_GLPI;
     if (count($this->updates) && $CFG_GLPI["use_mailing"]) {
         NotificationEvent::raiseEvent("update", $this);
         //$mail = new MailingResa($this,"update");
         //$mail->send();
     }
     parent::post_updateItem($history);
 }
開發者ID:btry,項目名稱:glpi,代碼行數:13,代碼來源:reservation.class.php

示例5: Alert

 /**
  * @see CommonDBTM::post_updateItem()
  **/
 function post_updateItem($history = 1)
 {
     $alert = new Alert();
     $alert->clear($this->getType(), $this->fields['id'], Alert::ACTION);
     parent::post_updateItem($history);
 }
開發者ID:geldarr,項目名稱:hack-space,代碼行數:9,代碼來源:planningrecall.class.php

示例6: Printer

 function post_updateItem($history = 1)
 {
     if (in_array('pages', $this->updates)) {
         $printer = new Printer();
         if ($printer->getFromDB($this->fields['printers_id']) && ($this->fields['pages'] > $printer->getField('last_pages_counter') || $this->oldvalues['pages'] == $printer->getField('last_pages_counter'))) {
             $printer->update(array('id' => $printer->getID(), 'last_pages_counter' => $this->fields['pages']));
         }
     }
     parent::post_updateItem($history);
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:10,代碼來源:cartridge.class.php

示例7:

 function post_updateItem($history = 1)
 {
     global $DB;
     // if default is set : unsed others for the users
     if (in_array('is_default', $this->updates) && $this->input["is_default"] == 1) {
         $query = "UPDATE " . $this->getTable() . "\n                   SET `is_default` = '0'\n                   WHERE `id` <> '" . $this->input['id'] . "'\n                         AND `users_id` = '" . $this->fields['users_id'] . "'";
         $DB->query($query);
     }
     parent::post_updateItem($history);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:10,代碼來源:useremail.class.php

示例8: array

 function post_updateItem($history = 1)
 {
     global $CFG_GLPI;
     $item = new static::$itemtype();
     $donotif = $CFG_GLPI["use_mailing"];
     if (isset($this->input['_disablenotif'])) {
         $donotif = false;
     }
     if ($item->getFromDB($this->fields[static::$items_id])) {
         if (count($this->updates) && $donotif) {
             $options = array('validation_id' => $this->fields["id"], 'validation_status' => $this->fields["status"]);
             NotificationEvent::raiseEvent('validation_answer', $item, $options);
         }
         //Set global validation to accepted to define one
         if ($item->fields['global_validation'] == self::WAITING && in_array("status", $this->updates)) {
             $input['id'] = $this->fields[static::$items_id];
             $input['global_validation'] = self::computeValidationStatus($item);
             $item->update($input);
         }
     }
     parent::post_updateItem($history);
 }
開發者ID:pvasener,項目名稱:glpi,代碼行數:22,代碼來源:commonitilvalidation.class.php


注:本文中的CommonDBChild::post_updateItem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。