@@ -7,4 +7,4 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | ?> |
| 9 | 9 | <?php echo '<' . '?xml version="1.0" ?' . '>'; ?> |
| 10 | -<?=$this->content;?> |
|
| 11 | 10 | \ No newline at end of file |
| 11 | +<?=$this->content; ?> |
|
| 12 | 12 | \ No newline at end of file |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | <!doctype html> |
| 10 | 10 | <html> |
| 11 | 11 | <head> |
| 12 | - <?php echo $this->html->charset();?> |
|
| 12 | + <?php echo $this->html->charset(); ?> |
|
| 13 | 13 | <title>Application > <?php echo $this->title(); ?></title> |
| 14 | 14 | <?php echo $this->html->style(array('bootstrap.min', 'lithified')); ?> |
| 15 | 15 | <?php echo $this->scripts(); ?> |
@@ -51,11 +51,11 @@ |
||
| 51 | 51 | <h3>Configuration</h3> |
| 52 | 52 | <p> |
| 53 | 53 | This layout can be changed by modifying |
| 54 | - <code><?="{$path}/views/layouts/error.html.php";?></code> |
|
| 54 | + <code><?="{$path}/views/layouts/error.html.php"; ?></code> |
|
| 55 | 55 | </p> |
| 56 | 56 | <p> |
| 57 | 57 | To modify your error-handling configuration, see |
| 58 | - <code><?="{$path}/config/bootstrap/errors.php";?></code> |
|
| 58 | + <code><?="{$path}/config/bootstrap/errors.php"; ?></code> |
|
| 59 | 59 | </p> |
| 60 | 60 | </div> |
| 61 | 61 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | <h3>Exception</h3> |
| 35 | 35 | |
| 36 | 36 | <div class="lithium-exception-class"> |
| 37 | - <?=get_class($exception);?> |
|
| 37 | + <?=get_class($exception); ?> |
|
| 38 | 38 | |
| 39 | 39 | <?php if ($code = $exception->getCode()): ?> |
| 40 | 40 | <span class="lithium-exception-code">(code <?=$code; ?>)</span> |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | if ($frame['line'] === $num): |
| 81 | 81 | ?><span class="code-highlight"><?php |
| 82 | - endif;?><?php echo "{$content}\n"; ?><?php |
|
| 82 | + endif; ?><?php echo "{$content}\n"; ?><?php |
|
| 83 | 83 | if ($frame['line'] === $num): |
| 84 | 84 | ?></span><?php |
| 85 | 85 | endif; |
@@ -21,17 +21,32 @@ |
||
| 21 | 21 | |
| 22 | 22 | use app\controllers\SettingsController; |
| 23 | 23 | |
| 24 | -class SettingsControllerTest extends \lithium\test\Unit { |
|
| 24 | +class SettingsControllerTest 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 | - public function testIndex() {} |
|
| 31 | - public function testView() {} |
|
| 32 | - public function testAdd() {} |
|
| 33 | - public function testEdit() {} |
|
| 34 | - public function testDelete() {} |
|
| 35 | + public function testIndex() |
|
| 36 | + { |
|
| 37 | +} |
|
| 38 | + public function testView() |
|
| 39 | + { |
|
| 40 | +} |
|
| 41 | + public function testAdd() |
|
| 42 | + { |
|
| 43 | +} |
|
| 44 | + public function testEdit() |
|
| 45 | + { |
|
| 46 | +} |
|
| 47 | + public function testDelete() |
|
| 48 | + { |
|
| 49 | +} |
|
| 35 | 50 | } |
| 36 | 51 | |
| 37 | 52 | ?> |
@@ -22,19 +22,23 @@ discard block |
||
| 22 | 22 | use app\models\Settings; |
| 23 | 23 | use lithium\action\DispatchException; |
| 24 | 24 | |
| 25 | -class SettingsController extends \lithium\action\Controller { |
|
| 25 | +class SettingsController extends \lithium\action\Controller |
|
| 26 | +{ |
|
| 26 | 27 | |
| 27 | - public function index() { |
|
| 28 | + public function index() |
|
| 29 | + { |
|
| 28 | 30 | $settings = Settings::all(); |
| 29 | 31 | return compact('settings'); |
| 30 | 32 | } |
| 31 | 33 | |
| 32 | - public function view() { |
|
| 34 | + public function view() |
|
| 35 | + { |
|
| 33 | 36 | $setting = Settings::first($this->request->id); |
| 34 | 37 | return compact('setting'); |
| 35 | 38 | } |
| 36 | 39 | |
| 37 | - public function add() { |
|
| 40 | + public function add() |
|
| 41 | + { |
|
| 38 | 42 | $setting = Settings::create(); |
| 39 | 43 | |
| 40 | 44 | if (($this->request->data) && $setting->save($this->request->data)) { |
@@ -43,7 +47,8 @@ discard block |
||
| 43 | 47 | return compact('setting'); |
| 44 | 48 | } |
| 45 | 49 | |
| 46 | - public function edit() { |
|
| 50 | + public function edit() |
|
| 51 | + { |
|
| 47 | 52 | $setting = Settings::find($this->request->id); |
| 48 | 53 | |
| 49 | 54 | if (!$setting) { |
@@ -55,7 +60,8 @@ discard block |
||
| 55 | 60 | return compact('setting'); |
| 56 | 61 | } |
| 57 | 62 | |
| 58 | - public function delete() { |
|
| 63 | + public function delete() |
|
| 64 | + { |
|
| 59 | 65 | if (!$this->request->is('post') && !$this->request->is('delete')) { |
| 60 | 66 | $msg = "Settings::delete can only be called with http:post or http:delete."; |
| 61 | 67 | throw new DispatchException($msg); |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | { |
| 150 | 150 | parent::_init(); |
| 151 | 151 | |
| 152 | - $this->request->params['args'] += ['sqlcheck' => 'all']; // Default to all versions/ |
|
| 152 | + $this->request->params['args'] += ['sqlcheck' => 'all']; // Default to all versions/ |
|
| 153 | 153 | $this->versions = new Versions(); |
| 154 | 154 | } |
| 155 | 155 | } |
@@ -10,8 +10,7 @@ |
||
| 10 | 10 | $captcha = new Captcha($page); |
| 11 | 11 | $email = $sent = $confirmed = ''; |
| 12 | 12 | switch ((isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view')) { |
| 13 | - case "reset": |
|
| 14 | - if (!isset($_REQUEST['guid'])) { |
|
| 13 | + case "reset" : if (!isset($_REQUEST['guid'])) { |
|
| 15 | 14 | $page->smarty->assign('error', "No reset code provided."); |
| 16 | 15 | break; |
| 17 | 16 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $page->smarty->assign('subject', $searchString); |
| 44 | 44 | break; |
| 45 | 45 | case isset($_REQUEST["id"]): |
| 46 | - $searchString =(string)$_REQUEST["id"]; |
|
| 46 | + $searchString = (string)$_REQUEST["id"]; |
|
| 47 | 47 | $page->smarty->assign('search', $searchString); |
| 48 | 48 | break; |
| 49 | 49 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | ]; |
| 89 | 89 | |
| 90 | 90 | foreach ($searchVars as $searchVarKey => $searchVar) { |
| 91 | - $searchVars[$searchVarKey] = (isset($_REQUEST[$searchVarKey]) ? (string) $_REQUEST[$searchVarKey] : ''); |
|
| 91 | + $searchVars[$searchVarKey] = (isset($_REQUEST[$searchVarKey]) ? (string)$_REQUEST[$searchVarKey] : ''); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | $searchVars['selectedgroup'] = $searchVars['searchadvgroups']; |