Skip to content

Commit

Permalink
change torrent-delete permission judge
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Mar 2, 2024
1 parent e653fda commit b32bdc1
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 77 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@
"imdbphp/imdbphp": "^7.0",
"laravel/framework": "9.52.4",
"laravel/octane": "^1.2",
"laravel/passport": "*",
"laravel/passport": "^11.10",
"laravel/sanctum": "^2.10",
"laravel/tinker": "^2.5",
"league/flysystem-ftp": "^3.0",
"league/flysystem-sftp-v3": "^3.0",
"league/uri": "6.8",
"masbug/flysystem-google-drive-ext": "^2.0",
"meilisearch/meilisearch-php": "^1.0",
"orangehill/iseed": "^3.0",
Expand Down
186 changes: 115 additions & 71 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion include/constants.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-01');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-03');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
Expand Down
4 changes: 3 additions & 1 deletion include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3808,7 +3808,9 @@ function torrenttable($rows, $variant = "torrent", $searchBoxId = 0) {

if (user_can('torrentmanage'))
{
print("<td class=\"rowfollow\"><a href=\"".htmlspecialchars("fastdelete.php?id=".$row['id'])."\"><img class=\"staff_delete\" src=\"pic/trans.gif\" alt=\"D\" title=\"".$lang_functions['text_delete']."\" /></a>");
if (user_can('torrent-delete')) {
print("<td class=\"rowfollow\"><a href=\"".htmlspecialchars("fastdelete.php?id=".$row['id'])."\"><img class=\"staff_delete\" src=\"pic/trans.gif\" alt=\"D\" title=\"".$lang_functions['text_delete']."\" /></a>");
}
print("<br /><a href=\"edit.php?returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><img class=\"staff_edit\" src=\"pic/trans.gif\" alt=\"E\" title=\"".$lang_functions['text_edit']."\" /></a></td>\n");
}
print("</tr>\n");
Expand Down
2 changes: 1 addition & 1 deletion public/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
print("<tr><td class=\"toolbox\" colspan=\"2\" align=\"center\"><input id=\"qr\" type=\"submit\" value=\"".$lang_edit['submit_edit_it']."\" /> <input type=\"reset\" value=\"".$lang_edit['submit_revert_changes']."\" /></td></tr>\n");
print("</table>\n");
print("</form>\n");
if (user_can('torrent-delete')) {
if (user_can('torrent-delete') && user_can('torrentmanage')) {
print("<br /><br />");
print("<form method=\"post\" action=\"delete.php\">\n");
print("<input type=\"hidden\" name=\"id\" value=\"$id\" />\n");
Expand Down
Loading

0 comments on commit b32bdc1

Please sign in to comment.