diff --git a/api/index.php b/api/index.php index eb79422f9..1b713d561 100644 --- a/api/index.php +++ b/api/index.php @@ -18,8 +18,8 @@ require_once "functions.php"; require_once "sessions.php"; - ini_set('session.use_cookies', 0); - ini_set("session.gc_maxlifetime", 86400); + ini_set('session.use_cookies', "0"); + ini_set("session.gc_maxlifetime", "86400"); ob_start(); diff --git a/classes/api.php b/classes/api.php index 03eea1927..5677cb908 100755 --- a/classes/api.php +++ b/classes/api.php @@ -292,7 +292,7 @@ class API extends Handler { $sanitize_content = !isset($_REQUEST["sanitize"]) || self::_param_to_bool($_REQUEST["sanitize"]); - if ($article_ids) { + if (count($article_ids) > 0) { $article_qmarks = arr_qmarks($article_ids); diff --git a/classes/digest.php b/classes/digest.php index 77eb92c54..e0c23d705 100644 --- a/classes/digest.php +++ b/classes/digest.php @@ -1,12 +1,6 @@ addBlock('enclosure'); } } else { - $tpl->setVariable('ARTICLE_ENCLOSURE_URL', null, true); - $tpl->setVariable('ARTICLE_ENCLOSURE_TYPE', null, true); - $tpl->setVariable('ARTICLE_ENCLOSURE_LENGTH', null, true); + $tpl->setVariable('ARTICLE_ENCLOSURE_URL', "", true); + $tpl->setVariable('ARTICLE_ENCLOSURE_TYPE', "", true); + $tpl->setVariable('ARTICLE_ENCLOSURE_LENGTH', "", true); } list ($og_image, $og_stream) = Article::_get_image($enclosures, $line['content'], $feed_site_url); @@ -207,8 +207,8 @@ class Handler_Public extends Handler { $article['content'] = Sanitizer::sanitize($line["content"], false, $owner_uid, $feed_site_url, false, $line["id"]); $article['updated'] = date('c', strtotime($line["updated"])); - if ($line['note']) $article['note'] = $line['note']; - if ($article['author']) $article['author'] = $line['author']; + if (!empty($line['note'])) $article['note'] = $line['note']; + if (!empty($line['author'])) $article['author'] = $line['author']; if (count($line["tags"]) > 0) { $article['tags'] = array(); diff --git a/classes/pluginhost.php b/classes/pluginhost.php index a05938111..5121c8491 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -108,8 +108,9 @@ class PluginHost { return false; } + // needed for compatibility with API 2 (?) function get_dbh() { - return Db::get(); + return false; } function get_pdo(): PDO { diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index a26281fee..adb249dac 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -311,13 +311,6 @@ class Pref_Prefs extends Handler_Protected { - -
- - -
- -