Many composer fixes

This commit is contained in:
DariusIII
2016-03-08 23:39:31 +01:00
parent 03a89a11e2
commit 873bbbfd6f
27 changed files with 29 additions and 128 deletions
+1
View File
@@ -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.
+5 -4
View File
@@ -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'
?>
-1
View File
@@ -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;
+11 -7
View File
@@ -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",
Generated
+8 -11
View File
@@ -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",
+2 -2
View File
@@ -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;
-63
View File
@@ -1,63 +0,0 @@
<?php
/**
* PSR-0 compliant autoloader for libs
*
* @param string $class The fully-qualified class name.
*
* @return void
*/
spl_autoload_register(
function ($class) {
// Only continue if the class is in our namespace.
if (strpos($class, 'libs\\') === 0) {
// Replace namespace separators with directory separators in the class name, append
// with .php
$file = NN_ROOT . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require_once $file;
}
}
}
);
/**
*
* @param string $class The fully-qualified class name.
*
* @return void
*/
spl_autoload_register(
function($class) {
// base directory for the namespace prefix
$base_dir = __DIR__ . DIRECTORY_SEPARATOR;
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = $base_dir . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
// if the file exists, require it
if (file_exists($file) && is_readable($file)) {
require_once $file;
} else {
// Let's try the old style format with 'class.' prefixed to the lower-cased filename.
// This bypasses the concept of a Vendor namespace as older libs don't use it.
$filename = 'class.' . strtolower($class) . '.php';
$DirIterator = new \DirectoryIterator($base_dir);
foreach ($DirIterator as $fileInfo) {
if ($fileInfo->isDir() && !$fileInfo->isDot()) {
$file = $fileInfo->getPathname() . DIRECTORY_SEPARATOR . $filename;
if (file_exists($file) && is_readable($file)) {
require_once $file;
}
}
}
}
}
);
?>
@@ -1,6 +1,5 @@
<?php
require_once realpath(dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'indexer.php');
require_once NN_LIBS . 'GiantBombAPI.php';
// Test if your giantbomb key is working.
-1
View File
@@ -1,7 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
class ADM
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
class AEBN
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
class Desura
-1
View File
@@ -1,6 +1,5 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
class Hotmovies
{
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
class IAFD
-1
View File
@@ -1,6 +1,5 @@
<?php
namespace newznab;
require_once NN_LIBS . DS . 'smarty/Smarty.class.php';
/**
* This class represents each page during installation.
-1
View File
@@ -3,7 +3,6 @@ namespace newznab;
/**
* Attempt to include PEAR's nntp class if it has not already been included.
*/
require_once NN_LIBS . 'PEAR/Net_NNTP/NNTP/Client.php';
use newznab\db\Settings;
use newznab\utility\Utility;
-3
View File
@@ -4,9 +4,6 @@ use newznab\db\Settings;
use \newznab\processing\PostProcess;
use newznab\utility\Utility;
require_once NN_LIBS . 'zeebinz/rarinfo/par2info.php';
require_once NN_LIBS . 'zeebinz/rarinfo/sfvinfo.php';
/**
* Class Nfo
* Class for handling fetching/storing of NFO files.
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
class Popporn
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\db\Settings;
/**
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'ZipFile.php';
use newznab\db\Settings;
use newznab\utility\Utility;
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace newznab;
require_once NN_LIBS . 'simple_html_dom.php';
use newznab\utility\Utility;
class Steam
-2
View File
@@ -20,8 +20,6 @@
*/
namespace newznab\config;
require_once NN_LIBS . 'autoloader.php';
class Configure
{
private $environments = [
-3
View File
@@ -24,9 +24,6 @@ use newznab\processing\post\ProcessAdditional;
use newznab\SpotNab;
use newznab\utility\Utility;
require_once NN_LIBS . 'zeebinz/rarinfo/par2info.php';
require_once NN_LIBS . 'zeebinz/rarinfo/srrinfo.php';
class PostProcess
{
/**
@@ -1,10 +1,6 @@
<?php
namespace newznab\processing\post;
require_once NN_LIBS . 'zeebinz/rarinfo/archiveinfo.php';
require_once NN_LIBS . 'zeebinz/rarinfo/par2info.php';
require_once NN_LIBS . 'zeebinz/rarinfo/srrinfo.php';
use newznab\db\Settings;
use newznab\utility\Utility;
use newznab\NZB;
-3
View File
@@ -1,8 +1,5 @@
<?php
Smarty_Autoloader::register();
require_once NN_LIB . 'utility' . DS . 'SmartyUtils.php';
use newznab\db\Settings;
use newznab\Users;
use newznab\SABnzbd;
+2 -2
View File
@@ -20,7 +20,7 @@
*/
require_once realpath(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'constants.php');
require_once realpath(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'autoloader.php');
require_once 'autoloader.php';
//require_once 'autoloader.php';
use newznab\config\Configure;
@@ -46,7 +46,7 @@ if (function_exists('ini_set') && function_exists('ini_get')) {
}
// Path to smarty files. (not prefixed with NN as the name is needed in smarty files).
define('SMARTY_DIR', NN_LIBS . 'smarty' . DS);
//define('SMARTY_DIR', NN_LIBS . 'smarty' . DS);
$www_top = str_replace("\\", "/", dirname($_SERVER['PHP_SELF']));
if (strlen($www_top) == 1) {