Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 /**
  * 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;
 }