当前位置: 首页>>代码示例>>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;未经允许,请勿转载。