@@ -46,7 +46,8 @@ |
||
| 46 | 46 | $page->content = $page->smarty->fetch('user-list.tpl'); |
| 47 | 47 | $page->render(); |
| 48 | 48 | |
| 49 | -function checkREQUEST($param) { |
|
| 49 | +function checkREQUEST($param) |
|
| 50 | +{ |
|
| 50 | 51 | global $uSearch, $variables; |
| 51 | 52 | if (isset($_REQUEST[$param])) { |
| 52 | 53 | $variables[$param] = $_REQUEST[$param]; |
@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | // set the current action |
| 13 | 13 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
| 14 | 14 | |
| 15 | -switch($action) |
|
| 16 | -{ |
|
| 15 | +switch($action) { |
|
| 17 | 16 | case 'submit': |
| 18 | 17 | $ret = $category->update($_POST["id"], $_POST["status"], $_POST["description"], |
| 19 | 18 | $_POST["disablepreview"], $_POST["minsizetoformrelease"], $_POST["maxsizetoformrelease"]); |
@@ -22,8 +21,7 @@ discard block |
||
| 22 | 21 | case 'view': |
| 23 | 22 | default: |
| 24 | 23 | |
| 25 | - if (isset($_GET["id"])) |
|
| 26 | - { |
|
| 24 | + if (isset($_GET["id"])) { |
|
| 27 | 25 | $page->title = "Category Edit"; |
| 28 | 26 | $id = $_GET["id"]; |
| 29 | 27 | |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | // set the current action |
| 15 | 15 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
| 16 | 16 | |
| 17 | -if (isset($_REQUEST["id"])) |
|
| 18 | -{ |
|
| 17 | +if (isset($_REQUEST["id"])) { |
|
| 19 | 18 | $id = $_REQUEST["id"]; |
| 20 | 19 | $mus = $music->getMusicInfo($id); |
| 21 | 20 | |
@@ -23,17 +22,14 @@ discard block |
||
| 23 | 22 | $page->show404(); |
| 24 | 23 | } |
| 25 | 24 | |
| 26 | - switch($action) |
|
| 27 | - { |
|
| 25 | + switch($action) { |
|
| 28 | 26 | case 'submit': |
| 29 | 27 | $coverLoc = WWW_DIR."covers/music/".$id.'.jpg'; |
| 30 | 28 | |
| 31 | - if($_FILES['cover']['size'] > 0) |
|
| 32 | - { |
|
| 29 | + if($_FILES['cover']['size'] > 0) { |
|
| 33 | 30 | $tmpName = $_FILES['cover']['tmp_name']; |
| 34 | 31 | $file_info = getimagesize($tmpName); |
| 35 | - if(!empty($file_info)) |
|
| 36 | - { |
|
| 32 | + if(!empty($file_info)) { |
|
| 37 | 33 | move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc); |
| 38 | 34 | } |
| 39 | 35 | } |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | $admin = new AdminPage; |
| 9 | 9 | $regex = new ReleaseRegex(); |
| 10 | 10 | |
| 11 | -if (isset($_GET['action']) && $_GET['action'] == "2") |
|
| 12 | -{ |
|
| 11 | +if (isset($_GET['action']) && $_GET['action'] == "2") { |
|
| 13 | 12 | $id = (int)$_GET['regex_id']; |
| 14 | 13 | $regex->delete($id); |
| 15 | 14 | print "Regex $id deleted."; |
@@ -6,14 +6,14 @@ |
||
| 6 | 6 | |
| 7 | 7 | $page = new AdminPage(); |
| 8 | 8 | |
| 9 | -if (isset($_GET['id'])) |
|
| 10 | -{ |
|
| 9 | +if (isset($_GET['id'])) { |
|
| 11 | 10 | $forum = new Forum(); |
| 12 | 11 | $forum->deletePost($_GET['id']); |
| 13 | 12 | } |
| 14 | 13 | |
| 15 | -if (isset($_GET['from'])) |
|
| 14 | +if (isset($_GET['from'])) { |
|
| 16 | 15 | $referrer = $_GET['from']; |
| 17 | -else |
|
| 16 | +} else { |
|
| 18 | 17 | $referrer = $_SERVER['HTTP_REFERER']; |
| 18 | +} |
|
| 19 | 19 | header("Location: " . $referrer); |
@@ -15,8 +15,9 @@ |
||
| 15 | 15 | $page->smarty->assign('reggrouplist', $reggrouplist); |
| 16 | 16 | |
| 17 | 17 | $group=".*"; |
| 18 | -if (isset($_REQUEST["group"])) |
|
| 18 | +if (isset($_REQUEST["group"])) { |
|
| 19 | 19 | $group = $_REQUEST["group"]; |
| 20 | +} |
|
| 20 | 21 | |
| 21 | 22 | $page->smarty->assign('selectedgroup', $group); |
| 22 | 23 | |
@@ -11,14 +11,12 @@ discard block |
||
| 11 | 11 | $regex = new ReleaseRegex(); |
| 12 | 12 | $regexList = $regex->get(false, -1, true, true); |
| 13 | 13 | |
| 14 | -if (count($regexList)) |
|
| 15 | -{ |
|
| 14 | +if (count($regexList)) { |
|
| 16 | 15 | $regexSerialize = serialize($regexList); |
| 17 | 16 | $regexFilename = 'releaseregex-' . time() . '.regex'; |
| 18 | 17 | |
| 19 | 18 | // User wants to submit their regex's |
| 20 | - if (isset($_POST['regex_submit_please'])) |
|
| 21 | - { |
|
| 19 | + if (isset($_POST['regex_submit_please'])) { |
|
| 22 | 20 | // Submit |
| 23 | 21 | $ch = curl_init(); |
| 24 | 22 | curl_setopt($ch, CURLOPT_HEADER, 0); |
@@ -35,18 +33,13 @@ discard block |
||
| 35 | 33 | |
| 36 | 34 | curl_close($ch); |
| 37 | 35 | |
| 38 | - if ($response == 'OK') |
|
| 39 | - { |
|
| 36 | + if ($response == 'OK') { |
|
| 40 | 37 | $page->smarty->assign('upload_status', 'OK'); |
| 41 | - } |
|
| 42 | - else |
|
| 43 | - { |
|
| 38 | + } else { |
|
| 44 | 39 | $page->smarty->assign('upload_status', 'BAD'); |
| 45 | 40 | } |
| 46 | 41 | } |
| 47 | -} |
|
| 48 | -else |
|
| 49 | -{ |
|
| 42 | +} else { |
|
| 50 | 43 | $regexFilename = 'No user regexs found. Please add some.'; |
| 51 | 44 | $regexList = array('Empty'); |
| 52 | 45 | $page->smarty->assign('regex_error', 1); |
@@ -14,8 +14,9 @@ |
||
| 14 | 14 | $page->title = "Preview List"; |
| 15 | 15 | |
| 16 | 16 | $previewcat="-1"; |
| 17 | -if (isset($_REQUEST["previewcat"])) |
|
| 17 | +if (isset($_REQUEST["previewcat"])) { |
|
| 18 | 18 | $previewcat = $_REQUEST["previewcat"]; |
| 19 | +} |
|
| 19 | 20 | |
| 20 | 21 | $catarray = []; |
| 21 | 22 | $catarray[] = $previewcat; |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | $page = new AdminPage(); |
| 8 | 8 | |
| 9 | -if (isset($_GET['id'])) |
|
| 10 | -{ |
|
| 9 | +if (isset($_GET['id'])) { |
|
| 11 | 10 | $users = new Users(); |
| 12 | 11 | $users->deleteRole($_GET['id']); |
| 13 | 12 | } |