Browse Source

Fix warnings an code enhancement.

master
Sébastien Lucas 10 years ago
parent
commit
133b6dc9d6
5 changed files with 5 additions and 6 deletions
  1. +1
    -2
      author.php
  2. +1
    -2
      book.php
  3. +0
    -1
      feed.php
  4. +1
    -1
      rating.php
  5. +2
    -0
      sendtomail.php

+ 1
- 2
author.php View File

@@ -68,8 +68,7 @@ order by substr (upper (sort), 1, 1)');
} }


public static function getEntryArray ($query, $params) { 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(); $entryArray = array();
while ($post = $result->fetchObject ()) while ($post = $result->fetchObject ())
{ {


+ 1
- 2
book.php View File

@@ -567,8 +567,7 @@ order by substr (upper (sort), 1, 1)");


public static function getAllRecentBooks() { public static function getAllRecentBooks() {
global $config; 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; return $entryArray;
} }




+ 0
- 1
feed.php View File

@@ -41,5 +41,4 @@
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
echo $OPDSRender->render ($currentPage); echo $OPDSRender->render ($currentPage);
return; return;
break;
} }

+ 1
- 1
rating.php View File

@@ -43,7 +43,7 @@ class Rating extends Base {
} }


public static function getEntryArray ($query, $params) { 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(); $entryArray = array();
while ($post = $result->fetchObject ()) while ($post = $result->fetchObject ())
{ {


+ 2
- 0
sendtomail.php View File

@@ -28,6 +28,8 @@ function checkRequest ($idData, $emailDest) {


if (php_sapi_name() === 'cli') { return; } if (php_sapi_name() === 'cli') { return; }


global $config;

if ($error = checkConfiguration ()) { if ($error = checkConfiguration ()) {
echo $error; echo $error;
exit; exit;


Loading…
Cancel
Save