Ejemplo n.º 1
0
 public function apiKey()
 {
     if (self::$apiKey === null) {
         self::$apiKey = mUserdata::getGlobalSettingValue("OWMApiKey", "");
     }
     return self::$apiKey;
 }
Ejemplo n.º 2
0
    $_SERVER["HTTP_HOST"] = $argv[1];
    Environment::reset();
    Session::reloadDBData();
    if (!$e->useUser()) {
        #echo "Kein Benutzer!\n";
        DBStorage::disconnect();
        continue;
    }
    $ek = Util::eK();
    if ($lastUser == $ek) {
        throw new Exception("Changing cloud failed!");
    }
    if ($lastDir == FileStorage::getFilesDir()) {
        throw new Exception("Changing cloud failed!");
    }
    $e->addClassPath(FileStorage::getFilesDir());
    try {
        OpenWeatherMap::$apiKey = null;
        mOpenWeatherMap::update();
    } catch (FieldDoesNotExistException $ex) {
        echo $zugang . " " . get_class($ex) . ": " . $ex->getField() . "\n";
    } catch (Exception $ex) {
        echo $zugang . " " . get_class($ex) . ": " . $ex->getMessage() . "\n";
    }
    $lastUser = $ek;
    $lastDir = FileStorage::getFilesDir();
    DBStorage::disconnect();
}
$e->cleanUp();
flock($fp, LOCK_UN);
fclose($fp);