aboutsummaryrefslogtreecommitdiff
path: root/p/api
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-02-28 12:26:24 +0100
committerGravatar GitHub <noreply@github.com> 2021-02-28 12:26:24 +0100
commit947e918f05d70d5dce4efa4ef403e593581c3fa9 (patch)
treee66ef1ffe8a6cc0ffbea1bff1791588f72879637 /p/api
parentbf2718cada964fba66d8497592abcb73cb9520ba (diff)
Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
Diffstat (limited to 'p/api')
-rw-r--r--p/api/fever.php4
-rw-r--r--p/api/greader.php14
2 files changed, 11 insertions, 7 deletions
diff --git a/p/api/fever.php b/p/api/fever.php
index ae9e45084..8d1ba169f 100644
--- a/p/api/fever.php
+++ b/p/api/fever.php
@@ -13,7 +13,7 @@
// ================================================================================================
// BOOTSTRAP FreshRSS
require(__DIR__ . '/../../constants.php');
-require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
+require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
FreshRSS_Context::initSystem();
// check if API is enabled globally
@@ -506,7 +506,7 @@ class FeverAPI
if (!ctype_digit($max_id)) {
$max_id = null;
}
- } else if (isset($_REQUEST['with_ids'])) {
+ } elseif (isset($_REQUEST['with_ids'])) {
$entry_ids = explode(',', $_REQUEST['with_ids']);
} else {
// use the since_id argument to request the next $item_limit items
diff --git a/p/api/greader.php b/p/api/greader.php
index a1665b952..a2542adef 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -147,7 +147,8 @@ function checkCompatibility() {
}
function authorizationToUser() {
- $headerAuth = headerVariable('Authorization', 'GoogleLogin_auth'); //Input is 'GoogleLogin auth', but PHP replaces spaces by '_' http://php.net/language.variables.external
+ //Input is 'GoogleLogin auth', but PHP replaces spaces by '_' http://php.net/language.variables.external
+ $headerAuth = headerVariable('Authorization', 'GoogleLogin_auth');
if ($headerAuth != '') {
$headerAuthX = explode('/', $headerAuth, 2);
if (count($headerAuthX) === 2) {
@@ -864,7 +865,7 @@ function editTag($e_ids, $a, $r) {
function renameTag($s, $dest) {
if ($s != '' && strpos($s, 'user/-/label/') === 0 &&
- $dest != '' && strpos($dest, 'user/-/label/') === 0) {
+ $dest != '' && strpos($dest, 'user/-/label/') === 0) {
$s = substr($s, 13);
$s = htmlspecialchars($s, ENT_COMPAT, 'UTF-8');
$dest = substr($dest, 13);
@@ -990,8 +991,10 @@ if ($pathInfos[1] === 'accounts') {
* request, but xt appears in other listing requests). */
$exclude_target = isset($_GET['xt']) ? $_GET['xt'] : '';
$filter_target = isset($_GET['it']) ? $_GET['it'] : '';
- $count = isset($_GET['n']) ? intval($_GET['n']) : 20; //n=[integer] : The maximum number of results to return.
- $order = isset($_GET['r']) ? $_GET['r'] : 'd'; //r=[d|n|o] : Sort order of item results. d or n gives items in descending date order, o in ascending order.
+ //n=[integer] : The maximum number of results to return.
+ $count = isset($_GET['n']) ? intval($_GET['n']) : 20;
+ //r=[d|n|o] : Sort order of item results. d or n gives items in descending date order, o in ascending order.
+ $order = isset($_GET['r']) ? $_GET['r'] : 'd';
/* ot=[unix timestamp] : The time from which you want to retrieve
* items. Only items that have been crawled by Google Reader after
* this time will be returned. */
@@ -1030,7 +1033,8 @@ if ($pathInfos[1] === 'accounts') {
if ($pathInfos[9] === 'com.google' && isset($pathInfos[10])) {
if ($pathInfos[10] === 'reading-list' || $pathInfos[10] === 'starred') {
$include_target = '';
- streamContents($pathInfos[10], $include_target, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation);
+ streamContents($pathInfos[10], $include_target, $start_time, $stop_time, $count, $order,
+ $filter_target, $exclude_target, $continuation);
}
}
} elseif ($pathInfos[8] === 'label') {