public function setApiKey($apiKey) { $db = WCF::getDB(); $query = "update wcf" . WCF_N . "_option SET optionValue = ? WHERE optionName = 'wbb_tapatalk_api_key'"; $statement = $db->prepareStatement($query); $statement->execute(array($apiKey)); if ($db->getErrorNumber() != 00) { return false; } OptionEditor::rebuild(); return true; }
/** * Loads the options file, automatically created if not exists. */ protected function loadOptions() { $filename = WCF_DIR . 'options.inc.php'; // create options file if doesn't exist if (!file_exists($filename) || filemtime($filename) <= 1) { OptionEditor::rebuild(); } require_once $filename; }