diff --git a/app/app_controller.php b/app/app_controller.php index ed671b394..db52d1714 100644 --- a/app/app_controller.php +++ b/app/app_controller.php @@ -1,104 +1,114 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: AppController - * Enter description here... - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.app - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - -/** - * Enter description here... - * - * - * @package cake - * @subpackage cake.app - * @since Cake v 0.2.9 - * - */ -class AppController extends Controller { - -/** - * Enter description here... - * - * @param unknown_type $tags - * @param unknown_type $active - * @return unknown - */ - function tags_as_links ($tags, $active=array()) { - $tags = is_array($tags)? $tags: Tag::split_tags($tags); - - $links = array(); - foreach ($tags as $tag) { - - if (in_array($tag, $active)) - $url_tags = $this->array_except($active, $tag); - else - $url_tags = array_merge($active, array($tag)); - - $url = '/memes/with_tags/'.$this->tags_to_url($url_tags); - - $links[] = $this->link_to($tag, $url, in_array($tag, $active)? array('class'=>'active_tag'): null); - } - - return join(' ', $links); - } - -/** - * Enter description here... - * - * @param unknown_type $array - * @param unknown_type $except - * @return unknown - */ - function array_except ($array, $except) { - if (!is_array($except)) $except = array($except); - $out = array(); - - foreach ($array as $k=>$v) { - if (!in_array($v, $except)) - $out[$k] = $v; - } - - return $out; - } - -/** - * Enter description here... - * - * @param unknown_type $tags - * @return unknown - */ - function tags_to_url ($tags) { - $out = array(); - foreach ($tags as $tag) - $out[] = urlencode($tag); - - return join('+', $out); - } - -} - + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: AppController + * Enter description here... + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.app + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + +/** + * Enter description here... + * + * + * @package cake + * @subpackage cake.app + * @since Cake v 0.2.9 + * + */ +class AppController extends Controller { + +/** + * Enter description here... + * + * @param unknown_type $tags + * @param unknown_type $active + * @return unknown + */ + function tags_as_links ($tags, $active=array()) { + $tags = is_array($tags)? $tags: Tag::split_tags($tags); + + $links = array(); + foreach ($tags as $tag) { + + if (in_array($tag, $active)) + $url_tags = $this->array_except($active, $tag); + else + $url_tags = array_merge($active, array($tag)); + + $url = '/memes/with_tags/'.$this->tags_to_url($url_tags); + + $links[] = $this->link_to($tag, $url, in_array($tag, $active)? array('class'=>'active_tag'): null); + } + + return join(' ', $links); + } + +/** + * Enter description here... + * + * @param unknown_type $array + * @param unknown_type $except + * @return unknown + */ + function array_except ($array, $except) { + if (!is_array($except)) $except = array($except); + $out = array(); + + foreach ($array as $k=>$v) { + if (!in_array($v, $except)) + $out[$k] = $v; + } + + return $out; + } + +/** + * Enter description here... + * + * @param unknown_type $tags + * @return unknown + */ + function tags_to_url ($tags) { + $out = array(); + foreach ($tags as $tag) + $out[] = urlencode($tag); + + return join('+', $out); + } + +} + ?> \ No newline at end of file diff --git a/app/app_model.php b/app/app_model.php index 4cb24687f..61531c488 100644 --- a/app/app_model.php +++ b/app/app_model.php @@ -1,44 +1,54 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: AppModel - * Enter description here... - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.app - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - -/** - * Enter description here... - * - * - * @package cake - * @subpackage cake.app - * @since Cake v 0.2.9 - * - */ -class AppModel extends Model { -} - + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: AppModel + * Enter description here... + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.app + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + +/** + * Enter description here... + * + * + * @package cake + * @subpackage cake.app + * @since Cake v 0.2.9 + * + */ +class AppModel extends Model { +} + ?> \ No newline at end of file diff --git a/app/views/layouts/default.thtml b/app/views/layouts/default.thtml index 148df5885..1af4dead0 100644 --- a/app/views/layouts/default.thtml +++ b/app/views/layouts/default.thtml @@ -1,14 +1,14 @@ - - - - <?=$title_for_layout?> - - - - - - - - - - + + + + <?=$title_for_layout?> + + + + + + + + + + diff --git a/config/database.php b/config/database.php index 366fa0de0..078890a0b 100644 --- a/config/database.php +++ b/config/database.php @@ -1,41 +1,51 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: - * Enter description here... - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.config - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - -$DATABASE_CONFIG = array( - 'devel' => array( - 'host' => 'localhost', - 'login' => 'www', - 'password' => 'www', - 'database' => 'ease' - ) -); - + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: + * Enter description here... + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.config + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + +$DATABASE_CONFIG = array( + 'devel' => array( + 'host' => 'localhost', + 'login' => 'www', + 'password' => 'www', + 'database' => 'ease' + ) +); + ?> \ No newline at end of file diff --git a/config/database.php.default b/config/database.php.default index 142496aa0..d8be2d60f 100644 --- a/config/database.php.default +++ b/config/database.php.default @@ -1,41 +1,51 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: - * Enter description here... - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.config - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - -$DATABASE_CONFIG = array( - 'devel' => array( - 'host' => 'localhost', - 'login' => 'cake', - 'password' => 'cake', - 'database' => 'cake' - ) -); - + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: + * Enter description here... + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.config + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + +$DATABASE_CONFIG = array( + 'devel' => array( + 'host' => 'localhost', + 'login' => 'cake', + 'password' => 'cake', + 'database' => 'cake' + ) +); + ?> \ No newline at end of file diff --git a/config/routes.php b/config/routes.php index 053b888e7..bca51a0ff 100644 --- a/config/routes.php +++ b/config/routes.php @@ -1,42 +1,52 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: - * Enter description here... - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.config - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - -# Homepage -$Route->connect ('/', array('controller'=>'Memes', 'action'=>'add')); - -# Tags -$Route->connect ('/tags/popular', array('controller'=>'Tags', 'action'=>'popular')); -$Route->connect ('/tags/*', array('controller'=>'Memes', 'action'=>'with_tags')); - -# Default route -$Route->connect ('/:controller/:action/*'); - + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: + * Enter description here... + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.config + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + +# Homepage +$Route->connect ('/', array('controller'=>'Memes', 'action'=>'add')); + +# Tags +$Route->connect ('/tags/popular', array('controller'=>'Tags', 'action'=>'popular')); +$Route->connect ('/tags/*', array('controller'=>'Memes', 'action'=>'with_tags')); + +# Default route +$Route->connect ('/:controller/:action/*'); + ?> \ No newline at end of file diff --git a/config/routes.php.default b/config/routes.php.default index 0c14b5d4a..dd285ecd8 100644 --- a/config/routes.php.default +++ b/config/routes.php.default @@ -1,44 +1,54 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: - * Enter description here... - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.config - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - -# Homepage -$Route->connect ('/', array('controller'=>'Pages', 'action'=>'view', 'home')); - -# Source browser -#$Route->connect ('/sources/*', array('controller'=>'Sources', 'action'=>'index')); - -# Content pages -#$Route->connect ('/*', array('controller'=>'Pages', 'action'=>'view')); - -# Default route -$Route->connect ('/:controller/:action/*'); - + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: + * Enter description here... + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.config + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + +# Homepage +$Route->connect ('/', array('controller'=>'Pages', 'action'=>'view', 'home')); + +# Source browser +#$Route->connect ('/sources/*', array('controller'=>'Sources', 'action'=>'index')); + +# Content pages +#$Route->connect ('/*', array('controller'=>'Pages', 'action'=>'view')); + +# Default route +$Route->connect ('/:controller/:action/*'); + ?> \ No newline at end of file diff --git a/index.php b/index.php index e8ae9387e..9d987bd0b 100644 --- a/index.php +++ b/index.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -16,14 +23,17 @@ * Enter description here... * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/bake.php b/libs/bake.php index cf843b032..00a81be83 100644 --- a/libs/bake.php +++ b/libs/bake.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -18,15 +25,18 @@ * Used by scripts/add.php * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/basics.php b/libs/basics.php index 7a27edf4e..acd3f6c7b 100644 --- a/libs/basics.php +++ b/libs/basics.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -17,15 +24,18 @@ * Basic Cake functionalities. * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/cache.php b/libs/cache.php index 3f422e78d..998a1d25b 100644 --- a/libs/cache.php +++ b/libs/cache.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -17,15 +24,18 @@ * Description: * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/controller.php b/libs/controller.php index 31883ba34..3bdcf93d6 100644 --- a/libs/controller.php +++ b/libs/controller.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -20,15 +27,18 @@ * and creates the model object if proper class exists. * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/dbo-ado.php b/libs/dbo-ado.php index cd7247e43..3d281d9b9 100644 --- a/libs/dbo-ado.php +++ b/libs/dbo-ado.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -50,15 +57,18 @@ * * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/dbo.php b/libs/dbo.php index 3490167d7..e7eae60da 100644 --- a/libs/dbo.php +++ b/libs/dbo.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -49,15 +56,18 @@ * * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/dispatcher.php b/libs/dispatcher.php index 492cc11c8..4f34b3dad 100644 --- a/libs/dispatcher.php +++ b/libs/dispatcher.php @@ -1,203 +1,213 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: Dispatcher - * Dispatches the request, creating aproppriate models and controllers. - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.libs - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - -/** - * Enter description here... - * - */ -uses('error_messages', 'object', 'router', 'cache', 'controller'); - -/** - * Enter description here... - * - * - * @package cake - * @subpackage cake.libs - * @since Cake v 0.2.9 - * - */ -class Dispatcher extends Object { -/** - * Enter description here... - * - * @var unknown_type - */ - var $base = false; -/** - * Enter description here... - * - * @var unknown_type - */ - var $passed_args = array(); - -/** - * Enter description here... - * - */ - function __construct () { - parent::__construct(); - } - -/** - * Enter description here... - * - * @param unknown_type $url - * @return unknown - */ - function dispatch ($url) { - global $_POST, $_GET, $_FILES, $_SESSION; - - if (CACHE_PAGES) { - $Cache = new Cache($url); - if ($Cache->has()) return print $Cache->restore(); - } - - $this->base = $this->parse_base_url(); - - $params = $this->parse_params($url); - - if (empty($params['controller'])) { - DEBUG? - trigger_error (ERROR_NO_CONTROLLER_SET, E_USER_ERROR): - $this->error('404', 'Not found', "The requested URL /{$url} was not found on this server (no controller set)."); - exit; - } - - $controller_class = ucfirst($params['controller']).'Controller'; - - if (!class_exists($controller_class)) { - DEBUG? - trigger_error (sprintf(ERROR_UNKNOWN_CONTROLLER, $controller_class), E_USER_ERROR): - $this->error('404', 'Not found', sprintf(ERROR_404, $url, "missing controller \"{$params['controller']}\"")); - exit; - } - - $controller = new $controller_class ($this); - $controller->cache = &$Cache; - $controller->base = $this->base; - - // if action is not set, and the default Controller::index() method doesn't exist - if (!$params['action'] && !method_exists($controller, 'index')) { - DEBUG? - trigger_error (ERROR_NO_ACTION_SET, E_USER_ERROR): - $this->error('404', 'Not found', "The requested URL /{$url} was not found on this server (no action set)."); - exit; - } - elseif (empty($params['action'])) { - $params['action'] = 'index'; - } - - // if the requested action doesn't exist - if (!method_exists($controller, $params['action'])) { - DEBUG? - trigger_error (sprintf(ERROR_NO_ACTION, $params['action'], $controller_class), E_USER_ERROR): - $this->error('404', 'Not found', sprintf(ERROR_404, $url, "missing controller \"{$params['controller']}\"")); - exit; - } - - $controller->params = $params; - empty($params['data'])? null: $controller->data = $params['data']; - $controller->action = $params['action']; - $controller->passed_args = empty($params['pass'])? null: $params['pass']; - - // EXECUTE THE REQUESTED ACTION - call_user_func_array(array(&$controller, $params['action']), empty($params['pass'])? null: $params['pass']); - - if ($controller->auto_render) - $controller->render(); - - if (CACHE_PAGES) $Cache->remember(null); - - return $params; - } - -/** - * Enter description here... - * - * @param unknown_type $from_url - * @return unknown - */ - function parse_params ($from_url) { - global $_POST, $_FILES; - - // load routes config - $Route = new Router(); - require CONFIGS.'routes.php'; - $params = $Route->parse ('/'.$from_url); - - // add submitted form data - $params['form'] = $_POST; - if (isset($_POST['data'])) - $params['data'] = $_POST['data']; - foreach ($_FILES as $name => $data) - $params['form'][$name] = $data; - - return $params; - } - -/** - * Enter description here... - * - * @return unknown - */ - function parse_base_url () { - global $_SERVER; - //non mod_rewrite use: - if (defined('BASE_URL')) return BASE_URL; - - - $doc_root = $_SERVER['DOCUMENT_ROOT']; - $script_name = $_SERVER['SCRIPT_NAME']; - - // if document root ends with 'public', it's probably correctly set - $r = null; - if (!ereg('/^.*/public(\/)?$/', $doc_root)) - return preg_match('/^(.*)\/public\/dispatch\.php$/', $script_name, $r)? $r[1]: false; - // document root is probably not set to Cake 'public' dir - else - return preg_match('/^(.*)\/dispatch\.php$/', $script_name, $r)? $r[1]: false; - } - -/** - * Enter description here... - * - * @param unknown_type $code - * @param unknown_type $name - * @param unknown_type $message - */ - function error ($code, $name, $message) { - $controller = new Controller ($this); - $controller->base = $this->base; - $controller->error($code, $name, $message); - } -} - -?> + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: Dispatcher + * Dispatches the request, creating aproppriate models and controllers. + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.libs + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + +/** + * Enter description here... + * + */ +uses('error_messages', 'object', 'router', 'cache', 'controller'); + +/** + * Enter description here... + * + * + * @package cake + * @subpackage cake.libs + * @since Cake v 0.2.9 + * + */ +class Dispatcher extends Object { +/** + * Enter description here... + * + * @var unknown_type + */ + var $base = false; +/** + * Enter description here... + * + * @var unknown_type + */ + var $passed_args = array(); + +/** + * Enter description here... + * + */ + function __construct () { + parent::__construct(); + } + +/** + * Enter description here... + * + * @param unknown_type $url + * @return unknown + */ + function dispatch ($url) { + global $_POST, $_GET, $_FILES, $_SESSION; + + if (CACHE_PAGES) { + $Cache = new Cache($url); + if ($Cache->has()) return print $Cache->restore(); + } + + $this->base = $this->parse_base_url(); + + $params = $this->parse_params($url); + + if (empty($params['controller'])) { + DEBUG? + trigger_error (ERROR_NO_CONTROLLER_SET, E_USER_ERROR): + $this->error('404', 'Not found', "The requested URL /{$url} was not found on this server (no controller set)."); + exit; + } + + $controller_class = ucfirst($params['controller']).'Controller'; + + if (!class_exists($controller_class)) { + DEBUG? + trigger_error (sprintf(ERROR_UNKNOWN_CONTROLLER, $controller_class), E_USER_ERROR): + $this->error('404', 'Not found', sprintf(ERROR_404, $url, "missing controller \"{$params['controller']}\"")); + exit; + } + + $controller = new $controller_class ($this); + $controller->cache = &$Cache; + $controller->base = $this->base; + + // if action is not set, and the default Controller::index() method doesn't exist + if (!$params['action'] && !method_exists($controller, 'index')) { + DEBUG? + trigger_error (ERROR_NO_ACTION_SET, E_USER_ERROR): + $this->error('404', 'Not found', "The requested URL /{$url} was not found on this server (no action set)."); + exit; + } + elseif (empty($params['action'])) { + $params['action'] = 'index'; + } + + // if the requested action doesn't exist + if (!method_exists($controller, $params['action'])) { + DEBUG? + trigger_error (sprintf(ERROR_NO_ACTION, $params['action'], $controller_class), E_USER_ERROR): + $this->error('404', 'Not found', sprintf(ERROR_404, $url, "missing controller \"{$params['controller']}\"")); + exit; + } + + $controller->params = $params; + empty($params['data'])? null: $controller->data = $params['data']; + $controller->action = $params['action']; + $controller->passed_args = empty($params['pass'])? null: $params['pass']; + + // EXECUTE THE REQUESTED ACTION + call_user_func_array(array(&$controller, $params['action']), empty($params['pass'])? null: $params['pass']); + + if ($controller->auto_render) + $controller->render(); + + if (CACHE_PAGES) $Cache->remember(null); + + return $params; + } + +/** + * Enter description here... + * + * @param unknown_type $from_url + * @return unknown + */ + function parse_params ($from_url) { + global $_POST, $_FILES; + + // load routes config + $Route = new Router(); + require CONFIGS.'routes.php'; + $params = $Route->parse ('/'.$from_url); + + // add submitted form data + $params['form'] = $_POST; + if (isset($_POST['data'])) + $params['data'] = $_POST['data']; + foreach ($_FILES as $name => $data) + $params['form'][$name] = $data; + + return $params; + } + +/** + * Enter description here... + * + * @return unknown + */ + function parse_base_url () { + global $_SERVER; + //non mod_rewrite use: + if (defined('BASE_URL')) return BASE_URL; + + + $doc_root = $_SERVER['DOCUMENT_ROOT']; + $script_name = $_SERVER['SCRIPT_NAME']; + + // if document root ends with 'public', it's probably correctly set + $r = null; + if (!ereg('/^.*/public(\/)?$/', $doc_root)) + return preg_match('/^(.*)\/public\/dispatch\.php$/', $script_name, $r)? $r[1]: false; + // document root is probably not set to Cake 'public' dir + else + return preg_match('/^(.*)\/dispatch\.php$/', $script_name, $r)? $r[1]: false; + } + +/** + * Enter description here... + * + * @param unknown_type $code + * @param unknown_type $name + * @param unknown_type $message + */ + function error ($code, $name, $message) { + $controller = new Controller ($this); + $controller->base = $this->base; + $controller->error($code, $name, $message); + } +} + +?> diff --git a/libs/error_messages.php b/libs/error_messages.php index f33a8a702..27a605185 100644 --- a/libs/error_messages.php +++ b/libs/error_messages.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -16,15 +23,18 @@ * Purpose: Error Messages Defines * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/flay.php b/libs/flay.php index 60fec2987..1cf7a6180 100644 --- a/libs/flay.php +++ b/libs/flay.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -19,15 +26,18 @@ * Test with $flay = new Flay(); $flay->test(); * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/folder.php b/libs/folder.php index a87182967..3e720b71e 100644 --- a/libs/folder.php +++ b/libs/folder.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -17,15 +24,18 @@ * Folder structure browser, lists folders and files. * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/inflector.php b/libs/inflector.php index d5d3ca3c7..86e166e3c 100644 --- a/libs/inflector.php +++ b/libs/inflector.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -19,15 +26,18 @@ * Test with $i = new Inflector(); $i->test(); * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/legacy.php b/libs/legacy.php index 2d1618d5c..b4b9805a4 100644 --- a/libs/legacy.php +++ b/libs/legacy.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -18,15 +25,18 @@ * * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/model.php b/libs/model.php index adb441713..b6f801a54 100644 --- a/libs/model.php +++ b/libs/model.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -24,15 +31,18 @@ * - schema-related cross-table ($has_one, $has_many, $belongs_to) * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/object.php b/libs/object.php index 50e9ab0a9..fee71999d 100644 --- a/libs/object.php +++ b/libs/object.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -16,15 +23,18 @@ * Purpose: Object * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/router.php b/libs/router.php index 230015e40..dc0c082a7 100644 --- a/libs/router.php +++ b/libs/router.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -17,15 +24,18 @@ * Parses the request URL into controller, action, and params * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/template.php b/libs/template.php index 82394a947..fc2a2aeb1 100644 --- a/libs/template.php +++ b/libs/template.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -17,15 +24,18 @@ * Templating for Controller class. * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/time.php b/libs/time.php index b4b1d0b98..87cbb0a27 100644 --- a/libs/time.php +++ b/libs/time.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -17,15 +24,18 @@ * Time related functions, formatting for dates etc. * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/libs/validators.php b/libs/validators.php index 1b92a9842..b4ae158b3 100644 --- a/libs/validators.php +++ b/libs/validators.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -17,15 +24,18 @@ * Used to validate data in Models. * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.libs * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/public/dispatch.php b/public/dispatch.php index 6f0afaff6..21fd7d84b 100644 --- a/public/dispatch.php +++ b/public/dispatch.php @@ -1,110 +1,120 @@ - + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // -// + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // -// + + // -// +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // -// +------------------------------------------------------------------+ // -////////////////////////////////////////////////////////////////////////// - -/** - * Purpose: Dispatch - * The main "loop" - * - * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz - * @package cake - * @subpackage cake.public - * @since Cake v 0.2.9 - * @version $Revision$ - * @license Public_Domain - * - */ - - -## DIRECTORY LAYOUT -/** - * Enter description here... - * - */ -define ('ROOT', '../'); -/** - * Enter description here... - * - */ -define ('APP', ROOT.'app/'); -/** - * Enter description here... - * - */ -define ('MODELS', APP.'models/'); -/** - * Enter description here... - * - */ -define ('CONTROLLERS', APP.'controllers/'); -/** - * Enter description here... - * - */ -define ('VIEWS', APP.'views/'); -/** - * Enter description here... - * - */ -define ('CONFIGS', ROOT.'config/'); -/** - * Enter description here... - * - */ -define ('LIBS', ROOT.'libs/'); -/** - * Enter description here... - * - */ -define ('PUBLIC', ROOT.'public/'); - -## STARTUP -/** - * Enter description here... - * - */ -require (LIBS.'basics.php'); -uses ('dispatcher', 'dbo'); -uses_config(); -uses_database(); -uses_tags(); - -## LOAD MODELS & CONTROLLERS -## -load_models (); -load_controllers (); - -## START SESSION -## -session_start(); - -## RUN THE SCRIPT -## -$url = empty($_GET['url'])? null: $_GET['url']; -$DISPATCHER = new Dispatcher (); -$DISPATCHER->dispatch($url); - -## PRINT TIMING -## - -/** - * Enter description here... - * - */ -if (DEBUG) echo ""; - -?> + + // +// + Copyright: (c) 2005 Cake Authors/Developers + // +// + + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // +// + + // +// +------------------------------------------------------------------+ // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // +// +------------------------------------------------------------------+ // +////////////////////////////////////////////////////////////////////////// + +/** + * Purpose: Dispatch + * The main "loop" + * + * @filesource + * @author Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers + * @package cake + * @subpackage cake.public + * @since Cake v 0.2.9 + * @version $Revision$ + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * + */ + + +## DIRECTORY LAYOUT +/** + * Enter description here... + * + */ +define ('ROOT', '../'); +/** + * Enter description here... + * + */ +define ('APP', ROOT.'app/'); +/** + * Enter description here... + * + */ +define ('MODELS', APP.'models/'); +/** + * Enter description here... + * + */ +define ('CONTROLLERS', APP.'controllers/'); +/** + * Enter description here... + * + */ +define ('VIEWS', APP.'views/'); +/** + * Enter description here... + * + */ +define ('CONFIGS', ROOT.'config/'); +/** + * Enter description here... + * + */ +define ('LIBS', ROOT.'libs/'); +/** + * Enter description here... + * + */ +define ('PUBLIC', ROOT.'public/'); + +## STARTUP +/** + * Enter description here... + * + */ +require (LIBS.'basics.php'); +uses ('dispatcher', 'dbo'); +uses_config(); +uses_database(); +uses_tags(); + +## LOAD MODELS & CONTROLLERS +## +load_models (); +load_controllers (); + +## START SESSION +## +session_start(); + +## RUN THE SCRIPT +## +$url = empty($_GET['url'])? null: $_GET['url']; +$DISPATCHER = new Dispatcher (); +$DISPATCHER->dispatch($url); + +## PRINT TIMING +## + +/** + * Enter description here... + * + */ +if (DEBUG) echo ""; + +?> diff --git a/public/index.php b/public/index.php index f20982f0c..351b9cb30 100644 --- a/public/index.php +++ b/public/index.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -16,15 +23,18 @@ * Enter description here... * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.public * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ diff --git a/scripts/add.php b/scripts/add.php index c2d4a2289..157297138 100644 --- a/scripts/add.php +++ b/scripts/add.php @@ -2,13 +2,20 @@ ////////////////////////////////////////////////////////////////////////// // + $Id$ // +------------------------------------------------------------------+ // -// + Cake + // -// + Copyright: (c) 2005 Michal Tatarynowicz + // +// + Cake + // +// + Copyright: (c) 2005 Cake Authors/Developers + // // + + // -// + Author(s): (c) 2005 Michal Tatarynowicz + // +// + Author(s): Michal Tatarynowicz aka Pies + // +// + Larry E. Masters aka PhpNut + // +// + Kamil Dzielinski aka Brego + // // + + // // +------------------------------------------------------------------+ // -// + Licensed under the Public Domain Licence + // +// + Licensed under The MIT License + // +// + Redistributions of files must retain the above copyright notice. + // +// + You may not use this file except in compliance with the License. + // +// + + // +// + You may obtain a copy of the License at: + // +// + License page: http://www.opensource.org/licenses/mit-license.php + // // +------------------------------------------------------------------+ // ////////////////////////////////////////////////////////////////////////// @@ -16,15 +23,18 @@ * Enter description here... * * @filesource - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @author Michal Tatarynowicz - * @copyright Copyright (c) 2005, Michal Tatarynowicz + * @author Larry E. Masters aka PhpNut + * @author Kamil Dzielinski aka Brego + * @copyright Copyright (c) 2005, Cake Authors/Developers + * @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers * @package cake * @subpackage cake.scripts * @since Cake v 0.2.9 * @version $Revision$ - * @license Public_Domain + * @modifiedby $LastChangedBy$ + * @lastmodified $Date$ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ ## DIRECTORIES