mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
fix warning
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ class User extends Authenticatable
|
|||||||
public function updateWithModComment(array $update, $modComment)
|
public function updateWithModComment(array $update, $modComment)
|
||||||
{
|
{
|
||||||
if (!$this->exists) {
|
if (!$this->exists) {
|
||||||
throw new \RuntimeException('User not exists!');
|
throw new \RuntimeException('This mehtod only works when user exists!');
|
||||||
}
|
}
|
||||||
$update['modcomment'] = DB::raw("concat_ws('\n', $modComment, modcomment)");
|
$update['modcomment'] = DB::raw("concat_ws('\n', $modComment, modcomment)");
|
||||||
return $this->update($update);
|
return $this->update($update);
|
||||||
|
|||||||
+3
-3
@@ -348,7 +348,7 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
|||||||
$res = sql_query("SELECT id, seeders, leechers, comments FROM torrents") or sqlerr(__FILE__, __LINE__);
|
$res = sql_query("SELECT id, seeders, leechers, comments FROM torrents") or sqlerr(__FILE__, __LINE__);
|
||||||
while ($row = mysql_fetch_assoc($res)) {
|
while ($row = mysql_fetch_assoc($res)) {
|
||||||
$id = $row["id"];
|
$id = $row["id"];
|
||||||
$torr = $torrents[$id];
|
$torr = $torrents[$id] ?? [];
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
if (!isset($torr[$field]))
|
if (!isset($torr[$field]))
|
||||||
$torr[$field] = 0;
|
$torr[$field] = 0;
|
||||||
@@ -924,9 +924,9 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
|||||||
if (count($delids))
|
if (count($delids))
|
||||||
sql_query("DELETE FROM files WHERE torrent IN (" . join(",", $delids) . ")") or sqlerr(__FILE__, __LINE__);
|
sql_query("DELETE FROM files WHERE torrent IN (" . join(",", $delids) . ")") or sqlerr(__FILE__, __LINE__);
|
||||||
} while (0);
|
} while (0);
|
||||||
|
$log = "delete torrents that doesn't exist any more";
|
||||||
|
do_log($log);
|
||||||
if ($printProgress) {
|
if ($printProgress) {
|
||||||
$log = "delete torrents that doesn't exist any more";
|
|
||||||
do_log($log);
|
|
||||||
printProgress($log);
|
printProgress($log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2802,7 +2802,7 @@ function deletetorrent($id) {
|
|||||||
foreach(array("peers", "files", "comments") as $x) {
|
foreach(array("peers", "files", "comments") as $x) {
|
||||||
sql_query("DELETE FROM $x WHERE torrent = ".mysql_real_escape_string($id));
|
sql_query("DELETE FROM $x WHERE torrent = ".mysql_real_escape_string($id));
|
||||||
}
|
}
|
||||||
unlink("$torrent_dir/$id.torrent");
|
unlink(getFullDirectory("$torrent_dir/$id.torrent"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pager($rpp, $count, $href, $opts = array(), $pagename = "page") {
|
function pager($rpp, $count, $href, $opts = array(), $pagename = "page") {
|
||||||
|
|||||||
+2
-3
@@ -33,7 +33,6 @@ $rt = intval($_POST["reasontype"] ?? 0);
|
|||||||
if (!is_int($rt) || $rt < 1 || $rt > 5)
|
if (!is_int($rt) || $rt < 1 || $rt > 5)
|
||||||
bark($lang_delete['std_invalid_reason']."$rt.");
|
bark($lang_delete['std_invalid_reason']."$rt.");
|
||||||
|
|
||||||
$r = $_POST["r"];
|
|
||||||
$reason = $_POST["reason"];
|
$reason = $_POST["reason"];
|
||||||
|
|
||||||
if ($rt == 1)
|
if ($rt == 1)
|
||||||
@@ -58,9 +57,9 @@ else
|
|||||||
deletetorrent($id);
|
deletetorrent($id);
|
||||||
|
|
||||||
if ($row['anonymous'] == 'yes' && $CURUSER["id"] == $row["owner"]) {
|
if ($row['anonymous'] == 'yes' && $CURUSER["id"] == $row["owner"]) {
|
||||||
write_log("Torrent $id ($row[name]) was deleted by its anonymous uploader ($reasonstr)",'normal');
|
write_log("Torrent $id ({$row['name']}) was deleted by its anonymous uploader ($reasonstr)",'normal');
|
||||||
} else {
|
} else {
|
||||||
write_log("Torrent $id ($row[name]) was deleted by $CURUSER[username] ($reasonstr)",'normal');
|
write_log("Torrent $id ({$row['name']}) was deleted by {$CURUSER['username']} ($reasonstr)",'normal');
|
||||||
}
|
}
|
||||||
|
|
||||||
//===remove karma
|
//===remove karma
|
||||||
|
|||||||
+1
-1
@@ -282,7 +282,7 @@ else {
|
|||||||
{
|
{
|
||||||
$dispname=substr($dispname, 0, $max_lenght_of_torrent_name) . "..";
|
$dispname=substr($dispname, 0, $max_lenght_of_torrent_name) . "..";
|
||||||
}
|
}
|
||||||
|
$other_source_info = $other_medium_info = $other_codec_info = $other_standard_info = $other_processing_info = '';
|
||||||
if (isset($copy_row["source_name"]))
|
if (isset($copy_row["source_name"]))
|
||||||
$other_source_info = $copy_row['source_name'].", ";
|
$other_source_info = $copy_row['source_name'].", ";
|
||||||
if (isset($copy_row["medium_name"]))
|
if (isset($copy_row["medium_name"]))
|
||||||
|
|||||||
+6
-6
@@ -452,7 +452,7 @@ if (!$all)
|
|||||||
$addparam .= "audiocodec{$audiocodec['id']}=1&";
|
$addparam .= "audiocodec{$audiocodec['id']}=1&";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// when one clicked the cat, source, etc. name/image
|
// when one clicked the cat, source, etc. name/image
|
||||||
elseif ($category_get)
|
elseif ($category_get)
|
||||||
@@ -666,7 +666,7 @@ $wherebase = $wherea;
|
|||||||
$search_area = 0;
|
$search_area = 0;
|
||||||
if (isset($searchstr))
|
if (isset($searchstr))
|
||||||
{
|
{
|
||||||
if (!$_GET['notnewword']){
|
if (!isset($_GET['notnewword']) || !$_GET['notnewword']){
|
||||||
insert_suggest($searchstr, $CURUSER['id']);
|
insert_suggest($searchstr, $CURUSER['id']);
|
||||||
$notnewword="";
|
$notnewword="";
|
||||||
}
|
}
|
||||||
@@ -926,14 +926,14 @@ if ($allsec != 1 || $enablespecial != 'yes'){ //do not print searchbox if showin
|
|||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="rowfollow" valign="middle">
|
<td class="rowfollow" valign="middle">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bottom" style="padding: 1px;padding-left: 10px">
|
<td class="bottom" style="padding: 1px;padding-left: 10px">
|
||||||
<font class="medium"><?php echo $lang_torrents['text_show_dead_active'] ?></font>
|
<font class="medium"><?php echo $lang_torrents['text_show_dead_active'] ?></font>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bottom" style="padding: 1px;padding-left: 10px">
|
<td class="bottom" style="padding: 1px;padding-left: 10px">
|
||||||
<select class="med" name="incldead" style="width: 100px;">
|
<select class="med" name="incldead" style="width: 100px;">
|
||||||
@@ -1029,7 +1029,7 @@ if ($allsec != 1 || $enablespecial != 'yes'){ //do not print searchbox if showin
|
|||||||
<option value="1"<?php echo isset($_GET["search_mode"]) && $_GET["search_mode"] == 1 ? " selected=\"selected\"" : "" ?>><?php echo $lang_torrents['select_or'] ?></option>
|
<option value="1"<?php echo isset($_GET["search_mode"]) && $_GET["search_mode"] == 1 ? " selected=\"selected\"" : "" ?>><?php echo $lang_torrents['select_or'] ?></option>
|
||||||
<option value="2"<?php echo isset($_GET["search_mode"]) && $_GET["search_mode"] == 2 ? " selected=\"selected\"" : "" ?>><?php echo $lang_torrents['select_exact'] ?></option>
|
<option value="2"<?php echo isset($_GET["search_mode"]) && $_GET["search_mode"] == 2 ? " selected=\"selected\"" : "" ?>><?php echo $lang_torrents['select_exact'] ?></option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<?php echo $lang_torrents['text_mode'] ?>
|
<?php echo $lang_torrents['text_mode'] ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1092,7 +1092,7 @@ if ($count) {
|
|||||||
print($pagertop);
|
print($pagertop);
|
||||||
if ($sectiontype == $browsecatmode)
|
if ($sectiontype == $browsecatmode)
|
||||||
torrenttable($rows, "torrents");
|
torrenttable($rows, "torrents");
|
||||||
elseif ($sectiontype == $specialcatmode)
|
elseif ($sectiontype == $specialcatmode)
|
||||||
torrenttable($rows, "music");
|
torrenttable($rows, "music");
|
||||||
else torrenttable($rows, "bookmarks");
|
else torrenttable($rows, "bookmarks");
|
||||||
print($pagerbottom);
|
print($pagerbottom);
|
||||||
|
|||||||
Reference in New Issue
Block a user