Merge pull request #4021 from zeroadam/ConfigFalse
Update false evaluations
This commit is contained in:
commit
b9387c0a63
2
boot.php
2
boot.php
|
@ -742,7 +742,7 @@ function run_update_function($x)
|
||||||
// delete the config entry to try again.
|
// delete the config entry to try again.
|
||||||
|
|
||||||
$t = Config::get('database', 'update_' . $x);
|
$t = Config::get('database', 'update_' . $x);
|
||||||
if ($t !== false) {
|
if (!is_null($t)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Config::set('database', 'update_' . $x, time());
|
Config::set('database', 'update_' . $x, time());
|
||||||
|
|
|
@ -209,7 +209,7 @@ function nav_info(App $a)
|
||||||
|
|
||||||
// Provide a banner/logo/whatever
|
// Provide a banner/logo/whatever
|
||||||
$banner = Config::get('system', 'banner');
|
$banner = Config::get('system', 'banner');
|
||||||
if ($banner === false) {
|
if (is_null($banner)) {
|
||||||
$banner = '<a href="https://friendi.ca"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>';
|
$banner = '<a href="https://friendi.ca"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,8 @@ function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = array())
|
||||||
if (x($opts, 'timeout')) {
|
if (x($opts, 'timeout')) {
|
||||||
@curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']);
|
@curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']);
|
||||||
} else {
|
} else {
|
||||||
$curl_time = intval(Config::get('system', 'curl_timeout'));
|
$curl_time = Config::get('system', 'curl_timeout', 60);
|
||||||
@curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
|
@curl_setopt($ch, CURLOPT_TIMEOUT, intval($curl_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
// by default we will allow self-signed certs
|
// by default we will allow self-signed certs
|
||||||
|
@ -302,8 +302,8 @@ function post_url($url, $params, $headers = null, &$redirects = 0, $timeout = 0)
|
||||||
if (intval($timeout)) {
|
if (intval($timeout)) {
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
|
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
|
||||||
} else {
|
} else {
|
||||||
$curl_time = intval(Config::get('system', 'curl_timeout'));
|
$curl_time = Config::get('system', 'curl_timeout', 60);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
|
curl_setopt($ch, CURLOPT_TIMEOUT, intval($curl_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('LIGHTTPD')) {
|
if (defined('LIGHTTPD')) {
|
||||||
|
|
|
@ -26,9 +26,11 @@ class Feature
|
||||||
if ($x === false) {
|
if ($x === false) {
|
||||||
$x = PConfig::get($uid, 'feature', $feature, false);
|
$x = PConfig::get($uid, 'feature', $feature, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($x === false) {
|
if ($x === false) {
|
||||||
$x = Config::get('feature', $feature, false);
|
$x = Config::get('feature', $feature, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($x === false) {
|
if ($x === false) {
|
||||||
$x = self::getDefault($feature);
|
$x = self::getDefault($feature);
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ class FKOAuthDataStore extends OAuthDataStore
|
||||||
dba::delete('tokens', array('id' => $token->key));
|
dba::delete('tokens', array('id' => $token->key));
|
||||||
|
|
||||||
|
|
||||||
if (!is_null($ret) && $uverifier !== false) {
|
if (!is_null($ret) && !is_null($uverifier)) {
|
||||||
Config::delete("oauth", $verifier);
|
Config::delete("oauth", $verifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,8 +91,8 @@ Class OnePoll
|
||||||
$t = $contact['last-update'];
|
$t = $contact['last-update'];
|
||||||
|
|
||||||
if ($contact['subhub']) {
|
if ($contact['subhub']) {
|
||||||
$poll_interval = Config::get('system', 'pushpoll_frequency');
|
$poll_interval = Config::get('system', 'pushpoll_frequency', 3);
|
||||||
$contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
|
$contact['priority'] = intval($poll_interval);
|
||||||
$hub_update = false;
|
$hub_update = false;
|
||||||
|
|
||||||
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
|
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
|
||||||
|
|
|
@ -110,13 +110,13 @@ EOT;
|
||||||
function get_vier_config($key, $default = false, $admin = false) {
|
function get_vier_config($key, $default = false, $admin = false) {
|
||||||
if (local_user() && !$admin) {
|
if (local_user() && !$admin) {
|
||||||
$result = PConfig::get(local_user(), "vier", $key);
|
$result = PConfig::get(local_user(), "vier", $key);
|
||||||
if ($result !== false) {
|
if (!is_null($result)) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = Config::get("vier", $key);
|
$result = Config::get("vier", $key);
|
||||||
if ($result !== false) {
|
if (!is_null($result)) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue