mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix a few more small issues.
This commit is contained in:
parent
12efa3eb70
commit
94b3839b2e
4 changed files with 12 additions and 7 deletions
|
@ -653,7 +653,7 @@ class AuthComponentTest extends CakeTestCase {
|
|||
|
||||
$this->Controller->request['action'] = 'login';
|
||||
$this->assertFalse($this->Controller->Auth->startup($this->Controller));
|
||||
|
||||
|
||||
$this->Controller->Auth->deny();
|
||||
$this->Controller->Auth->allow(null);
|
||||
|
||||
|
|
|
@ -1338,7 +1338,7 @@ class I18nTest extends CakeTestCase {
|
|||
Configure::write('Config.language', 'rule_13_mo');
|
||||
$this->assertRulesThirteen();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testPoRulesThirteen method
|
||||
*
|
||||
|
@ -1427,7 +1427,7 @@ class I18nTest extends CakeTestCase {
|
|||
Configure::write('Config.language', 'rule_14_mo');
|
||||
$this->assertRulesFourteen();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testPoRulesFourteen method
|
||||
*
|
||||
|
|
|
@ -84,7 +84,7 @@ class JqueryEngineHelperTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $this->Jquery->event('click', '$(this).hide();');
|
||||
$expected = '$("#myLink").bind("click", function (event) {$(this).hide();'."\n".'return false;});';
|
||||
$expected = '$("#myLink").bind("click", function (event) {$(this).hide();' . "\n" . 'return false;});';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ class PagesController extends AppController {
|
|||
if (!$count) {
|
||||
$this->redirect('/');
|
||||
}
|
||||
$page = $subpage = $title_for_layout = null;
|
||||
$page = $subpage = $titleForLayout = null;
|
||||
|
||||
if (!empty($path[0])) {
|
||||
$page = $path[0];
|
||||
|
@ -67,9 +67,14 @@ class PagesController extends AppController {
|
|||
$subpage = $path[1];
|
||||
}
|
||||
if (!empty($path[$count - 1])) {
|
||||
$title_for_layout = Inflector::humanize($path[$count - 1]);
|
||||
$titleForLayout = Inflector::humanize($path[$count - 1]);
|
||||
}
|
||||
$this->set(compact('page', 'subpage', 'title_for_layout'));
|
||||
$this->set(array(
|
||||
'page' => $page,
|
||||
'subpage' => $subpage,
|
||||
'title_for_layout' => $titleForLayout
|
||||
));
|
||||
$this->render(implode('/', $path));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue