forked from seblucas/cops
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Composer autoloader where possible.
- Loading branch information
Showing
20 changed files
with
13 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
*/ | ||
|
||
require_once ("base.php"); | ||
require_once ("book.php"); | ||
|
||
class JSONRenderer | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
|
||
class Author extends Base { | ||
const ALL_AUTHORS_ID = "cops:authors"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
* @author S�bastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once 'config.php'; | ||
|
||
define ("VERSION", "1.0.0RC4"); | ||
define ("DB", "db"); | ||
date_default_timezone_set($config['default_timezone']); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,6 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
require_once('serie.php'); | ||
require_once('author.php'); | ||
require_once('rating.php'); | ||
require_once('publisher.php'); | ||
require_once('tag.php'); | ||
require_once('language.php'); | ||
require_once("customcolumn.php"); | ||
require_once('data.php'); | ||
require_once('resources/php-epub-meta/epub.php'); | ||
|
||
// Silly thing because PHP forbid string concatenation in class const | ||
define ('SQL_BOOKS_LEFT_JOIN', "left outer join comments on comments.book = books.id | ||
left outer join books_ratings_link on books_ratings_link.book = books.id | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once dirname(__FILE__) . '/vendor/autoload.php'; | ||
require_once 'config_default.php'; | ||
if (file_exists(dirname(__FILE__) . '/config_local.php') && (php_sapi_name() !== 'cli')) { | ||
require_once 'config_local.php'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
|
||
class CustomColumn extends Base { | ||
const ALL_CUSTOMS_ID = "cops:custom"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
|
||
class Data extends Base { | ||
public $id; | ||
public $name; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
*/ | ||
|
||
require_once ("config.php"); | ||
require_once ("book.php"); | ||
require_once ("data.php"); | ||
|
||
global $config; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,7 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
|
||
class language extends Base { | ||
class Language extends Base { | ||
const ALL_LANGUAGES_ID = "cops:languages"; | ||
|
||
public $id; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
* @author At Libitum <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
|
||
class Publisher extends Base { | ||
const ALL_PUBLISHERS_ID = "cops:publishers"; | ||
const PUBLISHERS_COLUMNS = "publishers.id as id, publishers.name as name, count(*) as count"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
|
||
class Serie extends Base { | ||
const ALL_SERIES_ID = "cops:series"; | ||
const SERIES_COLUMNS = "series.id as id, series.name as name, series.sort as sort, count(*) as count"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,7 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
require_once('base.php'); | ||
|
||
class tag extends Base { | ||
class Tag extends Base { | ||
const ALL_TAGS_ID = "cops:tags"; | ||
const TAG_COLUMNS = "tags.id as id, tags.name as name, count(*) as count"; | ||
const SQL_ALL_TAGS = "select {0} from tags, books_tags_link where tags.id = tag group by tags.id, tags.name order by tags.name"; | ||
|