@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | // Get a list of files in the nzb. |
| 832 | 832 | $this->_nzbContents = $this->_nzb->nzbFileList($nzbContents, ['no-file-key' => false, 'strip-count' => true]); |
| 833 | 833 | if (count($this->_nzbContents) === 0) { |
| 834 | - $this->_echo('NZB is broken (it has no header content) for GUID: ' . $this->_release['guid'], 'warning'); |
|
| 834 | + $this->_echo('NZB is broken (it has no header content) for GUID: ' . $this->_release['guid'], 'warning'); |
|
| 835 | 835 | return $this->_decrementPasswordStatus(); |
| 836 | 836 | } |
| 837 | 837 | // Sort keys. |
@@ -2225,7 +2225,7 @@ discard block |
||
| 2225 | 2225 | $this->_echo('m', 'primaryOver', false); |
| 2226 | 2226 | } |
| 2227 | 2227 | |
| 2228 | - $result = true; |
|
| 2228 | + $result = true; |
|
| 2229 | 2229 | } |
| 2230 | 2230 | //} |
| 2231 | 2231 | } |
@@ -4,13 +4,12 @@ |
||
| 4 | 4 | |
| 5 | 5 | use nzedb\Videos; |
| 6 | 6 | |
| 7 | -$page = new AdminPage(); |
|
| 7 | +$page = new AdminPage(); |
|
| 8 | 8 | $tv = new smartyTV(['Settings' => $page->settings]); |
| 9 | 9 | $video = new Videos(['Settings' => $page->settings]); |
| 10 | 10 | |
| 11 | 11 | switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) { |
| 12 | - case 'submit': |
|
| 13 | - //TODO: Use a function that allows overwrites |
|
| 12 | + case 'submit' : //TODO: Use a function that allows overwrites |
|
| 14 | 13 | //$tv->update($_POST["id"], $_POST["title"],$_POST["summary"], $_POST['country_id']); |
| 15 | 14 | |
| 16 | 15 | if (isset($_POST['from']) && !empty($_POST['from'])) { |
@@ -6,9 +6,13 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CountriesTest extends \lithium\test\Unit |
| 8 | 8 | { |
| 9 | - public function setUp() {} |
|
| 9 | + public function setUp() |
|
| 10 | + { |
|
| 11 | +} |
|
| 10 | 12 | |
| 11 | - public function tearDown() {} |
|
| 13 | + public function tearDown() |
|
| 14 | + { |
|
| 15 | +} |
|
| 12 | 16 | |
| 13 | 17 | |
| 14 | 18 | } |
@@ -6,15 +6,29 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CountriesControllerTest extends \lithium\test\Unit |
| 8 | 8 | { |
| 9 | - public function setUp() {} |
|
| 9 | + public function setUp() |
|
| 10 | + { |
|
| 11 | +} |
|
| 10 | 12 | |
| 11 | - public function tearDown() {} |
|
| 13 | + public function tearDown() |
|
| 14 | + { |
|
| 15 | +} |
|
| 12 | 16 | |
| 13 | - public function testIndex() {} |
|
| 14 | - public function testView() {} |
|
| 15 | - public function testAdd() {} |
|
| 16 | - public function testEdit() {} |
|
| 17 | - public function testDelete() {} |
|
| 17 | + public function testIndex() |
|
| 18 | + { |
|
| 19 | +} |
|
| 20 | + public function testView() |
|
| 21 | + { |
|
| 22 | +} |
|
| 23 | + public function testAdd() |
|
| 24 | + { |
|
| 25 | +} |
|
| 26 | + public function testEdit() |
|
| 27 | + { |
|
| 28 | +} |
|
| 29 | + public function testDelete() |
|
| 30 | + { |
|
| 31 | +} |
|
| 18 | 32 | } |
| 19 | 33 | |
| 20 | 34 | ?> |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function delete() |
| 21 | 21 | { |
| 22 | - if (! $this->request->is('post') && ! $this->request->is('delete')) { |
|
| 22 | + if (!$this->request->is('post') && !$this->request->is('delete')) { |
|
| 23 | 23 | $msg = 'Groups::delete can only be called with http:post or http:delete.'; |
| 24 | 24 | |
| 25 | 25 | throw new DispatchException($msg); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | { |
| 34 | 34 | $group = Groups::find($this->request->id); |
| 35 | 35 | |
| 36 | - if (! $group) { |
|
| 36 | + if (!$group) { |
|
| 37 | 37 | return $this->redirect('Groups::index'); |
| 38 | 38 | } |
| 39 | 39 | if ($this->request->data && $group->save($this->request->data)) { |
@@ -7,17 +7,20 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | class CountriesController extends \lithium\action\Controller |
| 9 | 9 | { |
| 10 | - public function index() { |
|
| 10 | + public function index() |
|
| 11 | + { |
|
| 11 | 12 | $countries = Countries::all(); |
| 12 | 13 | return compact('countries'); |
| 13 | 14 | } |
| 14 | 15 | |
| 15 | - public function view() { |
|
| 16 | + public function view() |
|
| 17 | + { |
|
| 16 | 18 | $country = Countries::first($this->request->id); |
| 17 | 19 | return compact('country'); |
| 18 | 20 | } |
| 19 | 21 | |
| 20 | - public function add() { |
|
| 22 | + public function add() |
|
| 23 | + { |
|
| 21 | 24 | $country = Countries::create(); |
| 22 | 25 | |
| 23 | 26 | if (($this->request->data) && $country->save($this->request->data)) { |
@@ -26,7 +29,8 @@ discard block |
||
| 26 | 29 | return compact('country'); |
| 27 | 30 | } |
| 28 | 31 | |
| 29 | - public function edit() { |
|
| 32 | + public function edit() |
|
| 33 | + { |
|
| 30 | 34 | $country = Countries::find($this->request->id); |
| 31 | 35 | |
| 32 | 36 | if (!$country) { |
@@ -38,7 +42,8 @@ discard block |
||
| 38 | 42 | return compact('country'); |
| 39 | 43 | } |
| 40 | 44 | |
| 41 | - public function delete() { |
|
| 45 | + public function delete() |
|
| 46 | + { |
|
| 42 | 47 | if (!$this->request->is('post') && !$this->request->is('delete')) { |
| 43 | 48 | $msg = "Countries::delete can only be called with http:post or http:delete."; |
| 44 | 49 | throw new DispatchException($msg); |
@@ -23,19 +23,23 @@ discard block |
||
| 23 | 23 | use lithium\action\DispatchException; |
| 24 | 24 | |
| 25 | 25 | |
| 26 | -class VideosController extends \lithium\action\Controller { |
|
| 26 | +class VideosController extends \lithium\action\Controller |
|
| 27 | +{ |
|
| 27 | 28 | |
| 28 | - public function index() { |
|
| 29 | + public function index() |
|
| 30 | + { |
|
| 29 | 31 | $videos = Videos::all(); |
| 30 | 32 | return compact('videos'); |
| 31 | 33 | } |
| 32 | 34 | |
| 33 | - public function view() { |
|
| 35 | + public function view() |
|
| 36 | + { |
|
| 34 | 37 | $video = Videos::first($this->request->id); |
| 35 | 38 | return compact('video'); |
| 36 | 39 | } |
| 37 | 40 | |
| 38 | - public function add() { |
|
| 41 | + public function add() |
|
| 42 | + { |
|
| 39 | 43 | $video = Videos::create(); |
| 40 | 44 | |
| 41 | 45 | if ($this->request->data && $video->save($this->request->data)) { |
@@ -44,7 +48,8 @@ discard block |
||
| 44 | 48 | return compact('video'); |
| 45 | 49 | } |
| 46 | 50 | |
| 47 | - public function edit() { |
|
| 51 | + public function edit() |
|
| 52 | + { |
|
| 48 | 53 | $video = Videos::find($this->request->id); |
| 49 | 54 | |
| 50 | 55 | if (!$video) { |
@@ -56,7 +61,8 @@ discard block |
||
| 56 | 61 | return compact('video'); |
| 57 | 62 | } |
| 58 | 63 | |
| 59 | - public function delete() { |
|
| 64 | + public function delete() |
|
| 65 | + { |
|
| 60 | 66 | if (!$this->request->is('post') && !$this->request->is('delete')) { |
| 61 | 67 | $msg = 'Videos::delete can only be called with http:post or http:delete.'; |
| 62 | 68 | throw new DispatchException($msg); |
@@ -588,7 +588,7 @@ |
||
| 588 | 588 | |
| 589 | 589 | $this->fixed++; |
| 590 | 590 | |
| 591 | - if(!empty($release['fromname']) && (preg_match('/oz@lot[.]com/i', $release['fromname']) || preg_match('/anon@y[.]com/i', $release['fromname']))) { |
|
| 591 | + if (!empty($release['fromname']) && (preg_match('/oz@lot[.]com/i', $release['fromname']) || preg_match('/anon@y[.]com/i', $release['fromname']))) { |
|
| 592 | 592 | $newName = preg_replace('/(KTR|GUSH|BIUK|WEIRD)$/', 'SDCLiP', $newName); |
| 593 | 593 | } |
| 594 | 594 | $newName = explode("\\", $newName); |
@@ -1683,7 +1683,7 @@ |
||
| 1683 | 1683 | ); |
| 1684 | 1684 | |
| 1685 | 1685 | if ($result instanceof \Traversable) { |
| 1686 | - foreach ($result AS $res) { |
|
| 1686 | + foreach ($result as $res) { |
|
| 1687 | 1687 | $floor = round(($res['relsize'] - $release['relsize']) / $res['relsize'] * 100, 0); |
| 1688 | 1688 | if ($floor >= -10 && $floor <= 10) { |
| 1689 | 1689 | $this->updateRelease( |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | require_once __DIR__ . '/../app/config/bootstrap.php'; |
| 20 | 20 | |
| 21 | -$baseDir = shell_exec('php ' .__DIR__ . '/../nZEDbBase.php'); |
|
| 21 | +$baseDir = shell_exec('php ' . __DIR__ . '/../nZEDbBase.php'); |
|
| 22 | 22 | |
| 23 | 23 | if (!empty(DB_SOCKET)) { |
| 24 | 24 | $dsn = DB_SYSTEM . ':unix_socket=' . DB_SOCKET . ';dbname=' . DB_NAME; |