mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 03:08:53 +00:00
Add changes from nZEDb. Update automated.config.php and settings.php.example.
This commit is contained in:
@@ -419,6 +419,9 @@ class Film
|
||||
$newArr = [];
|
||||
$i = 0;
|
||||
foreach ($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
continue;
|
||||
}
|
||||
if ($i > 5) {
|
||||
break;
|
||||
} //only use first 6
|
||||
|
||||
@@ -321,6 +321,9 @@ class Games
|
||||
$newArr = array();
|
||||
$i = 0;
|
||||
foreach ($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
continue;
|
||||
}
|
||||
// Only use first 6.
|
||||
if ($i > 5) {
|
||||
break;
|
||||
|
||||
@@ -278,6 +278,9 @@ class Konsole
|
||||
$newArr = array();
|
||||
$i = 0;
|
||||
foreach ($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
continue;
|
||||
}
|
||||
// Only use first 6.
|
||||
if ($i > 5) {
|
||||
break;
|
||||
|
||||
@@ -54,7 +54,7 @@ class Movie
|
||||
$this->apikey = $site->tmdbkey;
|
||||
$this->lookuplanguage = $site->lookuplanguage;
|
||||
$this->pdo = new DB();
|
||||
$this->imgSavePath = WWW_DIR.'covers/movies/';
|
||||
$this->imgSavePath = NN_COVERS . 'movies' . DS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -378,6 +378,9 @@ class Movie
|
||||
$newArr = array();
|
||||
$i = 0;
|
||||
foreach($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
continue;
|
||||
}
|
||||
if ($i > 5) { break; } //only use first 6
|
||||
$newArr[] = '<a href="'.WWW_TOP.'/movies?'.$field.'='.urlencode($ta).'" title="'.$ta.'">'.$ta.'</a>';
|
||||
$i++;
|
||||
|
||||
@@ -334,6 +334,9 @@ class Musik
|
||||
$newArr = array();
|
||||
$i = 0;
|
||||
foreach ($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
continue;
|
||||
}
|
||||
if ($i > 5) {
|
||||
break;
|
||||
} //only use first 6
|
||||
|
||||
@@ -297,6 +297,9 @@ class XXX
|
||||
$newArr = array();
|
||||
$i = 0;
|
||||
foreach ($tmpArr as $ta) {
|
||||
if (trim($ta) == '') {
|
||||
continue;
|
||||
}
|
||||
if ($field == "genre" ) {
|
||||
$ta = $this->getGenres(true,$ta);
|
||||
$ta = $ta["title"];
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
namespace newznab\utility;
|
||||
|
||||
|
||||
/*
|
||||
* General util functions.
|
||||
/**
|
||||
* Class Utility
|
||||
*
|
||||
* @package newznab\utility
|
||||
*/
|
||||
class Utility
|
||||
{
|
||||
@@ -13,6 +14,29 @@ class Utility
|
||||
*/
|
||||
const PATH_REGEX = '(?P<drive>[A-Za-z]:|)(?P<path>[/\w.-]+|)';
|
||||
|
||||
/**
|
||||
* Checks all levels of the supplied path are readable and executable by current user.
|
||||
*
|
||||
* @todo Make this recursive with a switch to only check end point.
|
||||
* @param $path *nix path to directory or file
|
||||
*
|
||||
* @return bool|string True is successful, otherwise the part of the path that failed testing.
|
||||
*/
|
||||
static public function canExecuteRead($path)
|
||||
{
|
||||
$paths = preg_split('#/#', $path);
|
||||
$fullPath = DS;
|
||||
foreach ($paths as $path) {
|
||||
if ($path !== '') {
|
||||
$fullPath .= $path . DS;
|
||||
if (!is_readable($fullPath) || !is_executable($fullPath)) {
|
||||
return "The '$fullPath' directory must be readable and executable by all ." .PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static public function clearScreen()
|
||||
{
|
||||
if (self::isCLI()) {
|
||||
|
||||
@@ -73,11 +73,17 @@ define('WWW_TOP', $www_top);
|
||||
|
||||
define('NN_VERSIONS', NN_LIB . 'build' . DS . 'newznab.xml');
|
||||
|
||||
if (is_file(__DIR__ . DS . 'settings.php')) {
|
||||
require_once(__DIR__ . DS . 'settings.php');
|
||||
// Remove this in the future, here for those not updating settings.php
|
||||
if (!defined('NN_MAX_PAGER_RESULTS')) {
|
||||
define('NN_MAX_PAGER_RESULTS', '125000');
|
||||
$settings_file = __DIR__ . DS . 'settings.php';
|
||||
if (is_file($settings_file)) {
|
||||
require_once($settings_file);
|
||||
if (php_sapi_name() == 'cli') {
|
||||
$current_settings_file_version = 1; // Update this when updating settings.php.example
|
||||
if (!defined('NN_SETTINGS_FILE_VERSION') || NN_SETTINGS_FILE_VERSION != $current_settings_file_version) {
|
||||
echo ("\033[0;31mNotice: Your $settings_file file is either out of date or you have not updated" .
|
||||
" NN_SETTINGS_FILE_VERSION to $current_settings_file_version in that file.\033[0m" . PHP_EOL
|
||||
);
|
||||
}
|
||||
unset($current_settings_file_version);
|
||||
}
|
||||
} else {
|
||||
define('ITEMS_PER_PAGE', '50');
|
||||
@@ -106,6 +112,7 @@ if (is_file(__DIR__ . DS . 'settings.php')) {
|
||||
define('NN_RELEASE_SEARCH_TYPE', 0);
|
||||
define('NN_MAX_PAGER_RESULTS', '125000');
|
||||
}
|
||||
unset($settings_file);
|
||||
require_once NN_CORE . 'autoloader.php';
|
||||
require_once NN_LIBS . 'autoloader.php';
|
||||
require_once SMARTY_DIR . 'autoloader.php';
|
||||
|
||||
@@ -3,6 +3,21 @@
|
||||
//////////////////////////// Copy this file to settings.php and edit the options. //////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**********************************************************************************************************************/
|
||||
|
||||
/**********************************************************************************************************************/
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////// MISC //////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* When we update settings.php.example, we will raise this version, you will get a message saying your settings.php
|
||||
* is out of date, you will need to update it and change the version number.
|
||||
*
|
||||
* @note Developers: When updating settings.php.example, up this version
|
||||
* and $current_settings_file_version in automated.config.php
|
||||
* @version 1
|
||||
*/
|
||||
define('NN_SETTINGS_FILE_VERSION', 1);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////// Web Settings //////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -513,4 +528,15 @@ define('PHPMAILER_SMTP_USER','');
|
||||
*
|
||||
* @default ''
|
||||
*/
|
||||
define('PHPMAILER_SMTP_PASSWORD', '');
|
||||
define('PHPMAILER_SMTP_PASSWORD', '');
|
||||
|
||||
/***********************************************************************************************************************
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////// Change log ////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
2015-05-05 v1 Track settings.php.example changes.
|
||||
Add support for quick and low_priority on MySQL DELETE queries.
|
||||
Search for @version 1 in this file to quickly find these additions.
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
Reference in New Issue
Block a user