diff --git a/author.php b/author.php index 60235fb..9c19021 100644 --- a/author.php +++ b/author.php @@ -68,8 +68,7 @@ order by substr (upper (sort), 1, 1)'); } public static function getEntryArray ($query, $params) { - $result = parent::executeQuery ($query, self::AUTHOR_COLUMNS, "", $params, -1); - $result = $result [1]; + list (, $result) = parent::executeQuery ($query, self::AUTHOR_COLUMNS, "", $params, -1); $entryArray = array(); while ($post = $result->fetchObject ()) { diff --git a/book.php b/book.php index bde90c1..8408396 100644 --- a/book.php +++ b/book.php @@ -567,8 +567,7 @@ order by substr (upper (sort), 1, 1)"); public static function getAllRecentBooks() { global $config; - $entryArray = self::getEntryArray (self::SQL_BOOKS_RECENT . $config['cops_recentbooks_limit'], array (), -1); - $entryArray = $entryArray [0]; + list ($entryArray, ) = self::getEntryArray (self::SQL_BOOKS_RECENT . $config['cops_recentbooks_limit'], array (), -1); return $entryArray; } diff --git a/feed.php b/feed.php index 62b295c..c20dbaa 100644 --- a/feed.php +++ b/feed.php @@ -41,5 +41,4 @@ $currentPage->InitializeContent (); echo $OPDSRender->render ($currentPage); return; - break; } diff --git a/rating.php b/rating.php index d8af5bf..1a863eb 100644 --- a/rating.php +++ b/rating.php @@ -43,7 +43,7 @@ class Rating extends Base { } public static function getEntryArray ($query, $params) { - list ($totalNumber, $result) = parent::executeQuery ($query, self::RATING_COLUMNS, "", $params, -1); + list (, $result) = parent::executeQuery ($query, self::RATING_COLUMNS, "", $params, -1); $entryArray = array(); while ($post = $result->fetchObject ()) { diff --git a/sendtomail.php b/sendtomail.php index f09315f..a74915b 100644 --- a/sendtomail.php +++ b/sendtomail.php @@ -28,6 +28,8 @@ function checkRequest ($idData, $emailDest) { if (php_sapi_name() === 'cli') { return; } +global $config; + if ($error = checkConfiguration ()) { echo $error; exit;