/** * @see \wcf\data\IEditableObject::update() */ public function update(array $parameters = array()) { if (isset($parameters['showOrder'])) { $this->updateShowOrder($parameters['showOrder']); } parent::update($parameters); }
/** * @see wcf\data\DatabaseObjectEditor::update() */ public function update(array $parameters = array()) { parent::update($parameters); if (isset($parameters['templateGroupFolderName']) && $parameters['templateGroupFolderName'] != $this->templateGroupFolderName) { $this->renameFolders($parameters['templateGroupFolderName']); } }
/** * @see wcf\data\DatabaseObjectEditor::create() */ public function update(array $parameters = array()) { if (isset($parameters['userID']) && !$parameters['userID']) { $parameters['userID'] = null; } return parent::update($parameters); }
/** * @see \wcf\data\IEditableObject::update() */ public function update(array $parameters = array()) { parent::update($parameters); // alter the table "wcf".WCF_N."_user_option_value" with this new option if (isset($parameters['optionType']) && $parameters['optionType'] != $this->optionType) { WCF::getDB()->getEditor()->alterColumn('wcf' . WCF_N . '_user_option_value', 'userOption' . $this->optionID, 'userOption' . $this->optionID, self::getColumnDefinition($parameters['optionType'])); } }
/** * @see \wcf\data\DatabaseObjectEditor::update() */ public function update(array $parameters = array()) { // update salt and create new password hash if (isset($parameters['password']) && $parameters['password'] !== '') { $parameters['password'] = PasswordUtil::getDoubleSaltedHash($parameters['password']); $parameters['accessToken'] = StringUtil::getRandomID(); // update accessToken $this->accessToken = $parameters['accessToken']; } else { unset($parameters['password'], $parameters['accessToken']); } parent::update($parameters); }
/** * @see wcf\data\IEditableObject::update() */ public function update(array $parameters = array()) { // update show order if (isset($parameters['parentCategoryID']) || isset($parameters['showOrder'])) { if (!isset($parameters['parentCategoryID'])) { $parameters['parentCategoryID'] = $this->parentCategoryID; } if (!isset($parameters['showOrder'])) { $parameters['showOrder'] = $this->showOrder; } $parameters['showOrder'] = $this->updateShowOrder($parameters['parentCategoryID'], $parameters['showOrder']); } parent::update($parameters); }
/** * @see \wcf\data\DatabaseObjectEditor::update() */ public function update(array $parameters = array()) { parent::update($parameters); if (isset($parameters['templateGroupFolderName']) && $parameters['templateGroupFolderName'] != $this->templateGroupFolderName) { @rename(WCF_DIR . 'templates/' . $this->templateGroupFolderName, WCF_DIR . 'templates/' . $parameters['templateGroupFolderName']); // check template group folders in other applications $sql = "SELECT\tDISTINCT application\n\t\t\t\tFROM\twcf" . WCF_N . "_template\n\t\t\t\tWHERE\ttemplateGroupID = ?\n\t\t\t\t\tAND application <> ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array($this->templateGroupID, 'wcf')); while ($row = $statement->fetchArray()) { $application = ApplicationHandler::getInstance()->getApplication($row['application']); $package = PackageCache::getInstance()->getPackage($application->packageID); @rename(WCF_DIR . $package->packageDir . 'templates/' . $this->templateGroupFolderName, WCF_DIR . $package->packageDir . 'templates/' . $parameters['templateGroupFolderName']); } } }
/** * @see \wcf\data\IEditableObject::update() */ public function update(array $parameters = array()) { $variables = null; if (isset($parameters['variables'])) { $variables = $parameters['variables']; unset($parameters['variables']); } // update style data parent::update($parameters); // update variables if ($variables !== null) { $this->setVariables($variables); } // scale preview image if (!empty($parameters['image']) && $parameters['image'] != $this->image) { self::scalePreviewImage($parameters['image']); } }
/** * @see wcf\data\IEditableObject::update() * * @todo Handle language id and update related language item */ public function update(array $parameters = array()) { 1 == 0; // TODO: fix me (avoid sniffing error) parent::update($parameters); }