mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 18:28:54 +00:00
Fix most of the notices. Some still remain.
This commit is contained in:
@@ -133,8 +133,12 @@ class BasePage
|
||||
$this->smarty->assign('userdata',$this->userdata);
|
||||
$this->smarty->assign('loggedin',"true");
|
||||
|
||||
if (!empty($this->userdata['nzbvortex_api_key']) && (!empty($this->userdata['nzbvortex_server_url'])))
|
||||
if ($this->userdata['nzbvortex_api_key'] != '' && $this->userdata['nzbvortex_server_url'] != '') {
|
||||
$this->smarty->assign('weHasVortex', true);
|
||||
}
|
||||
else{
|
||||
$this->smarty->assign('weHasVortex', false);
|
||||
}
|
||||
|
||||
$sab = new SABnzbd($this);
|
||||
$this->smarty->assign('sabintegrated', $sab->integratedBool);
|
||||
|
||||
@@ -57,9 +57,7 @@ class PreDB
|
||||
{
|
||||
// Only use Sphinx if this is a search request
|
||||
if ($dirname) {
|
||||
$s = new Sites();
|
||||
$site = $s->get();
|
||||
if ($site->sphinxenabled && $site->sphinxindexpredb) {
|
||||
if ($this->pdo->getSetting('sphinxenabled') && $this->pdo->getSetting('sphinxindexpredb')) {
|
||||
// Search using Sphinx
|
||||
$sphinx = new Sphinx();
|
||||
$count = $sphinx->getPreCount($dirname, $category);
|
||||
@@ -84,9 +82,7 @@ class PreDB
|
||||
{
|
||||
// Only use Sphinx if this is a search request
|
||||
if ($dirname) {
|
||||
$s = new Sites();
|
||||
$site = $s->get();
|
||||
if ($site->sphinxenabled && $site->sphinxindexpredb) {
|
||||
if ($this->pdo->getSetting('sphinxenabled') && $this->pdo->getSetting('sphinxindexpredb')) {
|
||||
// Search using Sphinx
|
||||
$sphinx = new Sphinx();
|
||||
$results = $sphinx->getPreRange($start, $num, $dirname, $category);
|
||||
@@ -209,11 +205,7 @@ class PreDB
|
||||
*/
|
||||
public function nzpreUpdate()
|
||||
{
|
||||
|
||||
$s = new Sites();
|
||||
$site = $s->get();
|
||||
|
||||
if(empty($site->nzpregroup) || empty($site->nzpresubject) || empty($site->nzpreposter) || empty($site->nzprefield) || empty($site->nzprekey))
|
||||
if(empty($this->pdo->getSetting('nzpregroup')) || empty($this->pdo->getSetting('nzpresubject')) || empty($this->pdo->getSetting('nzpreposter')) || empty($this->pdo->getSetting('nzprefield')) || empty($this->pdo->getSetting('nzprekey')))
|
||||
return false;
|
||||
|
||||
if($this->echooutput)
|
||||
@@ -226,37 +218,37 @@ class PreDB
|
||||
return false;
|
||||
}
|
||||
|
||||
$ret = $groupData = $nntp->selectGroup($site->nzpregroup);
|
||||
$ret = $groupData = $nntp->selectGroup($this->pdo->getSetting('nzpregroup'));
|
||||
if($nntp->isError($ret)) {
|
||||
echo "Predb : Error ".$ret->getMessage()."\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
$ret = $groupMsgs = $nntp->getOverview(($groupData['last']-(!empty($site->nzprearticles) ? $site->nzprearticles : 500)).'-'.$groupData['last']);
|
||||
$ret = $groupMsgs = $nntp->getOverview(($groupData['last']-(!empty($this->pdo->getSetting('nzprearticles')) ? $this->pdo->getSetting('nzprearticles') : 500)).'-'.$groupData['last']);
|
||||
if($nntp->isError($ret)) {
|
||||
echo "Predb : Error ".$ret->getMessage()."\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
$added_updated = 0;
|
||||
$nzprekey = $site->nzprekey;
|
||||
$nzprekey = $this->pdo->getSetting('nzprekey');
|
||||
while(strlen($nzprekey) < 1024)
|
||||
$nzprekey = $nzprekey.$nzprekey;
|
||||
|
||||
$cnt = !empty($site->nzprearticles) ? $site->nzprearticles : 500;
|
||||
$cnt = !empty($this->pdo->getSetting('nzprearticles')) ? $this->pdo->getSetting('nzprearticles') : 500;
|
||||
foreach($groupMsgs as $groupMsg) {
|
||||
if ($cnt%50==0 && $cnt != 0 && $this->echooutput)
|
||||
echo $cnt."..";
|
||||
$cnt--;
|
||||
|
||||
if(preg_match('/^'.$site->nzpresubject.'$/', $groupMsg['Subject']) && preg_match('/^'.$site->nzpreposter.'$/', $groupMsg['From'])) {
|
||||
if(preg_match('/^'.$this->pdo->getSetting('nzpresubject').'$/', $groupMsg['Subject']) && preg_match('/^'.$this->pdo->getSetting('nzpreposter').'$/', $groupMsg['From'])) {
|
||||
$ret = $msgHeader = $nntp->getHeader($groupMsg['Message-ID']);
|
||||
if($nntp->isError($ret))
|
||||
continue;
|
||||
|
||||
for($i=0; $i < count($msgHeader); $i++) {
|
||||
if(preg_match('/^'.$site->nzprefield.': /', $msgHeader[$i])) {
|
||||
if($nzpreParse = $this->nzpreParse(str_replace($site->nzprefield.': ', '', $msgHeader[$i]), $nzprekey))
|
||||
if(preg_match('/^'.$this->pdo->getSetting('nzprefield').': /', $msgHeader[$i])) {
|
||||
if($nzpreParse = $this->nzpreParse(str_replace($this->pdo->getSetting('nzprefield').': ', '', $msgHeader[$i]), $nzprekey))
|
||||
{
|
||||
if ($this->updatePreDB($this->pdo, $nzpreParse))
|
||||
{
|
||||
|
||||
@@ -924,7 +924,7 @@ class Sphinx
|
||||
. "CONCAT(cp.title, ' > ', c.title) AS category_name, "
|
||||
. "CONCAT(cp.id, ',', c.id) AS category_ids, "
|
||||
. "groups.name as group_name, rn.id AS nfoid, "
|
||||
. "re.releaseid as reID, cp.id AS categoryParentID, "
|
||||
. "re.releaseid as reid, cp.id AS categoryParentID, "
|
||||
. "pre.ctime, pre.nuketype, "
|
||||
. "COALESCE(movieinfo.id, 0) AS movieinfoid "
|
||||
. "FROM releases "
|
||||
@@ -1005,7 +1005,7 @@ class Sphinx
|
||||
. "CONCAT(cp.title, ' > ', c.title) AS category_name, "
|
||||
. "CONCAT(cp.id, ',', c.id) AS category_ids, "
|
||||
. "groups.name AS group_name, rn.id AS nfoid, "
|
||||
. "re.releaseid AS reID "
|
||||
. "re.releaseid AS reid "
|
||||
. "FROM releases "
|
||||
. "LEFT OUTER JOIN category c "
|
||||
. "ON c.id = releases.categoryid "
|
||||
|
||||
@@ -14,7 +14,7 @@ if (isset($_REQUEST["g"])) {
|
||||
$grp = $_REQUEST["g"];
|
||||
}
|
||||
|
||||
$catarray = array();
|
||||
$catarray = [];
|
||||
$catarray[] = $category;
|
||||
|
||||
$page->smarty->assign('category', $category);
|
||||
@@ -24,7 +24,7 @@ $offset = (isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset'])) ? $_R
|
||||
$ordering = $releases->getBrowseOrdering();
|
||||
$orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
|
||||
|
||||
$results = array();
|
||||
$results = [];
|
||||
$results = $releases->getBrowseRange($catarray, $offset, ITEMS_PER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"], $grp);
|
||||
|
||||
$page->smarty->assign('pagertotalitems',$browsecount);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
$page->smarty->assign(['error' => '', 'username' => '', 'rememberme' => '']);
|
||||
|
||||
if ($page->isPostBack())
|
||||
{
|
||||
if (!isset($_POST["username"]) || !isset($_POST["password"])){
|
||||
|
||||
+18
-17
@@ -35,14 +35,14 @@ switch($action) {
|
||||
else
|
||||
{
|
||||
$db = new Settings();
|
||||
$show = $db->queryOneRow(sprintf("select releasetitle from tvrage where rageID = %d", $rid));
|
||||
$show = $db->queryOneRow(sprintf("select releasetitle from tvrage where rageid = %d", $rid));
|
||||
if (!$show)
|
||||
$page->show404('Seriously?');
|
||||
}
|
||||
|
||||
if ($action == 'doadd')
|
||||
{
|
||||
$category = (isset($_REQUEST['category']) && is_array($_REQUEST['category']) && !empty($_REQUEST['category'])) ? $_REQUEST['category'] : array();
|
||||
$category = (isset($_REQUEST['category']) && is_array($_REQUEST['category']) && !empty($_REQUEST['category'])) ? $_REQUEST['category'] :[];
|
||||
$us->addShow($users->currentUserId(), $rid, $category);
|
||||
if (isset($_REQUEST['from']))
|
||||
header("Location:".$_REQUEST['from']);
|
||||
@@ -53,14 +53,14 @@ switch($action) {
|
||||
{
|
||||
$cat = new Category;
|
||||
$tmpcats = $cat->getChildren(Category::CAT_PARENT_TV, true, $page->userdata["categoryexclusions"]);
|
||||
$categories = array();
|
||||
$categories =[];
|
||||
foreach($tmpcats as $c)
|
||||
$categories[$c['ID']] = $c['title'];
|
||||
$categories[$c['id']] = $c['title'];
|
||||
|
||||
$page->smarty->assign('type', 'add');
|
||||
$page->smarty->assign('cat_ids', array_keys($categories));
|
||||
$page->smarty->assign('cat_names', $categories);
|
||||
$page->smarty->assign('cat_selected', array());
|
||||
$page->smarty->assign('cat_selected',[]);
|
||||
$page->smarty->assign('rid', $rid);
|
||||
$page->smarty->assign('show', $show);
|
||||
if (isset($_REQUEST['from']))
|
||||
@@ -78,7 +78,7 @@ switch($action) {
|
||||
|
||||
if ($action == 'doedit')
|
||||
{
|
||||
$category = (isset($_REQUEST['category']) && is_array($_REQUEST['category']) && !empty($_REQUEST['category'])) ? $_REQUEST['category'] : array();
|
||||
$category = (isset($_REQUEST['category']) && is_array($_REQUEST['category']) && !empty($_REQUEST['category'])) ? $_REQUEST['category'] :[];
|
||||
$us->updateShow($users->currentUserId(), $rid, $category);
|
||||
if (isset($_REQUEST['from']))
|
||||
header("Location:".WWW_TOP.$_REQUEST['from']);
|
||||
@@ -90,14 +90,14 @@ switch($action) {
|
||||
$cat = new Category;
|
||||
|
||||
$tmpcats = $cat->getChildren(Category::CAT_PARENT_TV, true, $page->userdata["categoryexclusions"]);
|
||||
$categories = array();
|
||||
$categories =[];
|
||||
foreach($tmpcats as $c)
|
||||
$categories[$c['ID']] = $c['title'];
|
||||
$categories[$c['id']] = $c['title'];
|
||||
|
||||
$page->smarty->assign('type', 'edit');
|
||||
$page->smarty->assign('cat_ids', array_keys($categories));
|
||||
$page->smarty->assign('cat_names', $categories);
|
||||
$page->smarty->assign('cat_selected', explode('|', $show['categoryID']));
|
||||
$page->smarty->assign('cat_selected', explode('|', $show['categoryid']));
|
||||
$page->smarty->assign('rid', $rid);
|
||||
$page->smarty->assign('show', $show);
|
||||
if (isset($_REQUEST['from']))
|
||||
@@ -122,7 +122,7 @@ switch($action) {
|
||||
$ordering = $releases->getBrowseOrdering();
|
||||
$orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
|
||||
|
||||
$results = array();
|
||||
$results =[];
|
||||
$results = $releases->getShowsRange($shows, $offset, ITEMS_PER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]);
|
||||
|
||||
$page->smarty->assign('pagertotalitems',$browsecount);
|
||||
@@ -134,8 +134,9 @@ switch($action) {
|
||||
$pager = $page->smarty->fetch("pager.tpl");
|
||||
$page->smarty->assign('pager', $pager);
|
||||
|
||||
foreach($ordering as $ordertype)
|
||||
$page->smarty->assign('orderby'.$ordertype, WWW_TOP."/myshows/browse?ob=".$ordertype."&offset=0");
|
||||
foreach($ordering as $ordertype) {
|
||||
$page->smarty->assign('orderby' . $ordertype, WWW_TOP . "/myshows/browse?ob=" . $ordertype . "&offset=0");
|
||||
}
|
||||
|
||||
$page->smarty->assign('lastvisit',$page->userdata['lastlogin']);
|
||||
|
||||
@@ -155,18 +156,18 @@ switch($action) {
|
||||
|
||||
$cat = new Category;
|
||||
$tmpcats = $cat->getChildren(Category::CAT_PARENT_TV, true, $page->userdata["categoryexclusions"]);
|
||||
$categories = array();
|
||||
$categories =[];
|
||||
foreach($tmpcats as $c)
|
||||
$categories[$c['ID']] = $c['title'];
|
||||
$categories[$c['id']] = $c['title'];
|
||||
|
||||
$shows = $us->getShows($users->currentUserId());
|
||||
$results = array();
|
||||
$results =[];
|
||||
foreach ($shows as $showk=>$show)
|
||||
{
|
||||
$showcats = explode('|', $show['categoryID']);
|
||||
$showcats = explode('|', $show['categoryid']);
|
||||
if (is_array($showcats) && sizeof($showcats) > 0)
|
||||
{
|
||||
$catarr = array();
|
||||
$catarr =[];
|
||||
foreach ($showcats as $scat)
|
||||
{
|
||||
if (!empty($scat))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{if $articlecontentlist|@count > 0}
|
||||
<li class="menu_articles">
|
||||
<li class="article_menu">
|
||||
<h2>Articles</h2>
|
||||
<ul>
|
||||
{foreach from=$articlecontentlist item=content}
|
||||
|
||||
@@ -102,8 +102,6 @@
|
||||
|
||||
{$useful_menu}
|
||||
|
||||
{$recentposts_menu}
|
||||
|
||||
{if $site->google_adsense_acc != '' && $site->google_adsense_search != ''}
|
||||
{literal}
|
||||
<li>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{$site->adbrowse}
|
||||
|
||||
{if $shows}
|
||||
{if isset($shows)}
|
||||
<center>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-small" href="{$smarty.const.WWW_TOP}/series" title="View available TV series">Series List</a> |
|
||||
@@ -89,14 +89,6 @@
|
||||
<td class="item">
|
||||
<label for="chk{$result.guid|substr:0:7}"><a class="title" title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.guid}/{$result.searchname|escape:"seourl"}">{$result.searchname|escape:"htmlall"|replace:".":" "}</a></label>
|
||||
|
||||
{if $userdata.canpre == 1 && $result.nuketype != ''}
|
||||
|
||||
<img title="{$result.nuketype}"
|
||||
src="{$smarty.const.WWW_TOP}/templates/nntmux/images/icons/nuke.png" width="10"
|
||||
height="10" alt="{$result.nuketype}"/>
|
||||
{/if}
|
||||
|
||||
<div class="resextra">
|
||||
<div class="btns" style="float:right">
|
||||
{release_flag($result.searchname, browse)}
|
||||
@@ -124,9 +116,6 @@
|
||||
PreDB</span>{/if}
|
||||
{if $result.prehashid > 0}<span class="prehashinfo rndbtn"
|
||||
title="{$result.prehashid}">Prehash</span>{/if}
|
||||
{if $result.movieinfoid > 0}<a
|
||||
href="{$smarty.const.WWW_TOP}/movies?imdb={$result.imdbid}"
|
||||
title="View movie info" class="rndbtn" rel="movie" >Movie</a>{/if}
|
||||
{if $result.haspreview == 1 && $userdata.canpreview == 1}<a
|
||||
href="{$smarty.const.WWW_TOP}/covers/preview/{$result.guid}_thumb.jpg"
|
||||
name="name{$result.guid}" title="View Screenshot" class="modal_prev rndbtn"
|
||||
@@ -164,7 +153,7 @@
|
||||
title="View all episodes">View Anime</a>{/if}
|
||||
{if $result.tvairdate != ""}<span class="seriesinfo rndbtn" title="{$result.guid}">
|
||||
Aired {if $result.tvairdate|strtotime > $smarty.now}in future{else}{$result.tvairdate|daysago}{/if}</span>{/if}
|
||||
{if $result.reID > 0}<span class="mediainfo rndbtn" title="{$result.guid}">
|
||||
{if $result.reid > 0}<span class="mediainfo rndbtn" title="{$result.guid}">
|
||||
Media</span>{/if}
|
||||
{if $result.group_name != ""}
|
||||
<a class="rndbtn" href="{$smarty.const.WWW_TOP}/browse?g={$result.group_name|escape:"htmlall"}" title="Browse {$result.group_name}">{$result.group_name|escape:"htmlall"|replace:"alt.binaries.":"a.b."}</a>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:newznab="http://www.newznab.com/DTD/2010/feeds/attributes/">
|
||||
<channel>
|
||||
<atom:link href="{$serverroot}{$smarty.server.REQUEST_URI|escape:"htmlall"|substr:1}" rel="self" type="application/rss+xml" />
|
||||
<title>{$site->title|escape}{if $rsstitle!=""} {$rsstitle|escape:"htmlall"}{/if}</title>
|
||||
<description>{if $rssdesc==""}{$site->title|escape} Feed{else}{$rssdesc|escape:"htmlall"}{/if}</description>
|
||||
<description>{$site->title|escape} RSS Feed</description>
|
||||
<link>{$serverroot}</link>
|
||||
<language>en-gb</language>
|
||||
<webMaster>{$site->email} ({$site->title|escape})</webMaster>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
{if $result.tvairdate != ""}<span class="rndbtn"
|
||||
title="{$result.tvtitle} Aired on {$result.tvairdate|date_format}">
|
||||
Aired {if $result.tvairdate|strtotime > $smarty.now}in future{else}{$result.tvairdate|daysago}{/if}</span>{/if}
|
||||
{if $result.reID > 0}<span class="mediainfo rndbtn" title="{$result.guid}">
|
||||
{if $result.reid > 0}<span class="mediainfo rndbtn" title="{$result.guid}">
|
||||
Media</span>{/if}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
{if $result.tvairdate != ""}<span class="rndbtn"
|
||||
title="{$result.tvtitle} Aired on {$result.tvairdate|date_format}">
|
||||
Aired {if $result.tvairdate|strtotime > $smarty.now}in future{else}{$result.tvairdate|daysago}{/if}</span>{/if}
|
||||
{if $result.reID > 0}<span class="mediainfo rndbtn" title="{$result.guid}">
|
||||
{if $result.reid > 0}<span class="mediainfo rndbtn" title="{$result.guid}">
|
||||
Media</span>{/if}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<td>{$s.country|escape:"htmlall"}</td>
|
||||
<td>{$s.genre|escape:"htmlall"|replace:'|':', '}</td>
|
||||
<td class="mid"><div class="btn-group">
|
||||
{if $s.userseriesID != ''}
|
||||
{if $s.userseriesid != ''}
|
||||
|
||||
<a class="btn btn-mini" href="{$smarty.const.WWW_TOP}/myshows/delete/{$s.rageid}?from={$smarty.server.REQUEST_URI|escape:"url"}" class="myshows" rel="remove" name="series{$s.rageid}" title="Remove from My Shows"><i class="icon-minus-sign"></i></a>
|
||||
<a class="btn btn-mini" href="{$smarty.const.WWW_TOP}/myshows/edit/{$s.rageid}?from={$smarty.server.REQUEST_URI|escape:"url"}" class="myshows" rel="edit" name="series{$s.rageid}" title="Edit"><i class="icon-edit"></i></a>
|
||||
|
||||
Reference in New Issue
Block a user