当前位置: 首页>>代码示例>>PHP>>正文


PHP CommonDBChild::post_addItem方法代码示例

本文整理汇总了PHP中CommonDBChild::post_addItem方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonDBChild::post_addItem方法的具体用法?PHP CommonDBChild::post_addItem怎么用?PHP CommonDBChild::post_addItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommonDBChild的用法示例。


在下文中一共展示了CommonDBChild::post_addItem方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Calendar

 function post_addItem()
 {
     // Update calendar cache
     $cal = new Calendar();
     $cal->updateDurationCache($this->fields['calendars_id']);
     parent::post_addItem();
 }
开发者ID:kipman,项目名称:glpi,代码行数:7,代码来源:calendarsegment.class.php

示例2:

 /**
  * @see CommonDBTM::post_addItem()
  **/
 function post_addItem()
 {
     IPAddress_IPNetwork::addIPAddress($this);
     parent::post_addItem();
 }
开发者ID:stweil,项目名称:glpi,代码行数:8,代码来源:ipaddress.class.php

示例3: Ticket

 function post_addItem()
 {
     global $CFG_GLPI;
     $job = new Ticket();
     $mailsend = false;
     if ($job->getFromDB($this->fields["tickets_id"])) {
         // Set global validation to waiting
         if ($job->fields['global_validation'] == 'accepted' || $job->fields['global_validation'] == 'none') {
             $input['id'] = $this->fields["tickets_id"];
             $input['global_validation'] = 'waiting';
             // to fix lastupdater
             if (isset($this->input['_auto_update'])) {
                 $input['_auto_update'] = $this->input['_auto_update'];
             }
             // to know update by rules
             if (isset($this->input["_rule_process"])) {
                 $input['_rule_process'] = $this->input["_rule_process"];
             }
             // No update ticket notif on ticket add
             if (isset($this->input["_ticket_add"])) {
                 $input['_disablenotif'] = true;
             }
             $job->update($input);
         }
         if ($CFG_GLPI["use_mailing"]) {
             $options = array('validation_id' => $this->fields["id"], 'validation_status' => $this->fields["status"]);
             $mailsend = NotificationEvent::raiseEvent('validation', $job, $options);
         }
         if ($mailsend) {
             $user = new User();
             $user->getFromDB($this->fields["users_id_validate"]);
             $email = $user->getDefaultEmail();
             if (!empty($email)) {
                 //TRANS: %s is the user name
                 Session::addMessageAfterRedirect(sprintf(__('Approval request send to %s'), $user->getName()));
             } else {
                 Session::addMessageAfterRedirect(sprintf(__('The selected user (%s) has no valid email address. The request has been created, without email confirmation.'), $user->getName()), false, ERROR);
             }
         }
     }
     parent::post_addItem();
 }
开发者ID:gaforeror,项目名称:glpi,代码行数:42,代码来源:ticketvalidation.class.php

示例4:

 function post_addItem()
 {
     global $CFG_GLPI;
     if ($CFG_GLPI["use_mailing"]) {
         NotificationEvent::raiseEvent("new", $this);
     }
     parent::post_addItem();
 }
开发者ID:btry,项目名称:glpi,代码行数:8,代码来源:reservation.class.php

示例5:

 /**
  * @since version 0.84
  *
  * @see CommonDBChild::post_addItem()
  **/
 function post_addItem()
 {
     parent::post_addItem();
     if (isset($this->input['rules_id']) && ($realrule = Rule::getRuleObjectByID($this->input['rules_id']))) {
         $realrule->update(array('id' => $this->input['rules_id'], 'date_mod' => $_SESSION['glpi_currenttime']));
     }
 }
开发者ID:korial29,项目名称:glpi,代码行数:12,代码来源:rulecriteria.class.php

示例6:

 function post_addItem()
 {
     Infocom::cloneItem('CartridgeItem', $this->fields["cartridgeitems_id"], $this->fields['id'], $this->getType());
     parent::post_addItem();
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:5,代码来源:cartridge.class.php

示例7:

 function post_addItem()
 {
     global $DB;
     // if default is set : unset others for the users
     if (isset($this->fields['is_default']) && $this->fields["is_default"] == 1) {
         $query = "UPDATE " . $this->getTable() . "\n                   SET `is_default` = '0'\n                   WHERE `id` <> '" . $this->fields['id'] . "'\n                         AND `users_id` = '" . $this->fields['users_id'] . "'";
         $DB->query($query);
     }
     parent::post_addItem();
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:10,代码来源:useremail.class.php

示例8: array

 function post_addItem()
 {
     global $CFG_GLPI;
     $item = new static::$itemtype();
     $mailsend = false;
     if ($item->getFromDB($this->fields[static::$items_id])) {
         // Set global validation to waiting
         if ($item->fields['global_validation'] == self::ACCEPTED || $item->fields['global_validation'] == self::NONE) {
             $input['id'] = $this->fields[static::$items_id];
             $input['global_validation'] = self::WAITING;
             // to fix lastupdater
             if (isset($this->input['_auto_update'])) {
                 $input['_auto_update'] = $this->input['_auto_update'];
             }
             // to know update by rules
             if (isset($this->input["_rule_process"])) {
                 $input['_rule_process'] = $this->input["_rule_process"];
             }
             // No update ticket notif on ticket add
             if (isset($this->input["_ticket_add"])) {
                 $input['_disablenotif'] = true;
             }
             $item->update($input);
         }
         if ($CFG_GLPI["use_mailing"]) {
             $options = array('validation_id' => $this->fields["id"], 'validation_status' => $this->fields["status"]);
             $mailsend = NotificationEvent::raiseEvent('validation', $item, $options);
         }
         if ($mailsend) {
             $user = new User();
             $user->getFromDB($this->fields["users_id_validate"]);
             $email = $user->getDefaultEmail();
             if (!empty($email)) {
                 $message[] = sprintf(__('Approval request send to %s'), $user->getName());
             } else {
                 $error[] = sprintf(__('The selected user (%s) has no valid email address. The request has been created, without email confirmation.'), $user->getName());
             }
         }
     }
     parent::post_addItem();
 }
开发者ID:pvasener,项目名称:glpi,代码行数:41,代码来源:commonitilvalidation.class.php


注:本文中的CommonDBChild::post_addItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。