mirror of
				https://github.com/brmlab/brmsklad.git
				synced 2025-10-31 16:23:59 +01:00 
			
		
		
		
	Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
		
							parent
							
								
									5a580df460
								
							
						
					
					
						commit
						235a541597
					
				
					 793 changed files with 60746 additions and 23753 deletions
				
			
		|  | @ -5,19 +5,9 @@ | |||
|  * This file is application-wide controller file. You can put all | ||||
|  * application-wide controller-related methods here. | ||||
|  * | ||||
|  * PHP 5 | ||||
|  * | ||||
|  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | ||||
|  * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * | ||||
|  * Licensed under The MIT License | ||||
|  * Redistributions of files must retain the above copyright notice. | ||||
|  * | ||||
|  * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * @link          http://cakephp.org CakePHP(tm) Project | ||||
|  * @package       app.Controller | ||||
|  * @since         CakePHP(tm) v 0.2.9 | ||||
|  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php) | ||||
|  */ | ||||
| 
 | ||||
| App::uses('Controller', 'Controller'); | ||||
|  | @ -28,8 +18,8 @@ App::uses('Controller', 'Controller'); | |||
|  * Add your application-wide methods in the class below, your controllers | ||||
|  * will inherit them. | ||||
|  * | ||||
|  * @package       app.Controller | ||||
|  * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
 | ||||
|  * @package		app.Controller | ||||
|  * @link		http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
 | ||||
|  */ | ||||
| class AppController extends Controller { | ||||
| } | ||||
|  |  | |||
|  | @ -4,21 +4,13 @@ | |||
|  * | ||||
|  * This file will render views from views/pages/ | ||||
|  * | ||||
|  * PHP 5 | ||||
|  * | ||||
|  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | ||||
|  * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * | ||||
|  * Licensed under The MIT License | ||||
|  * Redistributions of files must retain the above copyright notice. | ||||
|  * | ||||
|  * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * @link          http://cakephp.org CakePHP(tm) Project | ||||
|  * @package       app.Controller | ||||
|  * @since         CakePHP(tm) v 0.2.9 | ||||
|  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php) | ||||
|  */ | ||||
| 
 | ||||
| App::uses('AppController', 'Controller'); | ||||
| 
 | ||||
| /** | ||||
|  * Static content controller | ||||
|  * | ||||
|  | @ -39,16 +31,22 @@ class PagesController extends AppController { | |||
| /** | ||||
|  * Displays a view | ||||
|  * | ||||
|  * @param string What page to display | ||||
|  * @return void | ||||
|  * @throws ForbiddenException When a directory traversal attempt. | ||||
|  * @throws NotFoundException When the view file could not be found | ||||
|  *   or MissingViewException in debug mode. | ||||
|  */ | ||||
| 	public function display() { | ||||
| 		$path = func_get_args(); | ||||
| 
 | ||||
| 		$count = count($path); | ||||
| 		if (!$count) { | ||||
| 			$this->redirect('/'); | ||||
| 			return $this->redirect('/'); | ||||
| 		} | ||||
| 		$page = $subpage = $title = null; | ||||
| 		if (in_array('..', $path, true) || in_array('.', $path, true)) { | ||||
| 			throw new ForbiddenException(); | ||||
| 		} | ||||
| 		$page = $subpage = $title_for_layout = null; | ||||
| 
 | ||||
| 		if (!empty($path[0])) { | ||||
| 			$page = $path[0]; | ||||
|  | @ -57,11 +55,17 @@ class PagesController extends AppController { | |||
| 			$subpage = $path[1]; | ||||
| 		} | ||||
| 		if (!empty($path[$count - 1])) { | ||||
| 			$title = Inflector::humanize($path[$count - 1]); | ||||
| 			$title_for_layout = Inflector::humanize($path[$count - 1]); | ||||
| 		} | ||||
| 		$this->set(compact('page', 'subpage')); | ||||
| 		$this->set('title_for_layout', $title); | ||||
| 		$this->render(implode('/', $path)); | ||||
| 	} | ||||
| 		$this->set(compact('page', 'subpage', 'title_for_layout')); | ||||
| 
 | ||||
| 		try { | ||||
| 			$this->render(implode('/', $path)); | ||||
| 		} catch (MissingViewException $e) { | ||||
| 			if (Configure::read('debug')) { | ||||
| 				throw $e; | ||||
| 			} | ||||
| 			throw new NotFoundException(); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brm Ko
						Brm Ko