mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
fix warning
This commit is contained in:
@@ -158,7 +158,7 @@ class User extends Authenticatable
|
||||
public function updateWithModComment(array $update, $modComment)
|
||||
{
|
||||
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)");
|
||||
return $this->update($update);
|
||||
|
||||
@@ -348,7 +348,7 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
$res = sql_query("SELECT id, seeders, leechers, comments FROM torrents") or sqlerr(__FILE__, __LINE__);
|
||||
while ($row = mysql_fetch_assoc($res)) {
|
||||
$id = $row["id"];
|
||||
$torr = $torrents[$id];
|
||||
$torr = $torrents[$id] ?? [];
|
||||
foreach ($fields as $field) {
|
||||
if (!isset($torr[$field]))
|
||||
$torr[$field] = 0;
|
||||
@@ -924,9 +924,9 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
if (count($delids))
|
||||
sql_query("DELETE FROM files WHERE torrent IN (" . join(",", $delids) . ")") or sqlerr(__FILE__, __LINE__);
|
||||
} while (0);
|
||||
$log = "delete torrents that doesn't exist any more";
|
||||
do_log($log);
|
||||
if ($printProgress) {
|
||||
$log = "delete torrents that doesn't exist any more";
|
||||
do_log($log);
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
|
||||
@@ -2802,7 +2802,7 @@ function deletetorrent($id) {
|
||||
foreach(array("peers", "files", "comments") as $x) {
|
||||
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") {
|
||||
|
||||
@@ -33,7 +33,6 @@ $rt = intval($_POST["reasontype"] ?? 0);
|
||||
if (!is_int($rt) || $rt < 1 || $rt > 5)
|
||||
bark($lang_delete['std_invalid_reason']."$rt.");
|
||||
|
||||
$r = $_POST["r"];
|
||||
$reason = $_POST["reason"];
|
||||
|
||||
if ($rt == 1)
|
||||
@@ -58,9 +57,9 @@ else
|
||||
deletetorrent($id);
|
||||
|
||||
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 {
|
||||
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
|
||||
|
||||
@@ -282,7 +282,7 @@ else {
|
||||
{
|
||||
$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"]))
|
||||
$other_source_info = $copy_row['source_name'].", ";
|
||||
if (isset($copy_row["medium_name"]))
|
||||
|
||||
@@ -452,7 +452,7 @@ if (!$all)
|
||||
$addparam .= "audiocodec{$audiocodec['id']}=1&";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// when one clicked the cat, source, etc. name/image
|
||||
elseif ($category_get)
|
||||
@@ -666,7 +666,7 @@ $wherebase = $wherea;
|
||||
$search_area = 0;
|
||||
if (isset($searchstr))
|
||||
{
|
||||
if (!$_GET['notnewword']){
|
||||
if (!isset($_GET['notnewword']) || !$_GET['notnewword']){
|
||||
insert_suggest($searchstr, $CURUSER['id']);
|
||||
$notnewword="";
|
||||
}
|
||||
@@ -926,14 +926,14 @@ if ($allsec != 1 || $enablespecial != 'yes'){ //do not print searchbox if showin
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="rowfollow" valign="middle">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="bottom" style="padding: 1px;padding-left: 10px">
|
||||
<font class="medium"><?php echo $lang_torrents['text_show_dead_active'] ?></font>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bottom" style="padding: 1px;padding-left: 10px">
|
||||
<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="2"<?php echo isset($_GET["search_mode"]) && $_GET["search_mode"] == 2 ? " selected=\"selected\"" : "" ?>><?php echo $lang_torrents['select_exact'] ?></option>
|
||||
</select>
|
||||
|
||||
|
||||
<?php echo $lang_torrents['text_mode'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1092,7 +1092,7 @@ if ($count) {
|
||||
print($pagertop);
|
||||
if ($sectiontype == $browsecatmode)
|
||||
torrenttable($rows, "torrents");
|
||||
elseif ($sectiontype == $specialcatmode)
|
||||
elseif ($sectiontype == $specialcatmode)
|
||||
torrenttable($rows, "music");
|
||||
else torrenttable($rows, "bookmarks");
|
||||
print($pagerbottom);
|
||||
|
||||
Reference in New Issue
Block a user