diff --git a/Changelog b/Changelog index e68e34b73..908880f57 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2016-03-08 DariusIII + * Upd: Many changes related to composer * Upd: Update smarty handling in composer.json * Fix: Remove require for GiantBomb as it should be handled by composer * Fix: Fix errors related to changes to libraries. diff --git a/autoloader.php b/autoloader.php index 9250473b5..c3f8dfd96 100755 --- a/autoloader.php +++ b/autoloader.php @@ -18,14 +18,14 @@ * @author niel * @copyright 2014 nZEDb */ - +/* spl_autoload_register( function ($class) { // Only continue if the class is in our namespace. - if (strpos($class, 'newznab\\') === 0) { + if (strpos($class, 'nzedb\\') === 0) { // Replace namespace separators with directory separators in the class name, append // with .php - $file = NN_ROOT . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; + $file = nZEDb_ROOT . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; // if the file exists, require it if (file_exists($file)) { @@ -34,5 +34,6 @@ spl_autoload_register( } } ); - +*/ +require_once 'vendor/autoload.php' ?> diff --git a/cli/update_db.php b/cli/update_db.php index 8dc043ab4..47d2c3db5 100644 --- a/cli/update_db.php +++ b/cli/update_db.php @@ -19,7 +19,6 @@ * @copyright 2014 nZEDb */ require_once realpath(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'indexer.php'); -require_once NN_LIBS . DIRECTORY_SEPARATOR . 'smarty' . DIRECTORY_SEPARATOR . 'Smarty.class.php'; use newznab\db\DbUpdate; use newznab\utility\Utility; diff --git a/composer.json b/composer.json index bfda02eaf..a9abd2788 100755 --- a/composer.json +++ b/composer.json @@ -1,9 +1,5 @@ { "repositories": [ - { - "type": "vcs", - "url": "https://github.com/JPinkney/TVMaze-PHP-API-Wrapper" - }, { "type": "vcs", "url": "https://github.com/kbjr/Git.php" @@ -11,9 +7,17 @@ ], "autoload": { - "psr-0": { - "libs\\": "libs/" - } + "psr-4": { + "newznab\\": "newznab/" + }, + + "classmap": [ + "www/pages/", + "libs/pixelead0/Tmdb/", + "libs/PEAR/Net_NNTP/NNTP/", + "libs/zeebinz/rarinfo/", + "libs/" + ] }, "description": "A Usenet Indexer", diff --git a/composer.lock b/composer.lock index c3b0e7023..4165f133a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "0a3f84f9d5db96b9186c06d0c96ef1ce", - "content-hash": "2712a32ca345e3388bbf24a4cc19e504", + "hash": "1a3c5a32761ec995c50fae5b1593ca73", + "content-hash": "5010febeee39df8e4e330d1ff4315651", "packages": [ { "name": "barracudanetworks/forkdaemon-php", @@ -258,6 +258,7 @@ "JPinkney": "" } }, + "notification-url": "https://packagist.org/downloads/", "authors": [ { "name": "Josh Pinkney", @@ -265,10 +266,6 @@ } ], "description": "TVMaze-API-Wrapper", - "support": { - "source": "https://github.com/JPinkney/TVMaze-PHP-API-Wrapper/tree/master", - "issues": "https://github.com/JPinkney/TVMaze-PHP-API-Wrapper/issues" - }, "time": "2016-03-08 02:23:27" }, { @@ -299,16 +296,16 @@ }, { "name": "moinax/tvdb", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/Moinax/TvDb.git", - "reference": "7ddf816552966fcc75c85bb7f92ce4c6c9190dc2" + "reference": "68204c72efe99945cd49fe99ac23c8f9b068f2d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Moinax/TvDb/zipball/7ddf816552966fcc75c85bb7f92ce4c6c9190dc2", - "reference": "7ddf816552966fcc75c85bb7f92ce4c6c9190dc2", + "url": "https://api.github.com/repos/Moinax/TvDb/zipball/68204c72efe99945cd49fe99ac23c8f9b068f2d6", + "reference": "68204c72efe99945cd49fe99ac23c8f9b068f2d6", "shasum": "" }, "require": { @@ -335,7 +332,7 @@ "keywords": [ "api" ], - "time": "2016-02-03 08:52:14" + "time": "2016-03-08 12:37:26" }, { "name": "phpmailer/phpmailer", diff --git a/indexer.php b/indexer.php index 408b6309f..7e3c17b55 100644 --- a/indexer.php +++ b/indexer.php @@ -20,8 +20,8 @@ */ require_once 'constants.php'; require_once 'autoloader.php'; -require_once 'libs/autoloader.php'; -require_once 'vendor/autoload.php'; +//require_once 'libs/autoloader.php'; +//require_once 'vendor/autoload.php'; use newznab\config\Configure; use newznab\utility\Utility; diff --git a/libs/autoloader.php b/libs/autoloader.php deleted file mode 100644 index 43b58db04..000000000 --- a/libs/autoloader.php +++ /dev/null @@ -1,63 +0,0 @@ -isDir() && !$fileInfo->isDot()) { - $file = $fileInfo->getPathname() . DIRECTORY_SEPARATOR . $filename; - if (file_exists($file) && is_readable($file)) { - require_once $file; - } - } - } - } - } -); - -?> \ No newline at end of file diff --git a/misc/testing/Tests/test_giantbomb_API.php b/misc/testing/Tests/test_giantbomb_API.php index c76f25947..64852c9ce 100755 --- a/misc/testing/Tests/test_giantbomb_API.php +++ b/misc/testing/Tests/test_giantbomb_API.php @@ -1,6 +1,5 @@