cloneProject() static public method

Duplicate all costs from a project template to its clone
static public cloneProject ( $oldid, $newid )
$oldid
$newid
示例#1
0
 function post_addItem()
 {
     global $DB, $CFG_GLPI;
     // Manage add from template
     if (isset($this->input["_oldID"])) {
         ProjectCost::cloneProject($this->input["_oldID"], $this->fields['id']);
     }
     if ($CFG_GLPI["use_mailing"]) {
         // Clean reload of the project
         $this->getFromDB($this->fields['id']);
         NotificationEvent::raiseEvent('new', $this);
     }
 }