@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | // Set the current action. |
| 13 | 13 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
| 14 | 14 | |
| 15 | -switch($action) { |
|
| 15 | +switch ($action) { |
|
| 16 | 16 | case 'submit': |
| 17 | 17 | if ($_POST["group_regex"] == '') { |
| 18 | 18 | $page->smarty->assign('error', "Group regex must not be empty!"); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $regexes->updateRegex($_POST); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - header("Location:".WWW_TOP."/category_regexes-list.php"); |
|
| 42 | + header("Location:" . WWW_TOP . "/category_regexes-list.php"); |
|
| 43 | 43 | break; |
| 44 | 44 | |
| 45 | 45 | case 'view': |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | break; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -$page->smarty->assign('status_ids', [Category::STATUS_ACTIVE,Category::STATUS_INACTIVE]); |
|
| 59 | +$page->smarty->assign('status_ids', [Category::STATUS_ACTIVE, Category::STATUS_INACTIVE]); |
|
| 60 | 60 | $page->smarty->assign('status_names', ['Yes', 'No']); |
| 61 | 61 | |
| 62 | 62 | $categories_db = $page->settings->queryDirect( |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ); |
| 69 | 69 | $categories = ['category_names', 'category_ids']; |
| 70 | 70 | if ($categories_db) { |
| 71 | - foreach($categories_db as $category_db) { |
|
| 71 | + foreach ($categories_db as $category_db) { |
|
| 72 | 72 | $categories['category_names'][] = $category_db['parent_title'] . ' ' . $category_db['title'] . ': ' . $category_db['id']; |
| 73 | 73 | $categories['category_ids'][] = $category_db['id']; |
| 74 | 74 | } |
@@ -10,8 +10,7 @@ |
||
| 10 | 10 | $regex = ['id' => '', 'groupname' => '', 'regex' => '', 'description' => '']; |
| 11 | 11 | |
| 12 | 12 | switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) { |
| 13 | - case 'submit': |
|
| 14 | - if ($_POST["groupname"] == '') { |
|
| 13 | + case 'submit' : if ($_POST["groupname"] == '') { |
|
| 15 | 14 | $error = "Group must be a valid usenet group"; |
| 16 | 15 | break; |
| 17 | 16 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | $page->title = "Preview List"; |
| 15 | 15 | |
| 16 | -$previewcat="-1"; |
|
| 16 | +$previewcat = "-1"; |
|
| 17 | 17 | if (isset($_REQUEST["previewcat"])) |
| 18 | 18 | $previewcat = $_REQUEST["previewcat"]; |
| 19 | 19 | |
@@ -23,19 +23,19 @@ discard block |
||
| 23 | 23 | $releasecount = $releases->getPreviewCount($previewtype, $catarray); |
| 24 | 24 | |
| 25 | 25 | $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
| 26 | -$page->smarty->assign('pagertotalitems',$releasecount); |
|
| 27 | -$page->smarty->assign('pageroffset',$offset); |
|
| 28 | -$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
|
| 29 | -$page->smarty->assign('pagerquerybase', WWW_TOP."/preview-list.php?previewcat=".$previewcat."&offset="); |
|
| 26 | +$page->smarty->assign('pagertotalitems', $releasecount); |
|
| 27 | +$page->smarty->assign('pageroffset', $offset); |
|
| 28 | +$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE); |
|
| 29 | +$page->smarty->assign('pagerquerybase', WWW_TOP . "/preview-list.php?previewcat=" . $previewcat . "&offset="); |
|
| 30 | 30 | $pager = $page->smarty->fetch("pager.tpl"); |
| 31 | 31 | $page->smarty->assign('pager', $pager); |
| 32 | 32 | |
| 33 | 33 | $parentcatlist = $category->getForMenu(); |
| 34 | -$page->smarty->assign('catlist',$parentcatlist); |
|
| 35 | -$page->smarty->assign('previewcat',$previewcat); |
|
| 34 | +$page->smarty->assign('catlist', $parentcatlist); |
|
| 35 | +$page->smarty->assign('previewcat', $previewcat); |
|
| 36 | 36 | |
| 37 | 37 | $releaselist = $releases->getPreviewRange($previewtype, $catarray, $offset, ITEMS_PER_PAGE); |
| 38 | -$page->smarty->assign('releaselist',$releaselist); |
|
| 38 | +$page->smarty->assign('releaselist', $releaselist); |
|
| 39 | 39 | |
| 40 | 40 | $page->content = $page->smarty->fetch('preview-list.tpl'); |
| 41 | 41 | $page->render(); |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | $regex = ['id' => '', 'regex' => '', 'description' => '', 'group_regex' => '', 'ordinal' => '']; |
| 12 | 12 | |
| 13 | 13 | switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) { |
| 14 | - case 'submit': |
|
| 15 | - if ($_POST["group_regex"] == '') { |
|
| 14 | + case 'submit' : if ($_POST["group_regex"] == '') { |
|
| 16 | 15 | $error = "Group regex must not be empty!"; |
| 17 | 16 | break; |
| 18 | 17 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | //get the user roles |
| 15 | 15 | $userroles = $users->getRoles(); |
| 16 | 16 | |
| 17 | -$page->smarty->assign('userroles',$userroles); |
|
| 17 | +$page->smarty->assign('userroles', $userroles); |
|
| 18 | 18 | |
| 19 | 19 | $page->content = $page->smarty->fetch('role-list.tpl'); |
| 20 | 20 | $page->render(); |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | $concount = $con->getCount(); |
| 14 | 14 | |
| 15 | 15 | $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
| 16 | -$page->smarty->assign('pagertotalitems',$concount); |
|
| 17 | -$page->smarty->assign('pageroffset',$offset); |
|
| 18 | -$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
|
| 19 | -$page->smarty->assign('pagerquerybase', WWW_TOP."/console-list.php?offset="); |
|
| 16 | +$page->smarty->assign('pagertotalitems', $concount); |
|
| 17 | +$page->smarty->assign('pageroffset', $offset); |
|
| 18 | +$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE); |
|
| 19 | +$page->smarty->assign('pagerquerybase', WWW_TOP . "/console-list.php?offset="); |
|
| 20 | 20 | $pager = $page->smarty->fetch("pager.tpl"); |
| 21 | 21 | $page->smarty->assign('pager', $pager); |
| 22 | 22 | |
| 23 | 23 | $consolelist = $con->getRange($offset, ITEMS_PER_PAGE); |
| 24 | 24 | |
| 25 | -$page->smarty->assign('consolelist',$consolelist); |
|
| 25 | +$page->smarty->assign('consolelist', $consolelist); |
|
| 26 | 26 | |
| 27 | 27 | $page->content = $page->smarty->fetch('console-list.tpl'); |
| 28 | 28 | $page->render(); |
@@ -17,27 +17,27 @@ discard block |
||
| 17 | 17 | $admin = new AdminPage; |
| 18 | 18 | |
| 19 | 19 | $settings = ['Settings' => $admin->settings]; |
| 20 | -switch($_GET['action']) { |
|
| 20 | +switch ($_GET['action']) { |
|
| 21 | 21 | case 'binary_blacklist_delete': |
| 22 | - $id = (int) $_GET['row_id']; |
|
| 22 | + $id = (int)$_GET['row_id']; |
|
| 23 | 23 | (new Binaries($settings))->deleteBlacklist($id); |
| 24 | 24 | print "Blacklist $id deleted."; |
| 25 | 25 | break; |
| 26 | 26 | |
| 27 | 27 | case 'category_regex_delete': |
| 28 | - $id = (int) $_GET['row_id']; |
|
| 28 | + $id = (int)$_GET['row_id']; |
|
| 29 | 29 | (new Regexes(['Settings' => $admin->settings, 'Table_Name' => 'category_regexes']))->deleteRegex($id); |
| 30 | 30 | print "Regex $id deleted."; |
| 31 | 31 | break; |
| 32 | 32 | |
| 33 | 33 | case 'collection_regex_delete': |
| 34 | - $id = (int) $_GET['row_id']; |
|
| 34 | + $id = (int)$_GET['row_id']; |
|
| 35 | 35 | (new Regexes(['Settings' => $admin->settings, 'Table_Name' => 'collection_regexes']))->deleteRegex($id); |
| 36 | 36 | print "Regex $id deleted."; |
| 37 | 37 | break; |
| 38 | 38 | |
| 39 | 39 | case 'release_naming_regex_delete': |
| 40 | - $id = (int) $_GET['row_id']; |
|
| 40 | + $id = (int)$_GET['row_id']; |
|
| 41 | 41 | (new Regexes(['Settings' => $admin->settings, 'Table_Name' => 'release_naming_regexes']))->deleteRegex($id); |
| 42 | 42 | print "Regex $id deleted."; |
| 43 | 43 | break; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | case 'sharing_toggle_hide_users': |
| 145 | 145 | $admin->settings->queryExec(sprintf('UPDATE sharing SET hide_users = %d', $_GET['hide_status'])); |
| 146 | - print ($_GET['hide_status'] == 1? 'Enabled' : 'Disabled') . ' hiding of user names!'; |
|
| 146 | + print ($_GET['hide_status'] == 1 ? 'Enabled' : 'Disabled') . ' hiding of user names!'; |
|
| 147 | 147 | break; |
| 148 | 148 | |
| 149 | 149 | case 'sharing_toggle_all_sites': |
@@ -14,16 +14,16 @@ |
||
| 14 | 14 | $mcount = $m->getCount(); |
| 15 | 15 | |
| 16 | 16 | $offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0; |
| 17 | -$page->smarty->assign('pagertotalitems',$mcount); |
|
| 18 | -$page->smarty->assign('pageroffset',$offset); |
|
| 19 | -$page->smarty->assign('pageritemsperpage',ITEMS_PER_PAGE); |
|
| 20 | -$page->smarty->assign('pagerquerybase', WWW_TOP."/music-list.php?offset="); |
|
| 17 | +$page->smarty->assign('pagertotalitems', $mcount); |
|
| 18 | +$page->smarty->assign('pageroffset', $offset); |
|
| 19 | +$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE); |
|
| 20 | +$page->smarty->assign('pagerquerybase', WWW_TOP . "/music-list.php?offset="); |
|
| 21 | 21 | $pager = $page->smarty->fetch("pager.tpl"); |
| 22 | 22 | $page->smarty->assign('pager', $pager); |
| 23 | 23 | |
| 24 | 24 | $musiclist = $m->getRange($offset, ITEMS_PER_PAGE); |
| 25 | 25 | |
| 26 | -$page->smarty->assign('musiclist',$musiclist); |
|
| 26 | +$page->smarty->assign('musiclist', $musiclist); |
|
| 27 | 27 | |
| 28 | 28 | $page->content = $page->smarty->fetch('music-list.tpl'); |
| 29 | 29 | $page->render(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | // set the current action |
| 15 | 15 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view'; |
| 16 | 16 | |
| 17 | -switch($action) |
|
| 17 | +switch ($action) |
|
| 18 | 18 | { |
| 19 | 19 | case 'submit': |
| 20 | 20 | if ($_POST["id"] == "") |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $ret = $reg->update($_POST); |
| 27 | 27 | } |
| 28 | - header("Location:".WWW_TOP."/regex-list.php"); |
|
| 28 | + header("Location:" . WWW_TOP . "/regex-list.php"); |
|
| 29 | 29 | break; |
| 30 | 30 | case 'addtest': |
| 31 | 31 | if (isset($_GET['regex']) && isset($_GET['groupname'])) { |
@@ -56,10 +56,10 @@ discard block |
||
| 56 | 56 | break; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE,Category::STATUS_INACTIVE)); |
|
| 60 | -$page->smarty->assign('status_names', array( 'Yes', 'No')); |
|
| 59 | +$page->smarty->assign('status_ids', array(Category::STATUS_ACTIVE, Category::STATUS_INACTIVE)); |
|
| 60 | +$page->smarty->assign('status_names', array('Yes', 'No')); |
|
| 61 | 61 | |
| 62 | -$page->smarty->assign('catlist',$category->getForSelect(true)); |
|
| 62 | +$page->smarty->assign('catlist', $category->getForSelect(true)); |
|
| 63 | 63 | |
| 64 | 64 | $page->content = $page->smarty->fetch('regex-edit.tpl'); |
| 65 | 65 | $page->render(); |