@@ -21,11 +21,16 @@ |
||
| 21 | 21 | |
| 22 | 22 | use app\models\Settings; |
| 23 | 23 | |
| 24 | -class SettingsTest extends \lithium\test\Unit { |
|
| 24 | +class SettingsTest extends \lithium\test\Unit |
|
| 25 | +{ |
|
| 25 | 26 | |
| 26 | - public function setUp() {} |
|
| 27 | + public function setUp() |
|
| 28 | + { |
|
| 29 | +} |
|
| 27 | 30 | |
| 28 | - public function tearDown() {} |
|
| 31 | + public function tearDown() |
|
| 32 | + { |
|
| 33 | +} |
|
| 29 | 34 | |
| 30 | 35 | public function testHasAllEntries() |
| 31 | 36 | { |
@@ -6,13 +6,13 @@ |
||
| 6 | 6 | |
| 7 | 7 | $page = new AdminPage(); |
| 8 | 8 | |
| 9 | -if (isset($_GET['id'])) |
|
| 10 | -{ |
|
| 9 | +if (isset($_GET['id'])) { |
|
| 11 | 10 | MultigroupPosters::remove(['id' => $_GET['id']]); |
| 12 | 11 | } |
| 13 | 12 | |
| 14 | -if (isset($_GET['from'])) |
|
| 13 | +if (isset($_GET['from'])) { |
|
| 15 | 14 | $referrer = $_GET['from']; |
| 16 | -else |
|
| 15 | +} else { |
|
| 17 | 16 | $referrer = $_SERVER['HTTP_REFERER']; |
| 17 | +} |
|
| 18 | 18 | header("Location: " . $referrer); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | if ($argc > 1 && $argv[1] === 'true' && isset($argv[2])) { |
| 11 | 11 | if($argv[2] === 'full') { |
| 12 | 12 | (new AniDB(['Settings' => $pdo, 'Echo' => true]))->populateTable('full'); |
| 13 | - } elseif ($argv[2] === 'info'){ |
|
| 13 | + } elseif ($argv[2] === 'info') { |
|
| 14 | 14 | if ($argv[3] !== null && is_numeric($argv[3])) { |
| 15 | 15 | (new AniDB(['Settings' => $pdo, 'Echo' => true]))->populateTable('info', $argv[3]); |
| 16 | 16 | } else { |
@@ -643,14 +643,14 @@ discard block |
||
| 643 | 643 | if (empty($game['title'])) { |
| 644 | 644 | $game['title'] = $gameInfo['title']; |
| 645 | 645 | } |
| 646 | - if(!isset($game['releasedate'])){ |
|
| 646 | + if(!isset($game['releasedate'])) { |
|
| 647 | 647 | $game['releasedate'] = ''; |
| 648 | 648 | } |
| 649 | 649 | |
| 650 | 650 | if ($game['releasedate'] === '') { |
| 651 | 651 | $game['releasedate'] = ''; |
| 652 | 652 | } |
| 653 | - if(!isset($game['review'])){ |
|
| 653 | + if(!isset($game['review'])) { |
|
| 654 | 654 | $game['review'] = 'No Review'; |
| 655 | 655 | } |
| 656 | 656 | $game['classused'] = $this->_classUsed; |
@@ -739,10 +739,10 @@ discard block |
||
| 739 | 739 | ColorCLI::primary($this->_classUsed) |
| 740 | 740 | ); |
| 741 | 741 | } |
| 742 | - if($game['cover'] === 1){ |
|
| 742 | + if($game['cover'] === 1) { |
|
| 743 | 743 | $game['cover'] = $ri->saveImage($gamesId, $game['coverurl'], $this->imgSavePath, 250, 250); |
| 744 | 744 | } |
| 745 | - if($game['backdrop'] === 1){ |
|
| 745 | + if($game['backdrop'] === 1) { |
|
| 746 | 746 | $game['backdrop'] = $ri->saveImage($gamesId . '-backdrop', $game['backdropurl'], $this->imgSavePath, 1920, 1024); |
| 747 | 747 | } |
| 748 | 748 | } else { |
@@ -23,7 +23,8 @@ |
||
| 23 | 23 | * For example, browsing to `/pages/about/company` will render |
| 24 | 24 | * `/views/pages/about/company.html.php`. |
| 25 | 25 | */ |
| 26 | -class PagesController extends \lithium\action\Controller { |
|
| 26 | +class PagesController extends \lithium\action\Controller |
|
| 27 | +{ |
|
| 27 | 28 | |
| 28 | 29 | public function view() |
| 29 | 30 | { |
@@ -747,7 +747,8 @@ discard block |
||
| 747 | 747 | if (!stristr($header['Subject'], 'yEnc')) { |
| 748 | 748 | $header['matches'][1] .= ' yEnc'; |
| 749 | 749 | } |
| 750 | - } else { // It failed to match, so no parts data. Log the Subject IF option is |
|
| 750 | + } else { |
|
| 751 | +// It failed to match, so no parts data. Log the Subject IF option is |
|
| 751 | 752 | // enabled AND it's not prefixed by '"Usenet Index Post' |
| 752 | 753 | if ($this->_showDroppedYEncParts === true && strpos($header['Subject'], '"Usenet Index Post') !== 0) { |
| 753 | 754 | file_put_contents( |
@@ -868,8 +869,7 @@ discard block |
||
| 868 | 869 | "INSERT IGNORE INTO {$this->tableNames['pname']} (binaries_id, number, messageid, partnumber, size) VALUES "; |
| 869 | 870 | |
| 870 | 871 | // Loop articles, figure out files/parts. |
| 871 | - foreach ($headers as $this->header) |
|
| 872 | - { |
|
| 872 | + foreach ($headers as $this->header) { |
|
| 873 | 873 | // Set up the info for inserting into parts/binaries/collections tables. |
| 874 | 874 | if (!isset($articles[$this->header['matches'][1]])) { |
| 875 | 875 | |
@@ -30,7 +30,8 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @package nzedb |
| 32 | 32 | */ |
| 33 | -class API extends Capabilities { |
|
| 33 | +class API extends Capabilities |
|
| 34 | +{ |
|
| 34 | 35 | |
| 35 | 36 | /** Settings class |
| 36 | 37 | * @var \nzedb\db\Settings |
@@ -128,7 +129,7 @@ discard block |
||
| 128 | 129 | $groupName = -1; |
| 129 | 130 | if (isset($this->getRequest['group'])) { |
| 130 | 131 | $group = Groups::isValidName($this->getRequest['group']); |
| 131 | - if ($group !== false){ |
|
| 132 | + if ($group !== false) { |
|
| 132 | 133 | $groupName = $group; |
| 133 | 134 | } |
| 134 | 135 | } |
@@ -193,7 +193,8 @@ |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | $enabled = Settings::value(self::RECAPTCHA_SETTING_ENABLED); |
| 196 | - if (!empty($enabled) && $enabled > 0 ) {// Only disable if the setting exists and is truish. |
|
| 196 | + if (!empty($enabled) && $enabled > 0 ) { |
|
| 197 | +// Only disable if the setting exists and is truish. |
|
| 197 | 198 | $this->sitekey = Settings::value(self::RECAPTCHA_SETTING_SITEKEY); |
| 198 | 199 | $this->secretkey = Settings::value(self::RECAPTCHA_SETTING_SECRETKEY); |
| 199 | 200 | |
@@ -4,11 +4,16 @@ |
||
| 4 | 4 | |
| 5 | 5 | use app\models\Videos; |
| 6 | 6 | |
| 7 | -class VideosTest extends \lithium\test\Unit { |
|
| 7 | +class VideosTest extends \lithium\test\Unit |
|
| 8 | +{ |
|
| 8 | 9 | |
| 9 | - public function setUp() {} |
|
| 10 | + public function setUp() |
|
| 11 | + { |
|
| 12 | +} |
|
| 10 | 13 | |
| 11 | - public function tearDown() {} |
|
| 14 | + public function tearDown() |
|
| 15 | + { |
|
| 16 | +} |
|
| 12 | 17 | |
| 13 | 18 | |
| 14 | 19 | } |