diff --git a/.gitignore b/.gitignore index 55ec3d1..9c7e3d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,10 @@ -tmp/* -config/database.php -app/tmp/* +app/tmp/ app/config/database.php !empty .buildpath .project -.settings/* +.settings/ -app/webroot/img/thumbs/* -app/webroot/img/uploads/* +app/webroot/img/thumbs/ +app/webroot/img/uploads/ +nbproject diff --git a/README.txt b/README.txt index c278f22..97202b4 100644 --- a/README.txt +++ b/README.txt @@ -57,7 +57,7 @@ The following extra message details are needed: -Hash Take the following example in PHP: - 'File')); - Configure::write('Coordino.version', '1.0'); + Configure::write('Coordino.version', '1.3'); Configure::write('recaptcha.publickey', '6LcgswkAAAAAAC15Pg3j8YDKFCi-mHYO_qHpoPH6'); Configure::write('recaptcha.privatekey', '6LcgswkAAAAAAApN8RkAjBhu2RgDGXGwh5onuUpW'); diff --git a/app/config/database_sample.php b/app/config/database_sample.php index f11be69..29ddf44 100644 --- a/app/config/database_sample.php +++ b/app/config/database_sample.php @@ -77,15 +77,15 @@ * */ class DATABASE_CONFIG { - - var $default = array( - 'driver' => 'mysql', - 'host' => 'localhost', - 'login' => 'username', - 'password' => '', - 'database' => '', - 'encoding' => 'utf8', - ); + + var $default = array( + 'driver' => 'mysql', + 'host' => 'localhost', + 'login' => 'username', + 'password' => '', + 'database' => '', + 'encoding' => 'utf8', + ); } ?> \ No newline at end of file diff --git a/app/controllers/.DS_Store b/app/controllers/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/controllers/.DS_Store and /dev/null differ diff --git a/app/controllers/components/htmlfilter.php b/app/controllers/components/htmlfilter.php index f0fe533..603d420 100644 --- a/app/controllers/components/htmlfilter.php +++ b/app/controllers/components/htmlfilter.php @@ -1,5 +1,4 @@ -layout = 'install'; - //$this->Auth->allow('*'); } public function start() { @@ -48,7 +46,6 @@ public function database() { $filePath = APP.'/config/database.php'; - if(filesize($filePath) <= 0) { $file = fopen($filePath, "w"); $data = " @@ -70,11 +67,7 @@ class DATABASE_CONFIG { fclose($file); $this->Session->setFlash('Connection to database established.', 'success'); $this->redirect('/install/run-sql'); - } else { - $this->Session->setFlash($filePath . ' already exists. Please clear the contents of this file and ensure - it is writable.', 'error'); - $this->redirect('/install/database-config'); - } + } } @@ -113,10 +106,11 @@ public function run_sql() { public function admin_account() { if(!empty($this->data['User'])) { - App::import('Component', 'Auth'); App::import('Component', 'Session'); + App::import('Component', 'Auth'); $this->Session = new SessionComponent(); $this->Auth = new AuthComponent(); + $this->Auth->Session = $this->Session; $this->Auth->allow('*'); $user = $this->__userSave($this->Auth->hashPasswords($this->data)); file_put_contents(TMP.'installed.txt', date('Y-m-d, H:i:s')); diff --git a/app/controllers/posts_controller.php b/app/controllers/posts_controller.php index 69eb477..27a9b1f 100644 --- a/app/controllers/posts_controller.php +++ b/app/controllers/posts_controller.php @@ -49,12 +49,13 @@ public function ask() { $this->set('title_for_layout', __('Ask a question',true)); if(!empty($this->data)) { + + $this->__validatePost($this->data, '/questions/ask', true); /** * reCAPTCHA Check */ - $this->data['reCAPTCHA'] = $this->params['form']; - $this->__validatePost($this->data, '/questions/ask', true); + $this->data['reCAPTCHA'] = $this->params['form']; /** * If the user is not logged in create an account for them. @@ -385,8 +386,7 @@ public function view($public_key) { array('hasMany' => array('Answer')) ); $question = $this->Post->findByPublicKey($public_key); - - + /* * Look up the flag limit. */ diff --git a/app/controllers/users_controller.php b/app/controllers/users_controller.php index 6381773..fa6752a 100644 --- a/app/controllers/users_controller.php +++ b/app/controllers/users_controller.php @@ -203,9 +203,7 @@ public function register() { * If the user has an unregistered account update the password and set them to registered. */ if(!empty($this->data)) { - if($this->Recaptcha->valid($this->params['form']) || $this->Session->read('Auth.User.id')) { - /** * If the user is logged in via Session or Cookie */ @@ -243,12 +241,12 @@ public function register() { $this->redirect('/'); } } + } else { + $this->Session->setFlash('Invalid reCAPTCHA entered.', 'error'); + } - } else { - $this->Session->setFlash('Invalid reCAPTCHA entered.', 'error'); - } - } + } public function admin() { diff --git a/app/models/.DS_Store b/app/models/.DS_Store deleted file mode 100644 index af5f9a7..0000000 Binary files a/app/models/.DS_Store and /dev/null differ diff --git a/app/models/setting.php b/app/models/setting.php index cb9703e..05e2dc6 100644 --- a/app/models/setting.php +++ b/app/models/setting.php @@ -17,7 +17,7 @@ public function repCheck($user_id, $setting_name) { ) ), false ); - $this->Setting->recursive = -1; + $this->recursive = -1; $this->User->recursive = -1; $user_rep = $this->User->find( 'first', array( diff --git a/app/tmp/.DS_Store b/app/tmp/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/tmp/.DS_Store and /dev/null differ diff --git a/app/vendors/.DS_Store b/app/vendors/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/vendors/.DS_Store and /dev/null differ diff --git a/app/vendors/markdown/markdown.php b/app/vendors/markdown/markdown.php index 8179b56..89d1348 100644 --- a/app/vendors/markdown/markdown.php +++ b/app/vendors/markdown/markdown.php @@ -476,7 +476,7 @@ function hashHTMLBlocks($text) { [ ]* (?=\n{2,}|\Z) # followed by a blank line or end of document - | # PHP and ASP-style processor instructions (html[0] == '<') { $token = substr($this->html, 0, 9); - if (substr($token, 0, 2) == ' 0) - (thanks kingsquareØusers*sourceforge*net) + (thanks kingsquareØusers*sourceforge*net) * Bugfix: nooffsitelink_* broken when running on non-standard - HTTP port (thanks marianbucur17Øyahoo*com) + HTTP port (thanks marianbucur17Øyahoo*com) v1.7.6 - December 09, 2006 - ¤ Added "sia" (Save Image As) parameter to provide default + ¤ Added "sia" (Save Image As) parameter to provide default filename when saving generated thumbnails - (thanks web_mkØhotmail*com) - ¤ Changed "lvl" filter parameters, and added option to choose + (thanks web_mkØhotmail*com) + ¤ Changed "lvl" filter parameters, and added option to choose between four different methods (two internal, two from ImageMagick). Added configurable threshold parameter. - (thanks publicØwoktiny*com for code for new internal method) - ¤ "wb" (White Balance) filter now processed by ImageMagick + (thanks publicØwoktiny*com for code for new internal method) + ¤ "wb" (White Balance) filter now processed by ImageMagick * Changed GD max source pixels to 1/6 (from 1/5) available memory, and changed SourceImageIsTooLarge() to account for already-used memory (if known) * More graceful error handling in object mode when source larger than PHP memory limit and ImageMagick unavailable - (thanks djasonØdjason*com) + (thanks djasonØdjason*com) * Added ImageMagickFormatsList() * CleanUpCacheDirectory() now also purges zero-byte orphan files left over from aborted thumbnailings * Bugfix [#1606069]: Changed default urlencoded space character from "+" to "%20" * Bugfix [#1608664]: "Unsupported operand types" in "wmi" - filter (thanks haydurØhaydur*com; squidliberty) + filter (thanks haydurØhaydur*com; squidliberty) * Bugfix: debug mode now supports text output in all modes * Bugfix: ImageMagick creation attempted before GD creation * Bugfix: no longer fails silently if GD creation runs out of @@ -200,24 +200,24 @@ v1.7.6 - December 09, 2006 v1.7.5 - October 03, 2006 - ¤ Deprecated parameters "err", "file", "goto" - ¤ Added broad cache directory feature (see phpThumb.config.php + ¤ Deprecated parameters "err", "file", "goto" + ¤ Added broad cache directory feature (see phpThumb.config.php "cache_directory_depth") to spread cache files across many directories for improved performance and ability to store very large numbers (30000+) of cached files - (thanks despoixØopenxtrem*com) - ¤ phpThumb now follows HTTP redirects (status=302) to new + (thanks despoixØopenxtrem*com) + ¤ phpThumb now follows HTTP redirects (status=302) to new HTTP image URLs (configurable: config_http_follow_redirect) - (thanks shannahØsfu*ca) - ¤ Added "rot" (ROTate) filter which is similar to "ra" parameter + (thanks shannahØsfu*ca) + ¤ Added "rot" (ROTate) filter which is similar to "ra" parameter but now allows rotation of output of other filters (for example, rotate image after fltr[]=mask is applied) - (thanks markØwoodjoint*ca) - ¤ Added WBMP output support (built-in GD or via ImageMagick) + (thanks markØwoodjoint*ca) + ¤ Added WBMP output support (built-in GD or via ImageMagick) (code was already mostly present, just was not allowed format) - ¤ [#1567113] "wmi" filter now accepts both x and y margins + ¤ [#1567113] "wmi" filter now accepts both x and y margins and can be in pixels or percent of thumbnail dimensions - (thanks squidlibertyØusers*sourceforge*net) + (thanks squidlibertyØusers*sourceforge*net) * "hist" filter now accepts both X and Y margins * Added config variables: config_http_fopen_timeout = 10; config_http_follow_redirect = true @@ -225,50 +225,50 @@ v1.7.5 - October 03, 2006 * Bugfix: Check for GD format support before attempting output * Bugfix: Opening HTTP source images with URL query parameters was broken (eg: http://host/show?id=123) - (thanks ivo*beckersØinfopractica*nl) + (thanks ivo*beckersØinfopractica*nl) v1.7.4 - August 17, 2006 - ¤ Improved version of /demo/phpThumb.demo.showpic.php uses + ¤ Improved version of /demo/phpThumb.demo.showpic.php uses phpThumb.php so any filters can be applied, as well as resized image popups. New file: /demo/javascript_api.js - Uses Javascript API by James Austin + Uses Javascript API by James Austin (http://aspandjavascript.co.uk/javascript/javascript_api/) - ¤ Added "sfn" (Source Frame Number) parameter to specify + ¤ Added "sfn" (Source Frame Number) parameter to specify source frame in multi-frame/multi-page source formats, such - as GIF, TIFF, PDF, etc (thanks despoixØopenxtrem*com) - ¤ Added "dpi" (Dots Per Inch) parameter to specify + as GIF, TIFF, PDF, etc (thanks despoixØopenxtrem*com) + ¤ Added "dpi" (Dots Per Inch) parameter to specify rasterising resolution for vector source formats (PDF, WMF) - (requires ImageMagick) (thanks despoixØopenxtrem*com) + (requires ImageMagick) (thanks despoixØopenxtrem*com) * Added /demo/phpThumb.demo.object.simple.php * Added debug points inside GenerateThumbnail * Explicit error message for unsupported PDF source images * Bugfix: SafeURLread broken with GETstring parameters in fsockopen mode * Bugfix: [#1540523] CleanUpCacheDirectory() does not delete - files as expected (thanks patricksleeØusers*sourceforge*net) + files as expected (thanks patricksleeØusers*sourceforge*net) * Bugfix: added useful error message when no source specified - in object mode (thanks infoØdoepud*co*uk) + in object mode (thanks infoØdoepud*co*uk) * Bugfix: timeout value ignored in URLreadFsock() * Bugfix: timeout missing in SafeURLread CURL part * Bugfix: ImageMagick now checked with --version (not -version) * Bugfix: better ImageMagick (numeric) version number matching * Bugfix: noGD errors showing up when GD imagecreate functions fail and ImageMagick not available - (thanks caseyyØgmail*com) + (thanks caseyyØgmail*com) * Bugfix: "-thumbnail" parameter not present in older versions of ImageMagick, now using -resize if -thumbnail unavailable - (thanks atombomb96Øbtopenworld*com) + (thanks atombomb96Øbtopenworld*com) * Bugfix: "-resize" parameter requires explicit dimensions ("100x100" instead of "100x") in older ImageMagick versions - (thanks atombomb96Øbtopenworld*com) + (thanks atombomb96Øbtopenworld*com) * Bugfix: phpThumb crashed with no output if ImageMagick failed to resize but output image larger than max_source_pixels - (thanks atombomb96Øbtopenworld*com) + (thanks atombomb96Øbtopenworld*com) * Bugfix: phpThumb might die with no output on some large source images when ImageMagick unavailable. - (thanks atombomb96Øbtopenworld*com) + (thanks atombomb96Øbtopenworld*com) v1.7.3 - July 11, 2006 @@ -277,169 +277,169 @@ v1.7.3 - July 11, 2006 * Added new fsockopen() section in SafeURLread() * Removed PNG alpha warning for IE 7 (alpha PNGs now work) * Bugfix: ImageMagick failing version check and dumping text - output (thanks infoØdevsystem*net) + output (thanks infoØdevsystem*net) * Bugfix: curl_exec failing with text output - (thanks infoØdevsystem*net) + (thanks infoØdevsystem*net) * Bugfix: workaround for PHP Bug #36102 (fopen(http) crash in PHP v4.4.2 * Bugfix: "Unknown image type identified by..." problem when opening http:// source images - (thanks webmasterØdanceage*com) + (thanks webmasterØdanceage*com) v1.7.2 - June 22, 2006 - ¤ [#1256693] Added $this->exif_raw_data which is returned + ¤ [#1256693] Added $this->exif_raw_data which is returned data from exif_read_data() on source image. - Requires PHP v4.2.0+ (thanks tebiØusers*sourceforge*net) - ¤ Added $this->outputImageData and RenderOutput() to allow + Requires PHP v4.2.0+ (thanks tebiØusers*sourceforge*net) + ¤ Added $this->outputImageData and RenderOutput() to allow easy outputting of thumbnail data to a database or such. Call RenderOutput() instead of RenderToFile() and then access raw data in $this->outputImageData - (thanks r*cremerØswitch*nl) - ¤ Added 'crop' filter, which is applied after resizing (as + (thanks r*cremerØswitch*nl) + ¤ Added 'crop' filter, which is applied after resizing (as opposed to sx,sy,sw,sh which are before resizing) - (thanks scottØscottjehl*com) + (thanks scottØscottjehl*com) * Enable creating new images with PATH_INFO style call - (thanks edenØinstyleit*com*au) + (thanks edenØinstyleit*com*au) * Added warning message to encourage users not to use full HTTP paths for "src" parameter * Added fallback 'preg_quote' to phpthumb.functions.php in case your PHP installation does not have preg_* functions - (thanks mortenØemeskay*dk) + (thanks mortenØemeskay*dk) * Added fallback 'imagesavealpha' if GD < v2.0.1 - (thanks oliver*heegerØweb*de) + (thanks oliver*heegerØweb*de) * Added fallback 'imagealphablending' if GD < v2.0.1 - (thanks oliver*heegerØweb*de) + (thanks oliver*heegerØweb*de) * Added 'nocache' parameter that suppresses writing to cache file, but only if high_security_enabled is set - (thanks federicoØdonelleschi*com) + (thanks federicoØdonelleschi*com) * Attempt to detect supported ImageMagick features - (thanks simonØjapancentre*com) + (thanks simonØjapancentre*com) * Added temp dir detection to phpThumb.demo.check.php * Added ImageMagick dir to phpThumb.demo.check.php * Added ImageMagick features to phpThumb.demo.check.php * Default (config_allow_src_above_docroot = true) when PHP - running in "cli" mode (thanks flobeeØgmail*com) + running in "cli" mode (thanks flobeeØgmail*com) * Bugfix: [#1470791] 'iar' not working properly with - ImageMagick (thanks w1xØusers*sourceforge*net) + ImageMagick (thanks w1xØusers*sourceforge*net) * Bugfix: [#1498564] illegal characters in cache filenames - (thanks carl-evertØusers*sourceforge*net) + (thanks carl-evertØusers*sourceforge*net) * Bugfix: 'sx','sy','sw','sh','zc' cache parameters broken - (thanks federicoØdonelleschi*com) + (thanks federicoØdonelleschi*com) * Bugfix: 'config_max_source_pixels' incorrectly handled - (thanks oliver*heegerØweb*de) + (thanks oliver*heegerØweb*de) * Bugfix: 'aoe' not working properly - (thanks w1xØusers*sourceforge*net) + (thanks w1xØusers*sourceforge*net) * Bugfix: setParameter() was broken for arrays * Bugfix: setSourceFilename() wasn't setting 'src' * Bugfix: suppress stat()-related file permission - notices (thanks lanceØmainecoastdesign*com) + notices (thanks lanceØmainecoastdesign*com) * Bugfix: image format now initialized during ErrorImage() * Bugfix: domain matching now case-insensitive * Bugfix: some versions of ImageMagick not detected - (thanks arvidØfys*ku*dk) + (thanks arvidØfys*ku*dk) * Bugfix: sometimes no image returned in safe_mode - (thanks bkainersØgmail*com) + (thanks bkainersØgmail*com) * Bugfix: 'far' not always handled correctly - (thanks matthew*newtonØrealworldweb*com) + (thanks matthew*newtonØrealworldweb*com) * Bugfix: PATH_INFO method not working if no filters specified - (thanks jjimenezØpracticaldata*com) + (thanks jjimenezØpracticaldata*com) * Bugfix: first (internal) call to ImageMagickVersion() failed under Windows * Bugfix: Images source-cropped AND resized with ImageMagick were wrong size (cropped size, not resized size) - (thanks joao*saleiroØwebfuel*pt) + (thanks joao*saleiroØwebfuel*pt) * Bugfix: stat() warnings in CleanUpCacheDirectory() - (thanks christianØhss-haage*de) + (thanks christianØhss-haage*de) * Bugfix: $PHPTHUMB_DEFAULTS not working when no other processing - parameters specified (thanks tbittnersØcox*net) + parameters specified (thanks tbittnersØcox*net) v1.7.1 - March 16, 2006 * /demo/phpThumb.demo.check.php now checks: - server software - local and master config values (with ini_get and - get_cfg_var respectively) (thanks nEUTRonØgmx*tm) + get_cfg_var respectively) (thanks nEUTRonØgmx*tm) - existance of assorted PHP functions and explains their importance * Bugfix: config_error_die_on_error now defaults to FALSE to prevent object-mode errors dying in an error image - (thanks moshØtobt*de; riteshgupta1974Øgmail*com) + (thanks moshØtobt*de; riteshgupta1974Øgmail*com) * Bugfix: setParameter() now handles array parameters (such as 'fltr') by appending $value to $parameter * Bugfix: /demo/phpThumb.demo.check.php incorrect CURL value - under PHP5 (thanks nEUTRonØgmx*tm) + under PHP5 (thanks nEUTRonØgmx*tm) * Bugfix: [#1439110] Limit fread() calls to 8kB (see http://bugs.php.net/bug.php?id=35859) - (thanks andig2Øusers*sourceforge*net) + (thanks andig2Øusers*sourceforge*net) * Bugfix: Prevent RenderToFilename() from trying to render - to URLs (thanks Tim*MasseyØitrm*co*uk) + to URLs (thanks Tim*MasseyØitrm*co*uk) * Bugfix: [#1438657] missing path in phpThumbURL() - (thanks terracesØusers*sourceforge*net) + (thanks terracesØusers*sourceforge*net) * Bugfix: zoomcrop was broken for non-square output - (thanks alisonØsemidivine*com, federicoØdonelleschi*com) + (thanks alisonØsemidivine*com, federicoØdonelleschi*com) * Bugfix: suppress error messages when stat access to temp - dir is disabled (thanks rfineØvnuinc*com) + dir is disabled (thanks rfineØvnuinc*com) * Bugfix: ImageMagick processing was broken for source images of types not supported by GetImageSize - (thanks rfineØvnuinc*com) + (thanks rfineØvnuinc*com) v1.7.0 - February 15, 2006 - ¤ ImageMagick output is used directly far more frequently + ¤ ImageMagick output is used directly far more frequently for much improved speed and minor quality improvement. - ¤ ImageMagick now processes most of the image filters if + ¤ ImageMagick now processes most of the image filters if possible (will fall back to GD methods if unavailable) - ¤ GD support is now optional if ImageMagick is installed. + ¤ GD support is now optional if ImageMagick is installed. Known limitations include: - no support for HTTP source images - ICO output is buggy (in some ImageMagick versions) - most &fltr[] filters don't work at all - 'ar', 'ra', 'far' don't work - ¤ Added output support for ICO (icon) format (&f=ico). + ¤ Added output support for ICO (icon) format (&f=ico). Currently only supports single-image icons, but multi- resolution support may be added in future versions New file: phpthumb.ico.php - ¤ Added output support for BMP (bitmap) format (&f=bmp). + ¤ Added output support for BMP (bitmap) format (&f=bmp). Currently only supports 24-bit RGB format (for simplicity) - ¤ Added new configuration & compatability checker + ¤ Added new configuration & compatability checker New file: demo/phpThumb.demo.check.php * ImageMagick-generated thumbnails now have extra hidden contents (EXIF data, etc) stripped (by using -thumbnail instead of -resize) resulting in smaller filesizes * Added background fill color, opacity and extent options to - 'wmt' filter (thanks craigØpc-fanatics*com) + 'wmt' filter (thanks craigØpc-fanatics*com) * Added metacharacter (^*) support for 'wmt', currently: source filesize in bytes (^Fb), kB (^Fk), MB (^Fm), source image width (^X), source image height (^Y), thumbnail width (^x), thumbnail height (^y) and caret (^^) (Feature Request #1357815) - (thanks ticklemeozmoØusers*sourceforge*net) + (thanks ticklemeozmoØusers*sourceforge*net) * Moved ImageDestroy call from OutputThumbnail to end of phpThumb.php to allow multiple calls to OutputThumbnail * Added config_http_user_agent for site with browsersniffers - (thanks redrobØgmail*com) + (thanks redrobØgmail*com) * Added $PHPTHUMB_CONFIG['disable_pathinfo_parsing'] (default false) which disables parsing $_SERVER[PATH_INFO] for parameters. If you want to parse PATH_INFO, set to false * Added $PHPTHUMB_CONFIG['disable_imagecopyresampled'] (default false) which replaces ImageCopyResampled with ImageCopyResampleBicubic for buggy PHP-GD versions - (thanks g*pelagattiØnetface*it) + (thanks g*pelagattiØnetface*it) * Added $PHPTHUMB_CONFIG['cache_prefix'] to allow sharing of cache files across virtual servers (Feature Request #1395332) - (thanks doggyfrØusers*sourceforge*net) + (thanks doggyfrØusers*sourceforge*net) * Added $PHPTHUMB_CONFIG['disable_onlycreateable_passthru'] with default=true (increased speed) to allow direct passthru of images that don't have GD support. (Feature Request #1396446) - (thanks zedboyØusers*sourceforge*net) + (thanks zedboyØusers*sourceforge*net) * Removed $PHPTHUMB_CONFIG['cache_differentiate_offsite'] because it is now automatically tied in with nooffsitelink_enabled - (thanks doggysworldØlibertysurf*fr) + (thanks doggysworldØlibertysurf*fr) * Removed phpThumb.demo.cacheconvert2.php * Debug messages are now passed back from filters * $PHPTHUMB_CONFIG['cache_source_filemtime_ignore_remote'] now defaults to true for much-improved cached performance - (thanks redrobØgmail*com) + (thanks redrobØgmail*com) * $PHPTHUMB_CONFIG['cache_differentiate_offsite'] now defaults to false * Added $PHPTHUMB_DEFAULTS['ar']='x' to phpThumb.config.php.default @@ -450,7 +450,7 @@ v1.7.0 - February 15, 2006 * phpUnsharpMask::applyUnsharpMask() should be faster under PHP5 by using ImageFilter(IMG_FILTER_GAUSSIAN_BLUR) when radius==1 * Added alternate CURL method for HTTP source images if - allow_url_fopen is disabled (thanks webweberØmotiondraw*com) + allow_url_fopen is disabled (thanks webweberØmotiondraw*com) * Replaced $this->osslash with DIRECTORY_SEPARATOR constant * Bugfix: [#1398327] 'new' got broken (1x1 images) * Bugfix: [#1412552] HTTP source images with special characters were @@ -458,7 +458,7 @@ v1.7.0 - February 15, 2006 * Bugfix: ImageSaveAlpha errors on GD v2.0.0 * Bugfix: phpThumbDebug now entirely disabled if high_security=true * Bugfix: source images with transparency lost transparency when - rotated (thanks roalklØyahoo*com) + rotated (thanks roalklØyahoo*com) * Bugfix: square source images were not resized when only (w|h)(p|l) parameters passed * Bugfix: source images are passed through unmodified in more cases @@ -468,53 +468,53 @@ v1.7.0 - February 15, 2006 * Bugfix: ImageMagick warnings no longer cause ImageMagick to fail * Bugfix: ErrorImage no longer fatal to phpThumbDebug * Bugfix: "Array to string conversion" in foreach($a as $v) loops - (thanks zeeshanØtargetedmedia*co*uk) + (thanks zeeshanØtargetedmedia*co*uk) * Bugfix: safe mode warnings in ImageCreateFromStringReplacement - (thanks adminØalex-home*net) + (thanks adminØalex-home*net) * Bugfix: nooffsitelink broken if !nooffsitelink_require_refer - (thanks depronØgmx*net) + (thanks depronØgmx*net) * Bugfix: phpThumb failed when magic_quotes_runtime=true - (thanks stansawyerØyahoo*com) + (thanks stansawyerØyahoo*com) * Bugfix: several issues with HTTP image sources - (thanks redrobØgmail*com) + (thanks redrobØgmail*com) * Bugfix: phpThumb_tempnam() would return incomplete temp filenames under Windows, which may result in orphaned zero-byte temp files in C:\ if multiple drives exist v1.6.2 - November 24, 2005 - ¤ Animated GIF output is now possible if ImageMagick is + ¤ Animated GIF output is now possible if ImageMagick is available and no filters (other than resize) are applied - (thanks brandenbassØgmail*com for idea) + (thanks brandenbassØgmail*com for idea) * Added $PHPTHUMB_CONFIG['cache_force_passthru'] to work around cached-image-only-works-second-time issue - (thanks yakoØ11y11*com) + (thanks yakoØ11y11*com) * Bugfix: black borders on some image edges - (thanks atelierØdelirius*ch && chuckØcatalyststudio*com) + (thanks atelierØdelirius*ch && chuckØcatalyststudio*com) * Bugfix: uncaught PHP warning in RenderToFile DebugMessage * Bugfix: allow phpThumbDebug in noGD PHP installations * Bugfix: 'hash' warning in high_security mode - (thanks bernhardØwtf*at) + (thanks bernhardØwtf*at) * Bugfix: non-TTF rotated text watermarks now work (unrotated) with no warnings if ImageRotate is unavailable - (thanks aparviaiØusers*sourceforge*net) + (thanks aparviaiØusers*sourceforge*net) v1.6.1 - August 26, 2005 - ¤ Filters now use GD functions where available (using + ¤ Filters now use GD functions where available (using ImageFilter, only available in PHP v5.0.0+ with bundled version of GD). Enabled for: colorize, negative, grayscale, brightness, contrast, gaussian blur, selective - blur, mean removal (thanks donlaurØmac*com) - ¤ Added config_prefer_imagemagick (defaults=true) - ¤ Added phpthumb_filters::Grayscale() 'gray' - ¤ Added phpthumb_filters::ReduceColorDepth() 'rcd' - ¤ Added phpthumb_filters::Brightness() 'brit' - ¤ Added phpthumb_filters::Contrast() 'cont' - ¤ Added phpthumb_filters::Saturation() 'sat' - ¤ Added phpthumb_filters::EdgeDetect() 'edge' [PHP5 only] - ¤ Added phpthumb_filters::BlurGaussian() 'gblr' [PHP5 only] - ¤ Added phpthumb_filters::BlurSelective() 'gblr' [PHP5 only] - ¤ Added phpthumb_filters::MeanRemoval() 'mean' [PHP5 only] - ¤ Added phpthumb_filters::Smooth() 'smth' [PHP5 only] + blur, mean removal (thanks donlaurØmac*com) + ¤ Added config_prefer_imagemagick (defaults=true) + ¤ Added phpthumb_filters::Grayscale() 'gray' + ¤ Added phpthumb_filters::ReduceColorDepth() 'rcd' + ¤ Added phpthumb_filters::Brightness() 'brit' + ¤ Added phpthumb_filters::Contrast() 'cont' + ¤ Added phpthumb_filters::Saturation() 'sat' + ¤ Added phpthumb_filters::EdgeDetect() 'edge' [PHP5 only] + ¤ Added phpthumb_filters::BlurGaussian() 'gblr' [PHP5 only] + ¤ Added phpthumb_filters::BlurSelective() 'gblr' [PHP5 only] + ¤ Added phpthumb_filters::MeanRemoval() 'mean' [PHP5 only] + ¤ Added phpthumb_filters::Smooth() 'smth' [PHP5 only] * New timing debug info in phpThumbDebug * Added config_cache_differentiate_offsite * config_die_on_error now defaults to false @@ -524,7 +524,7 @@ v1.6.1 - August 26, 2005 * [#1263051] 'far' now accepts L,R,T,B,C as values giving alignment of left/right/top/bottom/center respectively. Old value of '1' defaults to centered - (thanks webgrappaØusers*sourceforge*net) + (thanks webgrappaØusers*sourceforge*net) * Bugfix: RenderToFile() now fails properly when output format is unknown * Bugfix: PNG transparency wasn't working with 'far' @@ -536,36 +536,36 @@ v1.6.1 - August 26, 2005 (thanks Gazou) * Bugfix: 'zc' had poor quality when used with ImageMagick * Bugfix: 'aoe' parameter broken when not using ImageMagick - (thanks frankieali4Øhotmail*com) + (thanks frankieali4Øhotmail*com) * Bugfix: fixed issue with symbolic links - (thanks hornet136Øgmail*com) + (thanks hornet136Øgmail*com) * Bugfix: config_max_source_pixels now defaults to same calculation as used in phpThumb.config.php - (thanks vukshaØhotmail*com) + (thanks vukshaØhotmail*com) * Bugfix: Offsite cached thumbnails no longer use unique referer (now either nothing or "_offsite") - (thanks swaayeØyahoo*com) - * Bugfix: "Unknown image type identified by “] where is the target hex color to white balance on, this color is what "should be" white, or light @@ -657,13 +657,13 @@ v1.5.3 - May 4, 2005 any gray color can theoretically be used. If is omitted the filter guesses based on brightest pixels in each of RGB - ¤ Cached files are used by a Location header instead of + ¤ Cached files are used by a Location header instead of being passed through phpThumb.php using readfile - (thanks newtnØthrillnerds*com) + (thanks newtnØthrillnerds*com) * Added 'cache_source_filemtime_ignore_local' and 'cache_source_filemtime_ignore_remote' configurations to ignore source modification and/or removal - (thanks raynerapeØgmail*com) + (thanks raynerapeØgmail*com) * Added 'md5s' parameter, which is the MD5 hash of the source image -- if this parameter is passed with the hash of the source image then the source image is not @@ -672,7 +672,7 @@ v1.5.3 - May 4, 2005 empty string then phpThumb.php dies and outputs the correct MD5 hash value. This parameter is the single- file equivalent of 'cache_source_filemtime_ignore_*' - configuration paramters (thanks raynerapeØgmail*com) + configuration paramters (thanks raynerapeØgmail*com) * Added /demo/phpThumb.demo.object.php * Unused parameter 'bgt' removed * Added empty /cache/source/ directory to distribution @@ -682,33 +682,33 @@ v1.5.3 - May 4, 2005 include_once calls to prevent headers getting sent accidentally * Bugfix: md5_file and imagecolorallocatealpha calls - were undefined under PHP v4.1.x (thanks tomØemile*com) + were undefined under PHP v4.1.x (thanks tomØemile*com) * Bugfix: default 'f' parameter ('jpeg') overrode config_output_format in object mode - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) * Bugfix: suppressed error message for IIS shell_exec - errors (thanks tomØemile*com) + errors (thanks tomØemile*com) * Bugfix: Added PHP version check for stream_set_timeout - for HTTP sources (thanks raynerapeØgmail*com) + for HTTP sources (thanks raynerapeØgmail*com) * Bugfix: overlay margins of 0.5-1.0 cause invalid image - dimensions error (thanks mailØmmjaeger*com) + dimensions error (thanks mailØmmjaeger*com) * Bugfix: underlay margins were not working - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) * Bugfix: [#1187735] EXIF thumbnails were incorrectly output to the browser directly if requested thumbnail exactly matched EXIF dimensions - (thanks rebootØusers*sourceforge*net) + (thanks rebootØusers*sourceforge*net) v1.5.2 - April 20, 2005 - ¤ phpThumb.config.php is renamed to + ¤ phpThumb.config.php is renamed to phpThumb.config.php.default to prevent accidental overwriting. Please migrate your old settings to the new file, delete your old config and rename the default to phpThumb.config.php - ¤ Added new filters: + ¤ Added new filters: - 'blur' (Blur) [ex: &fltr[]=blur|] where (0 < < 25) (default = 1) - (thanks thoensiØnetcom*no for code) + (thanks thoensiØnetcom*no for code) - 'hist' (Histogram) [ex: &fltr[]=hist|||||||] Where is the color band(s) to display, from back @@ -734,17 +734,17 @@ v1.5.2 - April 20, 2005 percentage of the thumbnail size [must be < 0.5] (default is 0 for overlay and 10% for underlay); is opacity (0 = transparent, 100 = opaque) - (thanks raynerapeØgmail*com, shabazz3Ømsu*edu) + (thanks raynerapeØgmail*com, shabazz3Ømsu*edu) - 'gray' (GRAYscale) [ex: &fltr[]=gray] is an alias to 100% desaturation * New configuration 'cache_source_directory' allows the unprocessed source image to be cached when source is - HTTP or from a database (thanks raynerapeØgmail*com) + HTTP or from a database (thanks raynerapeØgmail*com) * Added 'cache' subdirectory to phpThumb distribution since this is the default location for the cache folder. * Default value for config_error_die_on_source_failure - changed to true (thanks shabazz3Ømsu*edu) + changed to true (thanks shabazz3Ømsu*edu) * Added checks to make sure $this->gdimg_output is a resource before allowing calls to RenderToFile or OutputThumbnail @@ -753,9 +753,9 @@ v1.5.2 - April 20, 2005 * Bugfix: 'lvl' filter no longer processes if not needed * Bugfix: off-server thumbnail error message was wrong * Bugfix: several PHP safe mode fixes - (thanks virginiaØalertbutnotalarmed*com) + (thanks virginiaØalertbutnotalarmed*com) * Bugfix: cache filenames broken for filter parameters - with paths (thanks srcericØusers.sourceforge.net) + with paths (thanks srcericØusers.sourceforge.net) v1.5.1 - April 06, 2005 * Added some security upgrades: @@ -771,18 +771,18 @@ v1.5.1 - April 06, 2005 to generate a hash for calls to phpThumb: echo ''; This function is supplied at the bottom of - phpThumb.config.php (thanks paulØstonie*co*uk) - ¤ Added new parameter "new" (phpThumb.php only) which can + phpThumb.config.php (thanks paulØstonie*co*uk) + ¤ Added new parameter "new" (phpThumb.php only) which can create a new image without using "src" parameter. Set "&new=|" where is the background hex color, is (optional) opacity (0=transparent, 100=opaque). - (thanks mailØmmjaeger*com) - ¤ Added new filters: + (thanks mailØmmjaeger*com) + ¤ Added new filters: - 'sep' (Sepia) [ex: &fltr[]=sep||] where is a number between 0 and 100 for the amount of colorization (default=50), and is the hex color to colorize to (default=A28065). - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) - 'lvl' (Levels) [ex: &fltr[]=lvl||| where can be one of 'r', 'g', 'b', 'a' (for Red, Green, Blue, Alpha respectively), or '*' for all @@ -796,33 +796,33 @@ v1.5.1 - April 06, 2005 images. * Bugfix: Cache was broken for images pulled from a database in phpThumb.php - (thanks dragutin*cvetkovicØdragontech-ltd*com) + (thanks dragutin*cvetkovicØdragontech-ltd*com) * Bugfix: Hotlink/Offsite prevention was broken when image was already cached. * Bugfix: ImageMagick path was incorrect in some cases - (thanks joshgØtwcny*rr*com) + (thanks joshgØtwcny*rr*com) * Bugfix: ProportionalResize() in phpthumb.functions.php had a broken check for default values - (thanks Bert*ClaeysØarinso*com) + (thanks Bert*ClaeysØarinso*com) * Bugfix: transparency now preserved for GIF & PNG input - (thanks tristanØcyrax*ch) + (thanks tristanØcyrax*ch) * Bugfix: transparency now supported for GIF output - (thanks j_ivanovØabv*bg) + (thanks j_ivanovØabv*bg) * Bugfix: alpha transparency could be lost in ApplyMask() - (thanks analyzerxØgmail*com) + (thanks analyzerxØgmail*com) * Bugfix: errors on 16/32-bit BMPs - (thanks mattØhellstrominc*com) + (thanks mattØhellstrominc*com) * Bugfix: Added datestamp to cached filenames for remote (HTTP) files, and better warning for caching - (thanks a*gambinoØabramo*it) - * Faster BMP parsing (thanks sgeppertØmail*utexas*edu) + (thanks a*gambinoØabramo*it) + * Faster BMP parsing (thanks sgeppertØmail*utexas*edu) * Added 'error_die_on_source_failure' configuration to allow invalid source images to show an error rather than output unmodified source image. - (thanks mindpixelØgmail*com) + (thanks mindpixelØgmail*com) * Added $phpThumb->fatalerror which will contain the text of the fatal error if 'error_die_on_error' is - false. (thanks mindpixelØgmail*com) + false. (thanks mindpixelØgmail*com) v1.5.0 - February 4, 2005 * Added new filter parameter 'fltr' that is an array and @@ -834,17 +834,17 @@ v1.5.0 - February 4, 2005 where is a number between zero (no change) and 100 (complete desaturation -- grayscale), or it can be a negative number for saturation boost. - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) - 'clr' (Colorize) [ex: &fltr[]=clr||] where is a number between 0 and 100 for the amount of colorization, and is the hex color - to colorize to. (thanks mailØmmjaeger*com) + to colorize to. (thanks mailØmmjaeger*com) - 'neg' (Negative) [ex: &fltr[]=neg] inverts the color - 'th' (ThresHold) [ex: &fltr[]=th|] (range 0-255) every grayscale pixel brighter than is set to white, every darker pixel is set to black - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) - 'usm' (UnSharpMask) [ex: &fltr[]=usm|||] where is the amount (default = 80), is the radius (default = 0.5), is the threshold @@ -871,13 +871,13 @@ v1.5.0 - February 4, 2005 is opacity from 0 to 100, is the edge (and inter-tile) margin in percent is the angle - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) - 'flip' [ex: &fltr[]=flip|x or &fltr[]=flip|y] flip image on X or Y axis - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) - 'elip' [ex: &fltr[]=elip] similar to rounded corners but more extreme - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) - 'mask' [ex: &fltr[]=mask|filename.png] greyscale values of mask are applied as the alpha channel to the main image. White is opaque, black @@ -886,9 +886,9 @@ v1.5.0 - February 4, 2005 where is the bevel width, is the hex color for the top and left shading, is the hex color for the bottom and right shading - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) - 'fram' (FRAMe) draws a frame, similar to border but - more configurable (thanks mailØmmjaeger*com) + more configurable (thanks mailØmmjaeger*com) [ex: &fltr[]=fram|||||] where is the width of the main border, is the width of each side of the bevel part, is the @@ -916,16 +916,16 @@ v1.5.0 - February 4, 2005 * Filters that produce transparent sections (such as Rounded Corners, Ellipse, Mask, Rotate) are now output as 32-bit/alpha PNG, or flattened with "bg" background - color for JPEG/GIF output (thanks mailØmmjaeger*com) + color for JPEG/GIF output (thanks mailØmmjaeger*com) * Added 'zc' (Zoom Crop) parameter - (thanks arcookeØgmail*com, mailØmmjaeger*com, - pl16056Ømacnews*de, kezzasmØusers*sourceforge*net, etc) + (thanks arcookeØgmail*com, mailØmmjaeger*com, + pl16056Ømacnews*de, kezzasmØusers*sourceforge*net, etc) * AutoRotate now can use EXIF orientation tag ('ar=x') * Added 'ttf_directory' configuration parameter for - TrueType watermarks (thanks mailØmmjaeger*com) + TrueType watermarks (thanks mailØmmjaeger*com) * Added "Last-Modified" header to cache portion of phpThumb.php which should allow better user-side - caching of thumbnails. (thanks derekØnetsimple*net) + caching of thumbnails. (thanks derekØnetsimple*net) * Added 'cache_disable_warning' configuration which will cause an error image to be displayed if the cache directory isn't configured, unless explicitly disabled @@ -933,9 +933,9 @@ v1.5.0 - February 4, 2005 prevents linking to thumbnails on your server from another domain. Defaults to watermaking linked images with text warning message. - (thanks anteØabstraktmedia*com) + (thanks anteØabstraktmedia*com) * Added 'error_image_width' & 'error_image_height' - config variables (thanks mailØmmjaeger*com) + config variables (thanks mailØmmjaeger*com) * Rounded image corners now requires GD v2.0.1 and PHP v4.3.2. Corners are transparent (for PNG output) and antialiased. @@ -950,62 +950,62 @@ v1.5.0 - February 4, 2005 cached the same as the local cached version) * Added setSourceImageResource() to allow use of an existing GD image resource for thumbnailing - (thanks danØgonmad*co*uk) + (thanks danØgonmad*co*uk) * Now including phpThumb.demo.demo1.php (main demo page) and phpThumb.demo.demo2.php (configurable demo page) in the phpThumb() distribution - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) * Added many more debugging/tracing message points * Added set_time_limit(30) to phpThumb.php * Bugfix: ImageMagick not used if `which convert` points - to a link and not a file (thanks bkainersØgmail*com) + to a link and not a file (thanks bkainersØgmail*com) * Bugfix: 'bgt' parameter was sometimes misspelled 'bct' * Bugfix: 'wmm' couldn't be set to zero * Bugfix: 'wmm' parameter was only applied to top/left of image * Bugfix: auto-detection of document_root failed on - Windows (thanks xbartvØhotmail*com) + Windows (thanks xbartvØhotmail*com) * Bugfix: phpThumbDebug could be bypassed if EXIF - thumbnail present (thanks olgradinØcheckfree*com) + thumbnail present (thanks olgradinØcheckfree*com) * Bugfix: cache file wasn't being written if EXIF data - was used directly (thanks olgradinØcheckfree*com) + was used directly (thanks olgradinØcheckfree*com) * Bugfix: phpThumb.demo.showpic.php was broken by popup blockers for images larger than the screen. - (thanks mailØmmjaeger*com) + (thanks mailØmmjaeger*com) v1.4.11 - October 11, 2004 * Changed sx/sy/sw/sh parameters to allow decimal values (>0 but <1) to represent percent of source image - (thanks mordorØdefault*co*yu) + (thanks mordorØdefault*co*yu) * Added config_error_silent_die_on_error for no-output - die on fatal errors (thanks johannesØformformat*se) + die on fatal errors (thanks johannesØformformat*se) * Added auto-detection of probable 'document_root' if that key is not available in $_SERVER * Bugfix: Check `which convert` failing with error - message (thanks chadØchadshome*com) + message (thanks chadØchadshome*com) * Bugfix: Image cropping to invalid areas outside source - image caused text output (thanks mordorØdefault*co*yu) + image caused text output (thanks mordorØdefault*co*yu) v1.4.10 - August 22, 2004 * Bugfix: cached files not written in most cases - (thanks kizerØcourtkizer*com, snuffØinbox*ru) + (thanks kizerØcourtkizer*com, snuffØinbox*ru) * Bugfix: ApacheLookupURIarray() crashes in CGI mode - (thanks hanskrentelØyahoo*de) + (thanks hanskrentelØyahoo*de) * Bugfix: phpthumb_bmpfile2gd() was broken - (thanks iØmindlace*net) + (thanks iØmindlace*net) v1.4.9 - August 9, 2004 * Bugfix: changed destination filename in RenderToFile() - (thanks alextkØwalla*com) + (thanks alextkØwalla*com) * Bugfix: problems with HTTP image source when called as - an object (thanks alextkØwalla*com) + an object (thanks alextkØwalla*com) v1.4.8 - August 4, 2004 * $this->error has changed to $this->errors and is now an array of strings (instead of a single string) * A lot more error conditions (invalid cache directory, etc) are now reported in $this->errors - (thanks aidan*slingsbyØlineone*net) + (thanks aidan*slingsbyØlineone*net) * Removed all define(CONSTANT) in the phpThumb() constructor - you can now access: - PHPTHUMB_VERSION == $this->phpthumb_version; @@ -1013,28 +1013,28 @@ v1.4.8 - August 4, 2004 - PHPTHUMB_ISWINDOWS == $this->iswindows; * Bugfix: Error message from apache_lookup_uri() failing under Apache2 now reported cleanly - (thanks derbaffØyahoo*com) + (thanks derbaffØyahoo*com) * Bugfix: missing phpthumb_functions:: class name for ImageTypeToMIMEtype() call in ExtractEXIFgetImageSize() - (thanks aidan*slingsbyØlineone*net) + (thanks aidan*slingsbyØlineone*net) * Bugfix: ImageTypeToMIMEtype() was broken for PHP older - than v4.3.0 (thanks georg*schreiberØbatch-pc*es) + than v4.3.0 (thanks georg*schreiberØbatch-pc*es) * Bugfix: RenderToFile() now returns false if it fails - (thanks phpthumbØsendthemtomir*com) + (thanks phpthumbØsendthemtomir*com) * Bugfix: Corrupt JPEG/PNG/GIF files that failed ImageCreateFrom*() were not being passed to ImageMagick for fallback, nor passed through unmodified if IM was - unavailable or failed (thanks r*chongØmogenic*net) + unavailable or failed (thanks r*chongØmogenic*net) * Bugfix: Improved backtick safe-mode limit detection - (thanks 1Øadamcarrington*com) + (thanks 1Øadamcarrington*com) * Bugfix: EXIF thumbnails were being used as source when - they should not be (thanks aidan*slingsbyØlineone*net) + they should not be (thanks aidan*slingsbyØlineone*net) * Bugfix: Cached files were not being created or used - properly (thanks aidan*slingsbyØlineone*net) + properly (thanks aidan*slingsbyØlineone*net) * Bugfix: max_source_pixels not set correct on some PHP - versions (thanks derbaffØyahoo*com) + versions (thanks derbaffØyahoo*com) * Bugfix: 'down' parameter ignored for unprocessed and - cached files (thanks aidan*slingsbyØlineone*net) + cached files (thanks aidan*slingsbyØlineone*net) v1.4.7 - July 27, 2004 * Included a modified version of "module.graphic.bmp.php" @@ -1043,7 +1043,7 @@ v1.4.7 - July 27, 2004 ImageMagick. It works, but it's *very* slow, especially for large images (as in 640x480 or larger). * Added check to prevent error messages when shell_exec - is disabled (thanks webmasterØneester*com) + is disabled (thanks webmasterØneester*com) v1.4.6 - July 22, 2004 * Added new section to phpthumb.config.php where you can @@ -1067,7 +1067,7 @@ v1.4.6 - July 22, 2004 * Bugfix: Cached filename did not have file-modified datestamp when used as implmented in phpThumb.php * Bugfix: RenderToFile() now accepts relative filenames - (thanks aidan*slingsbyØlineone*net) + (thanks aidan*slingsbyØlineone*net) * Bugfix: AllowOutputEnlargment setting was ignored when falling back to ImageMagick * Bugfix: IgnoreAspectRatio setting was ignored when @@ -1075,7 +1075,7 @@ v1.4.6 - July 22, 2004 * Bugfix: config_temp_directory was ignored in gd_info() in PHP < v4.3.0 when phpinfo() returns no GD information (due to safe mode restrictions) - (thanks mimyrtekØmyrtek*com) + (thanks mimyrtekØmyrtek*com) v1.4.5 - June 28, 2004 * Added new parameter 'down' where you can specify a @@ -1083,30 +1083,30 @@ v1.4.5 - June 28, 2004 to be downloaded rather than displayed in the browser. Demo images on silisoftware.com/scripts/phpThumb/demo/ can all be downloaded to show off this feature. - (thanks stuartscrumpØyahoo*co*uk) + (thanks stuartscrumpØyahoo*co*uk) * Added ability to remove old files from cache directory based on last-access time and/or number of cached files and/or total size of cached files - (thanks jrmhaigØyahoo*co*uk) + (thanks jrmhaigØyahoo*co*uk) * Added public CleanUpCacheDirectory() for cache cleaning (see above) if you need to call it manually * Included new file phpThumb.demo.cacheconvert.php to convert old-style cache names to the current (and hopefully last!) standard naming convention. - (thanks joshgØtwcny*rr*com) + (thanks joshgØtwcny*rr*com) * Added configuration value 'document_root' for rare case when $_SERVER['DOCUMENT_ROOT'] return incorrect value - (thanks joshgØtwcny*rr*com) + (thanks joshgØtwcny*rr*com) * Now tries to create thumbnail with ImageMagick if ImageCreateFromJPEG etc fails, before falling back to outputting unmodified source data. * Bugfix: HTTP image sources were broken - (thanks fritz*weisshartØt-online*de) + (thanks fritz*weisshartØt-online*de) * Bugfix: ImageMagick callout wasn't being used if EXIF thumbnail was available - (thanks joshgØtwcny*rr*com) + (thanks joshgØtwcny*rr*com) * Bugfix: HTTP src with space in filename was broken - (thanks drØrhodes360*com) + (thanks drØrhodes360*com) * Bugfix: version_compare_replacement() was broken for PHP v4.1.0+ @@ -1121,17 +1121,17 @@ v1.4.4 - June 8, 2004 Note: you may want to use "/" slashes instead of "\" if you have magic_quotes_gpc enabled to avoid stripslashes problems. - (thanks drØrhodes360*com) + (thanks drØrhodes360*com) * Bugfix: missing "phpthumb_functions::" in ImageCreateFromStringReplacement() - (thanks zapletalØsoftwaremedia*cz) + (thanks zapletalØsoftwaremedia*cz) v1.4.3 - May 25, 2004 * Added new configuration variable 'config_temp_directory' to allow you to specify a writable directory name for temp files if you do not have access to the system temp directory on your server (Safe Mode restrictions etc) - (thanks nickØregenmag*com) + (thanks nickØregenmag*com) * Added new configuration variable 'config_error_die_on_error' which can be set to false if you want to retrieve the error message without having it @@ -1140,22 +1140,22 @@ v1.4.3 - May 25, 2004 * Images are passed through directly with no processing and no caching if no parameters are passed to alter the image (resize, crop, sharpening, etc) - (thanks nchmuraØusers*sourceforge*net) + (thanks nchmuraØusers*sourceforge*net) * Added new configuration variable 'config_disable_debug' which disabled phpThumbDebug from working if you have security concerns about the displayed information * Bugfix: Added detection at the top of phpThumb.php for no-GD errors to avoid parse errors later in the code - (thanks nickØregenmag*com) + (thanks nickØregenmag*com) * Bugfix: RoundedImageCorners() had some off-by-1 errors - (thanks ola*thunbergØhome*se) + (thanks ola*thunbergØhome*se) v1.4.2 - May 10, 2004 * Added IE-compatability mode for transparent corners (set 'bct=256') * Bugfix: version_compare_replacement() was broken in PHP older than 4.1.0 - (thanks nickØregenmag*com) + (thanks nickØregenmag*com) v1.4.1.1 - May 9, 2004 * Bugfix: Removed ImageTrueColorToPalette hack. @@ -1167,16 +1167,16 @@ v1.4.1 - May 9, 2004 * Added 'maxb' (MAXimum Bytes) option to auto-set the output image quality (JPEG) or bit depth (PNG/GIF) so that the output thumbnail is less than 'maxb' bytes - (thanks e_belleØhotmail*com) + (thanks e_belleØhotmail*com) * Added 'bgt' parameter to make rounded corners from 'brx'/'bry' option transparent when used with PNG output. Note: PHP/GD appears buggy at this time, so this option must force output to 256-color mode for this to work. The feature will be updated when a non-broken version of PHP/GD is released. - (thanks javierØircorion*net) + (thanks javierØircorion*net) * Bugfix: Caching was broken - (thanks mikeØgdaymate*nl, jurewiczØgo3*pl) + (thanks mikeØgdaymate*nl, jurewiczØgo3*pl) v1.4.0 - April 30, 2004 * Rewritten as a PHP class. Split into several files: @@ -1211,52 +1211,52 @@ v1.4.0 - April 30, 2004 inside the border with a margin of background color. If 'bw' is zero, the corners of the image will be cut off and filled with background color. - (thanks javierØircorion*net) + (thanks javierØircorion*net) * Minor speed improvement for unsharp masking v1.3.7 - March 28, 2004 * Bugfix: GD version detection was broken on PHP <4.3.0 on servers where phpinfo() was disabled - (thanks javierØircorion*net) + (thanks javierØircorion*net) * Bugfix: Non-GD GIF support was broken on restricted PHP configurations - (thanks javierØircorion*net) + (thanks javierØircorion*net) * Bugfix: phpThumb.gif.php output error messages if PHP was running in Safe Mode * Added 'iar' parameter (Ignore Aspect Ratio) to allow non-proportional resizing (stretch image to fit). You must specify 'h' and 'w' to use this option. - (thanks javierØircorion*net) + (thanks javierØircorion*net) v1.3.6 - March 14, 2004 * Bugfix: was broken when register_globals turned on - (thanks joshgØtwcny*rr*com) + (thanks joshgØtwcny*rr*com) * Bugfix: Images with transparent backgrounds now have the background color filled with the color specified by the 'bg' parameter * Bugfix: ImageCreateFromString() is broken in the non-bundled GD. Added workaround, but please use the bundled version of GD if possible - (thanks dnØxbe*ch) + (thanks dnØxbe*ch) * Bugfix: EXIF thumbnail caching was broken * Bugfix: EXIF thumbnail handling was broken for PHP v4.2.x - (thanks smithk1Øshaw*ca) + (thanks smithk1Øshaw*ca) * Bugfix: Image borders with GD2 were misaligned * Bugfix: virtual paths/filenames like /~user/foo.jpg should now work properly, if PHP is installed as an Apache module (see www.php.net/apache-lookup-uri) * Bugfix: contents of any non-image file could be displayed (including PHP & HTML files) - (thanks arsyanØarsyan*com) + (thanks arsyanØarsyan*com) * Added rotation parameters 'ra' and 'ar' - (thanks drØrhodes360*com) + (thanks drØrhodes360*com) * Added $CONFIG['output_allow_enlarging'], defaulted to false, to prevent smaller-than-max-size images from being enlarged beyond their original size. If you want to be able to enlarge images, set this to false. Can be overridden with the 'aoe' parameter - (thanks dnØxbe*ch) + (thanks dnØxbe*ch) * Changed all configuration variables to be under one array named $CONFIG * Moved color and font options for ErrorImage() to @@ -1282,7 +1282,7 @@ v1.3.5 - February 29, 2004 * Added optional 'goto' parameter to be used with the 'file' parameter, where 'goto' is a URL that is redirected to after image is rendered to file - (thanks wimbleØwebdonors*com) + (thanks wimbleØwebdonors*com) * Added optional 'xto' parameter that will bypass all processing and just return the embedded EXIF thumbnail, if available. @@ -1291,7 +1291,7 @@ v1.3.5 - February 29, 2004 v1.3.4 - February 15, 2004 * Custom error image option (&err=img.jpg) which can also be set as $config_error_message_image_default - (thanks carlØ4thstar*net) + (thanks carlØ4thstar*net) * &f=text will now output plain-text error messages * ErrorImage() now used for anti-hotlink messages (if $config_nohotlink_erase_image is true) @@ -1299,10 +1299,10 @@ v1.3.4 - February 15, 2004 v1.3.3 - February 5, 2004 * Bugfix: Added stripslashes() to filenames if magic_quotes_gpc is enabled - (thanks arsyanØarsyan*com) + (thanks arsyanØarsyan*com) * Output can now be rendered to a file only (not to browser) specified by the 'file' parameter - (thanks arsyanØarsyan*com) + (thanks arsyanØarsyan*com) * JPEG quality now has a maximum of 95%, as specified in the GD documentation @@ -1315,11 +1315,11 @@ v1.3.2 - February 3, 2004 with no width constraint, or landscape images with no height constraint were smaller than neccesary by double the border width - (thanks jjjØxs4all*nl) - * Added unsharp mask option thanks to Torstein Hønsi: + (thanks jjjØxs4all*nl) + * Added unsharp mask option thanks to Torstein Hønsi: http://www.vikjavev.com/hovudsida/umtestside.php Note: requires GD v2.x to function - (thanks jjjØxs4all*nl) + (thanks jjjØxs4all*nl) * Updated cache filenames to reflect new parameters, this means old cached files will need to be deleted (or not, they just will never get called again) and @@ -1328,19 +1328,19 @@ v1.3.2 - February 3, 2004 v1.3.1 - February 2, 2004 * Added optional border (width and color configurable) - (thanks arsyanØarsyan*com) + (thanks arsyanØarsyan*com) * Added option to create fixed-dimension thumbnails regardless of source aspect ration. Set the 'bw' (BorderWidth) parameter (even to 0) and this will be enabled. Outside the actual image will be filled with 'bg' color (default FFFFFF) - (thanks arsyanØarsyan*com) + (thanks arsyanØarsyan*com) v1.3.0 - January 27, 2004 * Added watermarking option to overlay thumbnails with a semi-transparent watermark image (copied from a seperate source watermark image) - (thanks arsyanØarsyan*com) + (thanks arsyanØarsyan*com) * Added option for absolute filenames (on both Windows and *nix) outside the DOCUMENT_ROOT directory * Added debug output dump for diagnosing problems) @@ -1354,7 +1354,7 @@ v1.2.8 - January 19, 2004 v1.2.7 - January 7, 2004 * Added patch to allow use of PHP older than 4.1.0 (or GD without PNG support) for non-GD GIF support - (thanks hostwebserverØhotmail*com) + (thanks hostwebserverØhotmail*com) v1.2.6 - January 4, 2004 * Added patch to allow use of PHP older than 4.1.0 @@ -1388,7 +1388,7 @@ v1.2.1 - December 11, 2003 rather than a physical file * Bugfix: resize not proportional when wide image limited more by max height than max width - Thanks mathias_strasserØgmx*net + Thanks mathias_strasserØgmx*net * Removed caching code v1.2.0 - December 10, 2003 @@ -1407,7 +1407,7 @@ v1.1.2 - October 26, 2003 * Cache feature introduced v1.1.1 - September 28, 2003 - * better resize code by sfisher10Øcox*net + * better resize code by sfisher10Øcox*net v1.1.0 - September 1, 2003 * initial public release diff --git a/app/views/.DS_Store b/app/views/.DS_Store deleted file mode 100644 index 75fedcd..0000000 Binary files a/app/views/.DS_Store and /dev/null differ diff --git a/app/views/bugs/add.ctp b/app/views/bugs/add.ctp index dfad214..a12ec0b 100644 --- a/app/views/bugs/add.ctp +++ b/app/views/bugs/add.ctp @@ -1,5 +1,5 @@

Thank you for taking the time to submit a bug. Please provide as much information as possible.

-create('Bug'); ?> - input('content', array('label' => '', 'rows' => '8', 'cols' => '50')); ?>
-end('submit your bug'); ?> \ No newline at end of file +create('Bug'); ?> + input('content', array('label' => '', 'rows' => '8', 'cols' => '50')); ?>
+end('submit your bug'); ?> \ No newline at end of file diff --git a/app/views/bugs/closed_bugs.ctp b/app/views/bugs/closed_bugs.ctp index 79fe97e..7dfeef4 100644 --- a/app/views/bugs/closed_bugs.ctp +++ b/app/views/bugs/closed_bugs.ctp @@ -1,7 +1,7 @@

- link("Open", array('action'=>'openBugs')); ?> --- + link("Open", array('action'=>'openBugs')); ?> --- Closed --- - link("Invalid", array('action'=>'invalidBugs')); ?> + link("Invalid", array('action'=>'invalidBugs')); ?>

@@ -12,14 +12,14 @@ - $value) : ?> + $value) : ?> - + - +
- +
diff --git a/app/views/bugs/invalid_bugs.ctp b/app/views/bugs/invalid_bugs.ctp index a496822..6f2b7ea 100644 --- a/app/views/bugs/invalid_bugs.ctp +++ b/app/views/bugs/invalid_bugs.ctp @@ -1,6 +1,6 @@

- link("Open", array('action'=>'openBugs')); ?> --- - link("Closed", array('action'=>'closedBugs')); ?> --- + link("Open", array('action'=>'openBugs')); ?> --- + link("Closed", array('action'=>'closedBugs')); ?> --- Invalid

@@ -13,14 +13,14 @@ - $value) : ?> + $value) : ?> - + - + - +
diff --git a/app/views/bugs/open_bugs.ctp b/app/views/bugs/open_bugs.ctp index 3058c09..0036a24 100644 --- a/app/views/bugs/open_bugs.ctp +++ b/app/views/bugs/open_bugs.ctp @@ -1,7 +1,7 @@

Open --- - link("Closed", array('action'=>'closedBugs')); ?> --- - link("Invalid", array('action'=>'invalidBugs')); ?> + link("Closed", array('action'=>'closedBugs')); ?> --- + link("Invalid", array('action'=>'invalidBugs')); ?>

@@ -13,14 +13,14 @@ - $value) : ?> + $value) : ?> - + - +
- +
diff --git a/app/views/elements/admin_header.ctp b/app/views/elements/admin_header.ctp index ff97f6d..3ee91c5 100644 --- a/app/views/elements/admin_header.ctp +++ b/app/views/elements/admin_header.ctp @@ -1,10 +1,10 @@ \ No newline at end of file diff --git a/app/views/elements/coordino.ctp b/app/views/elements/coordino.ctp index 925be69..584bc5f 100644 --- a/app/views/elements/coordino.ctp +++ b/app/views/elements/coordino.ctp @@ -1,2 +1,2 @@

here!

+

Give some feed back or mark their answer as correct +here!

Thank you! \ No newline at end of file diff --git a/app/views/elements/email/html/recovery.ctp b/app/views/elements/email/html/recovery.ctp index 8179d0f..e58be42 100644 --- a/app/views/elements/email/html/recovery.ctp +++ b/app/views/elements/email/html/recovery.ctp @@ -1,11 +1,11 @@ -

Hi ,

+

Hi ,

You requested your password for your account. We've assigned a new password which you can change along with your other user settings - here. + here.

-

Your password is now:

+

Your password is now:

Use the above link to go to the login page, and login using this email address and password.

diff --git a/app/views/elements/email/text/notification.ctp b/app/views/elements/email/text/notification.ctp index 5cfe034..415fd1a 100644 --- a/app/views/elements/email/text/notification.ctp +++ b/app/views/elements/email/text/notification.ctp @@ -1,14 +1,14 @@ -Hi , +Hi , Your question has been answered. -You asked: +You asked: - answered your question: + answered your question: - + -Give some feed back or mark their answer as correct at -http:///questions//! +Give some feed back or mark their answer as correct at +http:///questions//! Thank you! \ No newline at end of file diff --git a/app/views/elements/email/text/recovery.ctp b/app/views/elements/email/text/recovery.ctp index 1251e29..f2d33eb 100644 --- a/app/views/elements/email/text/recovery.ctp +++ b/app/views/elements/email/text/recovery.ctp @@ -1,10 +1,10 @@ -Hi , +Hi , You requested your password for your account. We've assigned a new password which you can change along with your other user settings -at http:///users/settings/ +at http:///users/settings/ -Your password is now: +Your password is now: Use the above URL to go to the settings page after logging in using this email address and password. diff --git a/app/views/elements/error.ctp b/app/views/elements/error.ctp index 856edc4..7a98eab 100644 --- a/app/views/elements/error.ctp +++ b/app/views/elements/error.ctp @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/app/views/elements/success.ctp b/app/views/elements/success.ctp index 5669ab9..f2b0807 100644 --- a/app/views/elements/success.ctp +++ b/app/views/elements/success.ctp @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/app/views/helpers/.DS_Store b/app/views/helpers/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/views/helpers/.DS_Store and /dev/null differ diff --git a/app/views/helpers/tricky_file_input.php b/app/views/helpers/tricky_file_input.php index 96f33a0..db78df5 100644 --- a/app/views/helpers/tricky_file_input.php +++ b/app/views/helpers/tricky_file_input.php @@ -160,18 +160,18 @@ function __picker($params = array()) { } if($this->options['form'] != false) { ?> - __htmlForm(); ?> - __htmlDiv(); ?> - __htmlInput(); ?> - __htmlImage(); ?> - __htmlEndTag('div'); ?> - __htmlEndTag('form'); ?> - - __htmlDiv(); ?> - __htmlInput(); ?> - __htmlImage(); ?> - __htmlEndTag('div'); ?> - __htmlForm(); ?> + __htmlDiv(); ?> + __htmlInput(); ?> + __htmlImage(); ?> + __htmlEndTag('div'); ?> + __htmlEndTag('form'); ?> + + __htmlDiv(); ?> + __htmlInput(); ?> + __htmlImage(); ?> + __htmlEndTag('div'); ?> + -
+
- errorStyles['input']?>" * Displays a regular file element if the program fails with errors and is requested. */ function __displayRegular() { ?> -
+
-
- * Creates a tricky input html div wrapper */ function __htmlDiv() { ?> -
- styles['div']; ?>"> + function __htmlInput() { ?> - styles['input']?>" function __htmlInputForName() { ?> - styles['input']?>" */ function __htmlImage() { ?> - styles['image']?>" */ function __htmlName() { ?> - styles['name']?>" */ function __javascriptNameChange() { ?> - \ No newline at end of file diff --git a/app/views/installer/start.ctp b/app/views/installer/start.ctp index 84f53f4..1354e7f 100644 --- a/app/views/installer/start.ctp +++ b/app/views/installer/start.ctp @@ -10,32 +10,32 @@ /app/config/database_same.php with your favorite text editor and edit these settings manually. Once you are done editing save the file as: database.php.

-

Note: To use the automatic instillation process you must have the /app/config directory writable. If you do not wish to make this directory writable and wish to edit the /app/config/database.php file manually ignore any errors related to the /app/config directory below.

+

Note: To use the automatic instillation process you must have write permissions to the /app/config/database.php writable. If you do not wish to make this directory writable and wish to edit the /app/config/database.php file manually ignore any errors related to the /app/config directory below.

Directory permission tests:

    -
  • /app/config is writable.'; } +
  • /app/config is writable.'; } else { echo 'is not writable.';}?>
  • -
  • /app/config/database.php is writable.'; } +
  • /app/config/database.php is writable.'; } else { echo 'is not writable.';}?>
  • -
  • /app/tmp is writable.'; } +
  • /app/tmp is writable.'; } else { echo 'is not writable.';}?>
  • -
  • /app/tmp/cache is writable.'; } +
  • /app/tmp/cache is writable.'; } else { echo 'is not writable.';}?>
  • -
  • /app/webroot/img/thumbs is writable.'; } +
  • /app/webroot/img/thumbs is writable.'; } else { echo 'is not writable.';}?>
  • -
  • /app/webroot/img/uploads/users is writable.'; } +
  • /app/webroot/img/uploads/users is writable.'; } else { echo 'is not writable.';}?>
- +

Looks like you are good to go. Lets Continue!

- +

Look above for errors you must fix.

- + diff --git a/app/views/layouts/.DS_Store b/app/views/layouts/.DS_Store deleted file mode 100644 index cfdcc75..0000000 Binary files a/app/views/layouts/.DS_Store and /dev/null differ diff --git a/app/views/layouts/default.ctp b/app/views/layouts/default.ctp index 88a671d..3af9cdb 100755 --- a/app/views/layouts/default.ctp +++ b/app/views/layouts/default.ctp @@ -1,231 +1,240 @@ - - + - - - <?=$title_for_layout;?> | Coordino - css('screen.css');?> - css('prettify.css');?> - script('prettify/prettify.js');?> - css('skin.css');?> - - - - - - -
- - - -
- flash(); ?> -
- -
- -
- - - - - -
- - + + + + <?php echo $title_for_layout; ?> | Coordino + css('screen.css'); ?> + css('prettify.css'); ?> + css('skin.css'); ?> + + + + + + + +
+ + + +
+ flash(); ?> +
+ +
+ +
+ + + + + +
+ script('prettify/prettify.js'); ?> + + diff --git a/app/views/layouts/email/html/default.ctp b/app/views/layouts/email/html/default.ctp index 482e9e4..d453af9 100644 --- a/app/views/layouts/email/html/default.ctp +++ b/app/views/layouts/email/html/default.ctp @@ -1,11 +1,20 @@ - + + + + + + - + + - diff --git a/app/views/layouts/email/text/default.ctp b/app/views/layouts/email/text/default.ctp index 91c22ab..509a6d7 100644 --- a/app/views/layouts/email/text/default.ctp +++ b/app/views/layouts/email/text/default.ctp @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/layouts/error.ctp b/app/views/layouts/error.ctp index e2844cc..74fa883 100644 --- a/app/views/layouts/error.ctp +++ b/app/views/layouts/error.ctp @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/app/views/layouts/fullWidth.ctp b/app/views/layouts/fullWidth.ctp index 4840855..a048d48 100644 --- a/app/views/layouts/fullWidth.ctp +++ b/app/views/layouts/fullWidth.ctp @@ -1,139 +1,147 @@ - - + - - - <?=$title_for_layout;?> | Coordino - css('screen.css');?> - - - - - - - - - + + + + <?php echo $title_for_layout; ?> | Coordino + css('screen.css'); ?> + + + + + + - - +
-
+ -
-
- -
-
- - +

© 2009 Meezik Inc.

+
+
+ + + + + + + element('google_analytics'); ?> + diff --git a/app/views/layouts/install.ctp b/app/views/layouts/install.ctp index 06c781c..f42f733 100755 --- a/app/views/layouts/install.ctp +++ b/app/views/layouts/install.ctp @@ -1,15 +1,15 @@ - - + - - - <?=$title_for_layout;?> | Coordino - css('install.css');?> - - - image('coordino_logo.png');?> - flash(); ?> - - + + + + <?php echo $title_for_layout; ?> | Coordino + css('install.css'); ?> + + + + image('coordino_logo.png'); ?> + flash(); ?> + + diff --git a/app/views/layouts/success.ctp b/app/views/layouts/success.ctp index 5669ab9..f2b0807 100644 --- a/app/views/layouts/success.ctp +++ b/app/views/layouts/success.ctp @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/app/views/posts/.DS_Store b/app/views/posts/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/views/posts/.DS_Store and /dev/null differ diff --git a/app/views/posts/ask.ctp b/app/views/posts/ask.ctp index ca1239f..6eecee8 100644 --- a/app/views/posts/ask.ctp +++ b/app/views/posts/ask.ctp @@ -1,4 +1,4 @@ -css('wmd.css'); echo $html->script('wmd/showdown.js'); echo $html->script('wmd/wmd.js'); @@ -57,61 +57,61 @@ $("#PostTitle").keyup(function(event){ if($("#PostTitle").val().length < 10) { - $("#title_status").html(''); + $("#title_status").html(''); } else { - $("#title_status").html(''); + $("#title_status").html(''); } }); }); -

-read('errors')) { +

+read('errors')) { foreach($session->read('errors.errors') as $error) { echo '
' . $error . '
'; } } ?> -create('Post', array('action' => 'ask'));?> -label(__('Title',true));?>
+create('Post', array('action' => 'ask'));?> +label(__('Title',true));?>
-text('title', array('class' => 'wmd-panel big_input', 'value' => $session->read('errors.data.Post.title')));?>
- +text('title', array('class' => 'wmd-panel big_input', 'value' => $session->read('errors.data.Post.title')));?>
+
-textarea('content', array( +textarea('content', array( 'id' => 'wmd-input', 'class' => 'wmd-panel', 'value' => $session->read('errors.data.Post.content') )); ?>
-label(__('Tags',true));?>
-text('tags', array('id' => 'tag_input', 'class' => 'wmd-panel big_input'));?>
- +label(__('Tags',true));?>
+text('tags', array('id' => 'tag_input', 'class' => 'wmd-panel big_input'));?>
+ -check('Auth.User.id')) { ?> -

-
- label(__('Name',true));?>
- text('User.username', array( +check('Auth.User.id')) { ?> +

+
+ label(__('Name',true));?>
+ text('User.username', array( 'class' => 'big_input medium_input', 'value' => $session->read('errors.data.User.username') )); ?>
- label(__('Email',true));?>
- text('User.email', array( + label(__('Email',true));?>
+ text('User.email', array( 'class' => 'big_input medium_input', 'value' => $session->read('errors.data.User.email') )); ?>
- +

-checkbox('Post.notify', array('checked' => true));?> - +checkbox('Post.notify', array('checked' => true));?> + -display_form('echo');?> +display_form('echo'); ?> -end( __('Ask a question',true));?> +end( __('Ask a question',true));?> diff --git a/app/views/posts/display.ctp b/app/views/posts/display.ctp index 73a3fbd..a8428f1 100755 --- a/app/views/posts/display.ctp +++ b/app/views/posts/display.ctp @@ -1,89 +1,95 @@ -
- -
-
- - -
-
- - -
-
- - -
-
- link( - $question['Post']['title'], - '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] - ); - ?> -
-
-
-
- - link( $thumbnail->get(array( - 'save_path' => WWW_ROOT . 'img/thumbs', - 'display_path' => $this->webroot. 'img/thumbs', - 'error_image_path' => $this->webroot. 'img/answerAvatar.png', - 'src' => WWW_ROOT . $question['User']['image'], - 'w' => 25, - 'h' => 25, - 'q' => 100, - 'alt' => $question['User']['username'] . 'picture' ) - ),'/users/' .$question['User']['public_key'].'/'.$question['User']['username'], array('escape' => false));?> -
-
-
- link( - $question['User']['username'], - '/users/' . $question['User']['public_key'] . '/' . $question['User']['username'] - ); - ?> - -

-
- timeAgoInWords($question['Post']['timestamp']);?> -
-
-
-
-
- -
- link( - $tag['tag'], - '/tags/' . $tag['tag'] - ); - ?> -
- -
-
- -
- 3) && $current > 3) { ?> - 1  -   -   -   -   -   - - - page of - - page of - -   Next >> - + +
+
+ + +
+
+ + +
+
+ + +
+
+ link( + $question['Post']['title'], '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] + ); + ?> +
+
+
+
+ + link($thumbnail->get(array( + 'save_path' => WWW_ROOT . 'img/thumbs', + 'display_path' => $this->webroot . 'img/thumbs', + 'error_image_path' => $this->webroot . 'img/answerAvatar.png', + 'src' => WWW_ROOT . $question['User']['image'], + 'w' => 25, + 'h' => 25, + 'q' => 100, + 'alt' => $question['User']['username'] . 'picture') + ), '/users/' . $question['User']['public_key'] . '/' . $question['User']['username'], array('escape' => false)); + ?> +
+
+
+ link( + $question['User']['username'], '/users/' . $question['User']['public_key'] . '/' . $question['User']['username'] + ); + ?> + +

+
+ timeAgoInWords($question['Post']['timestamp']); ?> +
+
+
+
+
+ +
+ link( + $tag['tag'], '/tags/' . $tag['tag'] + ); + ?> +
+ +
+
+ +
+ 3) && $current > 3) { + ?> + 1  +   +   +   +   +   + + + page of + + page of + +   Next >> + - << Previous   - \ No newline at end of file +if (isset($previous)) { + ?> + << Previous   +css('wmd.css'); echo $javascript->link('wmd/showdown.js'); echo $javascript->link('wmd/wmd.js'); @@ -63,29 +63,29 @@ }); - -

Edit

+

Edit

-create(null, array( +create(null, array( 'url' => '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] . '/edit') ); ?> - -label('title');?>
+ +label('title');?>
-text('title', array('class' => 'wmd-panel big_input', 'value' => $question['Post']['title'], 'id' => 'PostTitle'));?>
+text('title', array('class' => 'wmd-panel big_input', 'value' => $question['Post']['title'], 'id' => 'PostTitle'));?>
What is your automotive question about? - +
-textarea('content', array('id' => 'wmd-input', 'class' => 'wmd-panel', 'value' => $question['Post']['content'])); ?> +textarea('content', array('id' => 'wmd-input', 'class' => 'wmd-panel', 'value' => $question['Post']['content'])); ?>
- -label('tags');?>
-text('tags', array('class' => 'wmd-panel big_input', 'value' => $tags, 'id' => 'tag_input'));?>
+ +label('tags');?>
+text('tags', array('class' => 'wmd-panel big_input', 'value' => $tags, 'id' => 'tag_input'));?>
Combine multiple words into single-words. - +
-end('Edit');?> \ No newline at end of file +end('Edit');?> \ No newline at end of file diff --git a/app/views/posts/mini_search.ctp b/app/views/posts/mini_search.ctp index 5574d9b..229ef50 100644 --- a/app/views/posts/mini_search.ctp +++ b/app/views/posts/mini_search.ctp @@ -1,18 +1,18 @@ - +

Related Questions

- +
-
- +
+
- link( + link( $question['Post']['title'], '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] ); @@ -20,7 +20,7 @@
- \ No newline at end of file diff --git a/app/views/posts/view.ctp b/app/views/posts/view.ctp index 88848f2..127041e 100755 --- a/app/views/posts/view.ctp +++ b/app/views/posts/view.ctp @@ -1,4 +1,4 @@ -css('wmd.css'); echo $javascript->link('wmd/showdown.js'); echo $javascript->link('wmd/wmd.js'); @@ -27,23 +27,23 @@ image('arrow_up.png', array('alt' => 'Vote Up', 'url' => '/vote/' . $question['Post']['public_key'] . '/up')); ?> - + image('arrow_down.png', array('alt' => 'Vote Down', 'url' => '/vote/' . $question['Post']['public_key'] . '/down')); ?>
-

- +

+
- read('Auth.User.id')) { ?> - link( + read('Auth.User.id')) { ?> + link( __('flag',true), '/flag/' . $question['Post']['public_key'] ); @@ -51,25 +51,25 @@ read('Auth.User.id') || isset($rep_rights) || $admin) { ?> | - link( + link( __('edit',true), '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] . '/edit'); } ?> - | link( + | link( __('del',true), '/posts/delete/'.$question['Post']['id']); ?>
- +
- edited timeAgoInWords($question['Post']['last_edited_timestamp']);?> + edited timeAgoInWords($question['Post']['last_edited_timestamp']);?>
- +
- +
- link( + link( $tag['tag'], '/tags/' . $tag['tag'] ); ?>
- +
- +
- +
- – + – - link( + link( $comment['User']['username'], '/users/' . $comment['User']['public_key'] . '/' . $comment['User']['username'] ); ?> - timeAgoInWords($comment['timestamp']); ?> + timeAgoInWords($comment['timestamp']); ?>
- +
- + -
- create(null, array( +
+ create(null, array( 'url' => '/questions/' . $question['Post']['public_key'] . '/comment') ); ?> - text('Comment.content', array('class' => 'comment_input'));?> - end('Comment');?> + text('Comment.content', array('class' => 'comment_input'));?> + end('Comment');?>
- link( + link( __('add comment',true), '#'); ?> @@ -153,8 +153,8 @@


- -
+ +
@@ -162,27 +162,27 @@ 'alt' => 'Vote Up', 'url' => '/vote/' . $answer['Answer']['public_key'] . '/up' )); ?> - + image('arrow_down.png', array( 'alt' => 'Vote Down', 'url' => '/vote/' . $answer['Answer']['public_key'] . '/down' )); ?> - read('Auth.User.id') && $answer['Answer']['status'] != 'correct' && $question['Post']['status'] != 'closed') {?> + read('Auth.User.id') && $answer['Answer']['status'] != 'correct' && $question['Post']['status'] != 'closed') {?>
- link( + link( '', '/questions/' . $answer['Answer']['public_key'] . '/' . 'correct' ); ?>
- image('checkmark_green.png'); } ?>
- +
@@ -203,27 +203,27 @@
- link( + link( $answer['User']['username'], '/users/' . $answer['User']['public_key'] . '/' . $answer['User']['username'] ); ?> -

+

- answered timeAgoInWords($answer['Answer']['timestamp']);?> + answered timeAgoInWords($answer['Answer']['timestamp']);?>
- link( + link( 'flag', '/flag/' . $answer['Answer']['public_key'] ); ?> | - link( + link( 'link', '/questions/' . $question['Post']['public_key'] . '/' @@ -231,9 +231,9 @@ . '#a_' . $answer['Answer']['public_key'] ); ?> - read('Auth.User.id') || isset($rep_rights)) { ?> + read('Auth.User.id') || isset($rep_rights)) { ?> | - link( + link( __('edit',true), '/answers/' . $answer['Answer']['public_key'] . '/edit'); } @@ -241,73 +241,73 @@
- +
- +
- – + – - link( + link( $comment['User']['username'], array('controller' => 'users', 'action' => 'view', $comment['User']['public_key'], $comment['User']['username']) ); ?> - timeAgoInWords($comment['timestamp']); ?> + timeAgoInWords($comment['timestamp']); ?>
- +
- + -
- create(null, array( +
+ create(null, array( 'url' => '/questions/' . $answer['Answer']['public_key'] . '/comment') ); ?> - text('Comment.content', array('class' => 'comment_input'));?> - end('Comment');?> + text('Comment.content', array('class' => 'comment_input'));?> + end('Comment');?>
- link( + link( 'add comment', '#'); ?>
- +
- read('errors')) { + read('errors')) { foreach($session->read('errors.errors') as $error) { echo '
' . $error . '
'; } } ?>

- create(null, array( + create(null, array( 'url' => '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] . '/answer') ); ?>
- textarea('content', array( + textarea('content', array( 'id' => 'wmd-input', 'class' => 'wmd-panel', 'value' => $session->read('errors.data.Post.content') )); ?>
- check('Auth.User.id')) { ?> + check('Auth.User.id')) { ?>

Who Are You?

Have an account already? Login before answering!
- label('name');?>
- text('User.username', array('class' => 'big_input medium_input '));?>
- label('email');?>
- text('User.email', array('class' => 'big_input medium_input '));?>
- + label('name');?>
+ text('User.username', array('class' => 'big_input medium_input '));?>
+ label('email');?>
+ text('User.email', array('class' => 'big_input medium_input '));?>
+ - display_form('echo');?> + display_form('echo');?>
- end(__d('verb','Answer',true));?> + end(__d('verb','Answer',true));?>
diff --git a/app/views/tags/find_tag.ctp b/app/views/tags/find_tag.ctp index 6dac4c7..e140717 100644 --- a/app/views/tags/find_tag.ctp +++ b/app/views/tags/find_tag.ctp @@ -1,22 +1,22 @@ -
-
- - answer +
+ + answer
- - view + + view
- link( + link( $question['Post']['title'], '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] ); @@ -24,23 +24,23 @@ foreach($questions as $question) { ?>
- timeAgoInWords($question['Post']['timestamp']);?> - link( + timeAgoInWords($question['Post']['timestamp']);?> + link( $question['User']['username'], '/users/' . $question['User']['public_key'] . '/' . $question['User']['username'] ); ?>
- +
- link( + link( $tag['tag'], '/tags/' . $tag['tag'] ); ?>
- +
@@ -51,24 +51,24 @@ foreach($questions as $question) { ?> --> - 3) && $current > 3) { ?> - 1  -   -   -   -   -   - - - page of - - page of -1  +   +   +   +   +   + + + page of + + page of + -   Next >> -  Next >> + - << Previous   - \ No newline at end of file + << Previous   + \ No newline at end of file diff --git a/app/views/tags/tag_list.ctp b/app/views/tags/tag_list.ctp index 563eb1f..1feb958 100755 --- a/app/views/tags/tag_list.ctp +++ b/app/views/tags/tag_list.ctp @@ -2,66 +2,69 @@ - $value) { - $key = $i + 1; - if(!isset($tag[$key])) { - break; - } -?> - - 0) { - if($i % 4 == 0) { -?> - - - 5) { - if(($i - 4) % 5 == 0) { -?> - - - + $i = $loop_fuel; + foreach ($tag as $key => $value) { + $key = $i + 1; + if (!isset($tag[$key])) { + break; + } + ?> + + 0) { + if ($i % 4 == 0) { + ?> + + + 5) { + if (($i - 4) % 5 == 0) { + ?> + + +
-
- link( - $tag[$key]['tag'], - '/tags/' . $tag[$key]['tag'] - ); - ?> x
-
+
+ link( + $tag[$key]['tag'], '/tags/' . $tag[$key]['tag'] + ); + ?> x
+
- 3) && $current > 3) { ?> + 3) && $current > 3) { ?> 1  -   -   -   -   -   - - - page of - - page of +   +   +   +   +   + + + page of + + page of -   Next >> - +   Next >> + - << Previous   +if (isset($previous)) { + ?> + << Previous   diff --git a/app/views/users/.DS_Store b/app/views/users/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/views/users/.DS_Store and /dev/null differ diff --git a/app/views/users/admin.ctp b/app/views/users/admin.ctp index 9ec2578..79044d9 100644 --- a/app/views/users/admin.ctp +++ b/app/views/users/admin.ctp @@ -1,36 +1,36 @@ -element('admin_header', +element('admin_header', array("selected" => "Settings")); ?>
-

Vote up:

- +

Vote up:

+
-

Comment:

- +

Comment:

+
-

Vote Down:

- +

Vote Down:

+
-

Advertising:

- +

Advertising:

+
-

Edit:

- +

Edit:

+
-

Flag:

- +

Flag:

+
-

Display Limit:

- +

Display Limit:

+
diff --git a/app/views/users/admin_list.ctp b/app/views/users/admin_list.ctp index edcf572..ee4af8e 100644 --- a/app/views/users/admin_list.ctp +++ b/app/views/users/admin_list.ctp @@ -1,69 +1,68 @@ -element('admin_header', - array("selected" => "Users")); +element('admin_header', + array("selected" => "Users")); ?> - - - - - $value) { - $key = $i + 1; - if(!isset($users[$key])) { - break; - } -?> - - - 0) { - if($i % 4 == 0) { -?> - - - - 5) { - if(($i - 4) % 5 == 0) { -?> - - - - - - -
link($users[$key]['User']['username'],'/users/' . $users[$key]['User']['public_key'] . '/' . $users[$key]['User']['username']);?> - promote - link(__('demote', true), '/admin/demote/' . $users[$key]['User']['public_key'], array('class' => 'demote'));?> - -
- 3) && $current > 3) { ?> - link('1 ', '/admin/users/1', array('escape' => false)); ?> - link('' . $current-2 . ' ', '/admin/users/' . $current-2, array('escape' => false)); ?> - link('' . $current-1 . ' ', '/admin/users/' . $current-1, array('escape' => false)); ?> -   - link('' . $current+1 . ' ', '/admin/users/' . $current+1, array('escape' => false)); ?> - link('' . $current+2 . ' ', '/admin/users/' . $current+2, array('escape' => false)); ?> - link('' . $end_page . ' ', '/admin/users/' . $end_page, array('escape' => false)); ?> - - page of link($end_page, '/admin/users/' . $end_page); ?> - - page of - + + $value) { + $key = $i + 1; + if(!isset($users[$key])) { + break; + } + ?> + + promote + demote + + + 0) { + if($i % 4 == 0) { + ?> + + + + 5) { + if(($i - 4) % 5 == 0) { + ?> + + + + + + + + + 3) && $current > 3) { ?> + 1  +   +   +   +   +   + + + page of + + page of + - link('  Next >>', '/admin/users/' . $next, array('escape' => false)); ?> -  Next >> + - link('<< Previous  ', '/admin/users/' . $previous, array('escape' => false)); ?> - \ No newline at end of file + << Previous   + \ No newline at end of file diff --git a/app/views/users/flagged.ctp b/app/views/users/flagged.ctp index aae0220..21fce51 100644 --- a/app/views/users/flagged.ctp +++ b/app/views/users/flagged.ctp @@ -1,25 +1,25 @@ -element('admin_header', +element('admin_header', array("selected" => "Flagged Posts")); ?> -
-
- - answer +
+ + answer
- - view + + view
- link( 'View this answer (answers have no titles)', '/questions/' . $question['Post']['public_key'] . '/' . $question['Post']['url_title'] @@ -34,8 +34,8 @@ foreach($questions as $question) { ?>
- timeAgoInWords($question['Post']['timestamp']);?> - link( + timeAgoInWords($question['Post']['timestamp']);?> + link( $question['User']['username'], '/users/' . $question['User']['public_key'] . '/' . $question['User']['username'] ); @@ -43,20 +43,20 @@ foreach($questions as $question) { ?>
- +
- link( + link( $tag['tag'], '/tags/' . $tag['tag'] ); ?>
- +
- \ No newline at end of file +element('admin_header', +element('admin_header', array("selected" => "Blacklist")); ?> @@ -9,13 +9,13 @@ foreach($list as $key => $value) { ?> - ""  remove + ""  remove - 0 && (($key < 6 && ($key % 4 == 0)) || ($key > 6 && (($key - 4) % 5 == 0)))) { ?> + 0 && (($key < 6 && ($key % 4 == 0)) || ($key > 6 && (($key - 4) % 5 == 0)))) { ?> - - + +
Or, add a word to the terrible list. \ No newline at end of file diff --git a/app/views/users/login.ctp b/app/views/users/login.ctp index 3041dbd..5b302da 100755 --- a/app/views/users/login.ctp +++ b/app/views/users/login.ctp @@ -3,7 +3,7 @@

Want to get an account? - link( + link( 'Register', array('controller' => 'users', 'action' => 'register') ); diff --git a/app/views/users/lost_password.ctp b/app/views/users/lost_password.ctp index 1a6bd34..2a3b9f9 100644 --- a/app/views/users/lost_password.ctp +++ b/app/views/users/lost_password.ctp @@ -1,5 +1,5 @@

Enter your email address and a new password will be sent to you shortly.

-create('User', array('action' => 'lost_password')); echo $form->input('email', array('class' => 'large_input')); echo $form->end('Email Me'); diff --git a/app/views/users/mini_search.ctp b/app/views/users/mini_search.ctp index 9ae6167..117e9dc 100755 --- a/app/views/users/mini_search.ctp +++ b/app/views/users/mini_search.ctp @@ -7,8 +7,8 @@ } ?> - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/users/register.ctp b/app/views/users/register.ctp index 9bc6b01..8a3c903 100644 --- a/app/views/users/register.ctp +++ b/app/views/users/register.ctp @@ -1,6 +1,6 @@

Register Yourself

-read('Auth.User.id')) {?> +read('Auth.User.id')) {?>

Currently you are an unregistered user. You may have asked or answered a question but we only know you through your browser cookies. If you clear your browser cache or somehow delete your cookies you will lose your account. @@ -8,11 +8,11 @@

Add a password to your account and you will become a full member of our community.

- create('User', array('action' => 'register'));?> + create('User', array('action' => 'register'));?> - input('secret', array('type' => 'password', 'label' => 'Password', 'class' => 'large_input'));?> - end('Register');?> - + input('secret', array('type' => 'password', 'label' => 'Password', 'class' => 'large_input'));?> + end('Register');?> +

Currently you are an unregistered user. You may have asked or answered a question but we only know you through your browser cookies. If you clear your browser cache or somehow delete your cookies you will lose your account. @@ -21,14 +21,14 @@ Add a password to your account and you will become a full member of our community.

- create('User', array('action' => 'register'));?> + create('User', array('action' => 'register'));?> - input('username', array('class' => 'large_input'));?> + input('username', array('class' => 'large_input'));?> - input('email', array('class' => 'large_input'));?> + input('email', array('class' => 'large_input'));?> - input('secret', array('type' => 'password', 'label' => 'Password', 'class' => 'large_input'));?> - display_form('echo');?> - end('Register');?> + input('secret', array('type' => 'password', 'label' => 'Password', 'class' => 'large_input'));?> + display_form('echo');?> + end('Register');?>
- \ No newline at end of file + \ No newline at end of file diff --git a/app/views/users/remote_settings.ctp b/app/views/users/remote_settings.ctp index d303870..aa9c03f 100644 --- a/app/views/users/remote_settings.ctp +++ b/app/views/users/remote_settings.ctp @@ -1,27 +1,27 @@ -element('admin_header');?> +element('admin_header');?>

Remote Authentication Key:

- +

Remote Authentication Only:


Remote Authentication Login URL:

- +

Remote Authentication Logout URL:

- +

diff --git a/app/views/users/user_list.ctp b/app/views/users/user_list.ctp index 2fa824b..6f6cfef 100644 --- a/app/views/users/user_list.ctp +++ b/app/views/users/user_list.ctp @@ -1,4 +1,4 @@ -link('jquery/jquery.js'); echo $javascript->link('jquery/jquery.bgiframe.min.js'); echo $javascript->link('jquery/jquery.ajaxQueue.js'); @@ -26,8 +26,8 @@ $(document).ready(function(){ }); -create('User', array('action' => '?'));?> -label('username');?>
- text('username', array('class' => 'big_input', 'autocomplete' => 'off', 'value' => $session->read('errors.data.Post.username')));?>
+create('User', array('action' => '?'));?> +label('username');?>
+ text('username', array('class' => 'big_input', 'autocomplete' => 'off', 'value' => $session->read('errors.data.Post.username')));?>
Who are you looking for?
\ No newline at end of file diff --git a/app/views/users/user_settings.ctp b/app/views/users/user_settings.ctp index 6eec4a6..3466916 100755 --- a/app/views/users/user_settings.ctp +++ b/app/views/users/user_settings.ctp @@ -1,6 +1,6 @@

- show(array( + show(array( 'save_path' => WWW_ROOT . 'img/thumbs', 'display_path' => $this->webroot. 'img/thumbs', 'error_image_path' => $this->webroot. 'img/answerAvatar.png', @@ -11,7 +11,7 @@ 'alt' => $user_info['User']['username'] . 'picture' ) ); ?> - draw('picker', array( + draw('picker', array( 'form' => array( 'id' => 'User' . $user_info['User']['public_key'] . 'ImageChangeForm', 'name' => 'User' . $user_info['User']['public_key'] . 'ImageChangeForm', @@ -26,23 +26,23 @@

Email Address An email address we can contact you at.

- +

Age An optional age to show.

- +

Location Where are you located?

- +

Website Have a website or social profile?

- +

Summary Tell us a little about yourself.

- +

Password Change Set a new password. Leave blank if you do not wish to change your password.

diff --git a/app/views/users/userbar_info.ctp b/app/views/users/userbar_info.ctp index 8c62a11..cb4a5ae 100644 --- a/app/views/users/userbar_info.ctp +++ b/app/views/users/userbar_info.ctp @@ -1,9 +1,9 @@

Show Off

So you want to show off your reputation and EngineJuice status on forums or a profile somewhere?

Below is the code for your own EngineJuice Bar

-read('Auth.User');?> -image('/users/' . $user['public_key'] . '/' . $user['username'] . '/bar.png', array('alt' => 'Oh no'));?>
+read('Auth.User');?> +image('/users/' . $user['public_key'] . '/' . $user['username'] . '/bar.png', array('alt' => 'Oh no'));?>
Copy and Paste the code below to your profile:
-//bar.png" alt="EngineJuice"/>'/>
+//bar.png" alt="EngineJuice"/>'/>
Copy and Paste the code below to your forum signature (BBCode):
-//bar.png[/img][/url]'/>
+//bar.png[/img][/url]'/>
diff --git a/app/views/users/view.ctp b/app/views/users/view.ctp index 694f495..f832972 100755 --- a/app/views/users/view.ctp +++ b/app/views/users/view.ctp @@ -1,207 +1,228 @@ - + Html->script(array( - 'jquery/jquery.js', - 'jquery/jquery.tabs.js', - 'jquery/jquery.ui-1.7.2.js', - 'jquery/ui.core.js' - )); - ?> + 'jquery/jquery.js', + 'jquery/jquery.tabs.js', + 'jquery/jquery.ui-1.7.2.js', + 'jquery/ui.core.js' +)); +?> - +
-
- - image('answerAvatar.png'); ?> - show(array( - 'save_path' => WWW_ROOT . 'img/thumbs', - 'display_path' => $this->webroot. 'img/thumbs', - 'error_image_path' => $this->webroot. 'img/answerAvatar.png', - 'src' => WWW_ROOT . $user['User']['image'], - 'w' => 130, - 'h' => 130, - 'q' => 100, - 'alt' => $user['User']['username'] . ' picture' ) - ); - } ?> -
+
+ + + show(array( + 'save_path' => WWW_ROOT . 'img/thumbs', + 'display_path' => $this->webroot. 'img/thumbs', + 'error_image_path' => $this->webroot. 'img/answerAvatar.png', + 'src' => WWW_ROOT . $user['User']['image'], + 'w' => 130, + 'h' => 130, + 'q' => 100, + 'alt' => $user['User']['username'] . ' picture' ) + ); + } ?> +
- +
- + + +
+

user information:

+ + + + + + + + + + + + + +
name
joinedtimeAgoInWords($user['User']['joined']);?>
reputation
-
-

user information:

- - - - - - - - - - - - -
name -
joinedtimeAgoInWords($user['User']['joined']);?>
reputation
- -
- -
- -

recent activity:

- - $value) { ?> - - - - - - -
- isToday($recent[$key]['History']['timestamp'])) : ?> - today - wasYesterday($recent[$key]['History']['timestamp'])) : ?> - yesterday - - niceShort($recent[$key]['History']['timestamp']) ?> - - - - + + +
+ +

recent activity:

+ + $value) { ?> + + + + - - + + + + +
+ isToday($recent[$key]['History']['timestamp'])) : ?> + today + wasYesterday($recent[$key]['History']['timestamp'])) : ?> + yesterday + + niceShort($recent[$key]['History']['timestamp']) ?> + + + + replied - - + + solved - - commented - - + + commented + + asked - - + + edited - - - edited - - - - link($recent[$key]['Post']['title'], '/questions/' . $recent[$key]['Post']['public_key'] . '/' . $recent[$key]['Post']['url_title']);?> - - - link($recent[$key]['Pad']['Post']['title'], '/questions/' . $recent[$key]['Pad']['Post']['public_key'] . '/' . $recent[$key]['Pad']['Post']['url_title']);?> - - link($recent[$key]['Real']['Post']['title'], '/questions/' . $recent[$key]['Real']['Post']['public_key'] . '/' . $recent[$key]['Real']['Post']['url_title']);?> - - - link($recent[$key]['Pad']['Post']['title'], '/questions/' . $recent[$key]['Pad']['Post']['public_key'] . '/' . $recent[$key]['Pad']['Post']['url_title']);?> - + + + edited + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
- - - - link($recent[$key]['Pad']['Post']['title'], '/questions/' . $recent[$key]['Pad']['Post']['public_key'] . '/' . $recent[$key]['Pad']['Post']['url_title']);?> - - link($recent[$key]['Post']['title'], '/questions/' . $recent[$key]['Post']['public_key'] . '/' . $recent[$key]['Post']['url_title']);?> - - - link($recent[$key]['Pad']['Post']['title'], '/questions/' . $recent[$key]['Pad']['Post']['public_key'] . '/' . $recent[$key]['Pad']['Post']['url_title']);?> - - link($recent[$key]['Post']['title'], '/questions/' . $recent[$key]['Post']['public_key'] . '/' . $recent[$key]['Post']['url_title']);?> - +
+

questions asked:

+ $value) { ?> +

+ + ' . $recent[$key]['Post']['title'] . ''; + } + ?> +

+ +
-
+
+

replies given:

+ $value) : ?> +

+ + + + + + + ' . $recent[$key]['Pad']['Post']['title'] . ''; + } + ?> +

+ +
-
- -
-

questions asked:

- $value) { ?> -

- link($recent[$key]['Post']['title'], '/questions/' . $recent[$key]['Post']['public_key'] . '/' . $recent[$key]['Post']['url_title']); - } - ?> -

- -
- -
-

replies given:

- $value) : ?> -

- - link($recent[$key]['Pad']['Post']['title'], '/questions/' . $recent[$key]['Pad']['Post']['public_key'] . '/' . $recent[$key]['Pad']['Post']['url_title']);?> - - link($recent[$key]['Pad']['Post']['title'], '/questions/' . $recent[$key]['Pad']['Post']['public_key'] . '/' . $recent[$key]['Pad']['Post']['url_title']); - } - ?> -

- -
- -
-

tags assigned:

-

content for tags tab

-
+
+

tags assigned:

+

content for tags tab

+
\ No newline at end of file diff --git a/app/views/widgets/add.ctp b/app/views/widgets/add.ctp index 2f6d3b2..07962fd 100644 --- a/app/views/widgets/add.ctp +++ b/app/views/widgets/add.ctp @@ -1,4 +1,4 @@ -css('wmd.css'); echo $javascript->link('wmd/showdown.js'); echo $javascript->link('wmd/wmd.js'); @@ -30,5 +30,5 @@
- + \ No newline at end of file diff --git a/app/views/widgets/edit.ctp b/app/views/widgets/edit.ctp index a2372d8..9cb0770 100644 --- a/app/views/widgets/edit.ctp +++ b/app/views/widgets/edit.ctp @@ -1,4 +1,4 @@ -css('wmd.css'); echo $javascript->link('wmd/showdown.js'); echo $javascript->link('wmd/wmd.js'); @@ -16,19 +16,19 @@
-

Title The large text that appears on the top of a widget.

- +

Title The large text that appears on the top of a widget.

+
-

Content What would you like to say?.

+

Content What would you like to say?.

-
- /> Show this Widget on all pages +
+ /> Show this Widget on all pages
- +
\ No newline at end of file diff --git a/app/webroot/.DS_Store b/app/webroot/.DS_Store deleted file mode 100644 index d3cd57f..0000000 Binary files a/app/webroot/.DS_Store and /dev/null differ diff --git a/app/webroot/css/.DS_Store b/app/webroot/css/.DS_Store deleted file mode 100644 index 0bce387..0000000 Binary files a/app/webroot/css/.DS_Store and /dev/null differ diff --git a/app/webroot/css/screen.css b/app/webroot/css/screen.css index 45b0f4f..61cb9a7 100755 --- a/app/webroot/css/screen.css +++ b/app/webroot/css/screen.css @@ -14,7 +14,7 @@ /* Page -------------------------------------------------------------- */ -#page { margin: 0 auto; width: 950px; } +#page { margin: 0 auto; width: 1012px; } /* Header @@ -50,7 +50,7 @@ #content { float: left; width: 685px; margin-right: 15px; display: inline; } #fullWidth { float:left; display: inline;} -#sidebar { float: left; width: 250px; display: inline;} +#sidebar { float: left; width: 310px; display: inline;} #sidebar h3 { color: #888; } #sidebar ul, #resources ol { color: #888; } #sidebar ul a { color: #555; } diff --git a/app/webroot/img/.DS_Store b/app/webroot/img/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/webroot/img/.DS_Store and /dev/null differ diff --git a/app/webroot/img/logo.png b/app/webroot/img/logo.png index d3d5a43..a4918e9 100644 Binary files a/app/webroot/img/logo.png and b/app/webroot/img/logo.png differ diff --git a/app/webroot/js/.DS_Store b/app/webroot/js/.DS_Store deleted file mode 100644 index 19b30ff..0000000 Binary files a/app/webroot/js/.DS_Store and /dev/null differ diff --git a/app/webroot/js/jquery/.DS_Store b/app/webroot/js/jquery/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/webroot/js/jquery/.DS_Store and /dev/null differ diff --git a/app/webroot/js/prettify/.DS_Store b/app/webroot/js/prettify/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/webroot/js/prettify/.DS_Store and /dev/null differ diff --git a/app/webroot/js/wmd/.DS_Store b/app/webroot/js/wmd/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/app/webroot/js/wmd/.DS_Store and /dev/null differ diff --git a/cake/LICENSE.txt b/cake/LICENSE.txt index 59976a6..b4d0c66 100755 --- a/cake/LICENSE.txt +++ b/cake/LICENSE.txt @@ -1,7 +1,7 @@ The MIT License CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) -Copyright 2005-2011, Cake Software Foundation, Inc. +Copyright 2005-2012, Cake Software Foundation, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/cake/VERSION.txt b/cake/VERSION.txt index 692b4cd..5069c11 100755 --- a/cake/VERSION.txt +++ b/cake/VERSION.txt @@ -5,12 +5,12 @@ // Holds a static string representing the current version of CakePHP // // CakePHP(tm) : Rapid Development Framework (http://cakephp.org) -// Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) +// @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) // @link http://cakephp.org // @package cake // @subpackage cake.cake.libs @@ -18,6 +18,4 @@ // @license MIT License (http://www.opensource.org/licenses/mit-license.php) // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -1.3.11 - - +1.3.16 diff --git a/cake/basics.php b/cake/basics.php index dc4f446..148ac37 100755 --- a/cake/basics.php +++ b/cake/basics.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake @@ -31,6 +31,26 @@ define('MONTH', 2592000); define('YEAR', 31536000); +/** + * Patch old versions of PHP4. + */ +if (!defined('PHP_EOL')) { + switch (strtoupper(substr(PHP_OS, 0, 3))) { + case 'WIN': + define('PHP_EOL', "\r\n"); + break; + default: + define('PHP_EOL', "\n"); + } +} + +/** + * Patch PHP4 and PHP5.0 + */ +if (!defined('DATE_RFC2822')) { + define('DATE_RFC2822', 'D, d M Y H:i:s O'); +} + /** * Patch for PHP < 5.0 */ diff --git a/cake/bootstrap.php b/cake/bootstrap.php index 03af74c..c53d62c 100755 --- a/cake/bootstrap.php +++ b/cake/bootstrap.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake @@ -25,7 +25,7 @@ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } -error_reporting(E_ALL & ~E_DEPRECATED); +error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); require CORE_PATH . 'cake' . DS . 'basics.php'; $TIME_START = getMicrotime(); diff --git a/cake/config/config.php b/cake/config/config.php index 969ad4f..1c1a6d9 100755 --- a/cake/config/config.php +++ b/cake/config/config.php @@ -5,16 +5,17 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 1.1.11.4062 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -return $config['Cake.version'] = '1.3.11'; +$config['Cake.version'] = '1.3.16'; +return $config; diff --git a/cake/config/paths.php b/cake/config/paths.php index 63a9afa..0a1a9f7 100755 --- a/cake/config/paths.php +++ b/cake/config/paths.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.app.config diff --git a/cake/config/unicode/casefolding/0080_00ff.php b/cake/config/unicode/casefolding/0080_00ff.php index 7cbc5c2..d05347a 100755 --- a/cake/config/unicode/casefolding/0080_00ff.php +++ b/cake/config/unicode/casefolding/0080_00ff.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/0100_017f.php b/cake/config/unicode/casefolding/0100_017f.php index fc86f23..4bb9d76 100755 --- a/cake/config/unicode/casefolding/0100_017f.php +++ b/cake/config/unicode/casefolding/0100_017f.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/0180_024F.php b/cake/config/unicode/casefolding/0180_024F.php index 831a359..a8bcfdb 100755 --- a/cake/config/unicode/casefolding/0180_024F.php +++ b/cake/config/unicode/casefolding/0180_024F.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/0250_02af.php b/cake/config/unicode/casefolding/0250_02af.php index e9b7ddc..c96e928 100755 --- a/cake/config/unicode/casefolding/0250_02af.php +++ b/cake/config/unicode/casefolding/0250_02af.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/0370_03ff.php b/cake/config/unicode/casefolding/0370_03ff.php index 24f17da..b1067a8 100755 --- a/cake/config/unicode/casefolding/0370_03ff.php +++ b/cake/config/unicode/casefolding/0370_03ff.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/0400_04ff.php b/cake/config/unicode/casefolding/0400_04ff.php index 9375fcd..37d25cf 100755 --- a/cake/config/unicode/casefolding/0400_04ff.php +++ b/cake/config/unicode/casefolding/0400_04ff.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/0500_052f.php b/cake/config/unicode/casefolding/0500_052f.php index 09e8df7..bcc5001 100755 --- a/cake/config/unicode/casefolding/0500_052f.php +++ b/cake/config/unicode/casefolding/0500_052f.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/0530_058f.php b/cake/config/unicode/casefolding/0530_058f.php index 861366f..0178ae7 100755 --- a/cake/config/unicode/casefolding/0530_058f.php +++ b/cake/config/unicode/casefolding/0530_058f.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/1e00_1eff.php b/cake/config/unicode/casefolding/1e00_1eff.php index 2e4d6ae..f2e46e6 100755 --- a/cake/config/unicode/casefolding/1e00_1eff.php +++ b/cake/config/unicode/casefolding/1e00_1eff.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/1f00_1fff.php b/cake/config/unicode/casefolding/1f00_1fff.php index a799468..713641f 100755 --- a/cake/config/unicode/casefolding/1f00_1fff.php +++ b/cake/config/unicode/casefolding/1f00_1fff.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/2100_214f.php b/cake/config/unicode/casefolding/2100_214f.php index cd6f536..54acd42 100755 --- a/cake/config/unicode/casefolding/2100_214f.php +++ b/cake/config/unicode/casefolding/2100_214f.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/2150_218f.php b/cake/config/unicode/casefolding/2150_218f.php index 12489a2..c27ba38 100755 --- a/cake/config/unicode/casefolding/2150_218f.php +++ b/cake/config/unicode/casefolding/2150_218f.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/2460_24ff.php b/cake/config/unicode/casefolding/2460_24ff.php index f707c29..fc33e87 100755 --- a/cake/config/unicode/casefolding/2460_24ff.php +++ b/cake/config/unicode/casefolding/2460_24ff.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/2c00_2c5f.php b/cake/config/unicode/casefolding/2c00_2c5f.php index 16dc554..652e316 100755 --- a/cake/config/unicode/casefolding/2c00_2c5f.php +++ b/cake/config/unicode/casefolding/2c00_2c5f.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/2c60_2c7f.php b/cake/config/unicode/casefolding/2c60_2c7f.php index 71eb2f6..e89b531 100755 --- a/cake/config/unicode/casefolding/2c60_2c7f.php +++ b/cake/config/unicode/casefolding/2c60_2c7f.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/2c80_2cff.php b/cake/config/unicode/casefolding/2c80_2cff.php index 41f3763..663d29d 100755 --- a/cake/config/unicode/casefolding/2c80_2cff.php +++ b/cake/config/unicode/casefolding/2c80_2cff.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/config/unicode/casefolding/ff00_ffef.php b/cake/config/unicode/casefolding/ff00_ffef.php index 5211798..913ee97 100755 --- a/cake/config/unicode/casefolding/ff00_ffef.php +++ b/cake/config/unicode/casefolding/ff00_ffef.php @@ -11,12 +11,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding diff --git a/cake/console/cake b/cake/console/cake index 6faf816..fbef004 100755 --- a/cake/console/cake +++ b/cake/console/cake @@ -1,26 +1,33 @@ -#!/bin/bash +#!/usr/bin/env bash ################################################################################ # # Bake is a shell script for running CakePHP bake script -# PHP versions 4 and 5 +# PHP 5 # # CakePHP(tm) : Rapid Development Framework (http://cakephp.org) -# Copyright 2005-2011, Cake Software Foundation, Inc. +# Copyright 2005-2012, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. # -# @copyright Copyright 2005-2011, Cake Software Foundation, Inc. -# @link http://cakephp.org CakePHP(tm) Project -# @package cake -# @subpackage cake.cake.console -# @since CakePHP(tm) v 1.2.0.5012 -# @license MIT License (http://www.opensource.org/licenses/mit-license.php) +# @copyright Copyright 2005-2012, Cake Software Foundation, Inc. +# @link http://cakephp.org CakePHP(tm) Project +# @package cake.Console +# @since CakePHP(tm) v 1.2.0.5012 +# @license MIT License (http://www.opensource.org/licenses/mit-license.php) # ################################################################################ -LIB=${0/%cake/} +LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0") + +while [ -h "$LIB" ]; do + DIR=$(dirname -- "$LIB") + SYM=$(readlink "$LIB") + LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") +done + +LIB=$(dirname -- "$LIB")/ APP=`pwd` -exec php -q ${LIB}cake.php -working "${APP}" "$@" +exec php -q "$LIB"cake.php -working "$APP" "$@" -exit; \ No newline at end of file +exit; diff --git a/cake/console/cake.bat b/cake/console/cake.bat index 7b9bd6d..7ae086c 100755 --- a/cake/console/cake.bat +++ b/cake/console/cake.bat @@ -4,12 +4,12 @@ :: PHP versions 4 and 5 :: :: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) -:: Copyright 2005-2011, Cake Software Foundation, Inc. +:: Copyright 2005-2012, Cake Software Foundation, Inc. :: :: Licensed under The MIT License :: Redistributions of files must retain the above copyright notice. :: -:: @copyright Copyright 2005-2011, Cake Software Foundation, Inc. +:: @copyright Copyright 2005-2012, Cake Software Foundation, Inc. :: @link http://cakephp.org CakePHP(tm) Project :: @package cake :: @subpackage cake.cake.console diff --git a/cake/console/cake.php b/cake/console/cake.php index 48895b8..b9d6a39 100755 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console @@ -147,7 +147,7 @@ function ShellDispatcher($args = array()) { function __initConstants() { if (function_exists('ini_set')) { ini_set('display_errors', '1'); - ini_set('error_reporting', E_ALL & ~E_DEPRECATED); + ini_set('error_reporting', E_ALL & ~E_DEPRECATED & ~E_STRICT); ini_set('html_errors', false); ini_set('implicit_flush', true); ini_set('max_execution_time', 0); @@ -450,7 +450,7 @@ function getInput($prompt, $options = null, $default = null) { } $result = trim($result); - if ($default != null && empty($result)) { + if ($default !== null && ($result === '' || $result === null)) { return $default; } return $result; @@ -471,7 +471,6 @@ function stdout($string, $newline = true) { return fwrite($this->stdout, $string); } } - /** * Outputs to the stderr filehandle. * diff --git a/cake/console/error.php b/cake/console/error.php index d95bd7f..2e70d19 100755 --- a/cake/console/error.php +++ b/cake/console/error.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console diff --git a/cake/console/libs/acl.php b/cake/console/libs/acl.php index 33c09e1..c9772f3 100755 --- a/cake/console/libs/acl.php +++ b/cake/console/libs/acl.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs diff --git a/cake/console/libs/api.php b/cake/console/libs/api.php index 56adba8..72251a2 100755 --- a/cake/console/libs/api.php +++ b/cake/console/libs/api.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs diff --git a/cake/console/libs/bake.php b/cake/console/libs/bake.php index 47005bf..6efa789 100755 --- a/cake/console/libs/bake.php +++ b/cake/console/libs/bake.php @@ -9,12 +9,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs @@ -69,6 +69,8 @@ function loadTasks() { * @access public */ function main() { + Configure::write('Cache.disable', 1); + if (!is_dir($this->DbConfig->path)) { if ($this->Project->execute()) { $this->DbConfig->path = $this->params['working'] . DS . 'config' . DS; diff --git a/cake/console/libs/console.php b/cake/console/libs/console.php index eb03eea..311d041 100755 --- a/cake/console/libs/console.php +++ b/cake/console/libs/console.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs diff --git a/cake/console/libs/i18n.php b/cake/console/libs/i18n.php index b8ef67b..76bed67 100755 --- a/cake/console/libs/i18n.php +++ b/cake/console/libs/i18n.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs diff --git a/cake/console/libs/schema.php b/cake/console/libs/schema.php index 1e0721c..d558f06 100755 --- a/cake/console/libs/schema.php +++ b/cake/console/libs/schema.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index 914bf1a..cced538 100755 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs @@ -347,13 +347,11 @@ function in($prompt, $options = null, $default = null) { } } if (is_array($options)) { - while ($in == '' || ($in && (!in_array(strtolower($in), $options) && !in_array(strtoupper($in), $options)) && !in_array($in, $options))) { + while ($in === '' || ($in !== '' && (!in_array(strtolower($in), $options) && !in_array(strtoupper($in), $options)) && !in_array($in, $options))) { $in = $this->Dispatch->getInput($prompt, $options, $default); } } - if ($in) { - return $in; - } + return $in; } /** diff --git a/cake/console/libs/tasks/bake.php b/cake/console/libs/tasks/bake.php index 424e84c..e54420c 100755 --- a/cake/console/libs/tasks/bake.php +++ b/cake/console/libs/tasks/bake.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks @@ -42,6 +42,17 @@ class BakeTask extends Shell { */ var $interactive = false; +/** + * Disable caching for baking. + * This forces the most current database schema to be used. + * + * @return void + */ + function startup() { + Configure::write('Cache.disable', 1); + parent::startup(); + } + /** * Gets the path for output. Checks the plugin property * and returns the correct path. diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index 97f159a..6a687e0 100755 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks diff --git a/cake/console/libs/tasks/db_config.php b/cake/console/libs/tasks/db_config.php index 9d6e860..53f0036 100755 --- a/cake/console/libs/tasks/db_config.php +++ b/cake/console/libs/tasks/db_config.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks @@ -102,7 +102,7 @@ function __interactive() { } } - $driver = $this->in('Driver:', array('db2', 'firebird', 'mssql', 'mysql', 'mysqli', 'odbc', 'oracle', 'postgres', 'sqlite', 'sybase'), 'mysql'); + $driver = $this->in('Driver:', array('mssql', 'mysql', 'mysqli', 'oracle', 'postgres', 'sqlite'), 'mysql'); $persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n'); if (strtolower($persistent) == 'n') { diff --git a/cake/console/libs/tasks/extract.php b/cake/console/libs/tasks/extract.php index dd83092..0c521ce 100755 --- a/cake/console/libs/tasks/extract.php +++ b/cake/console/libs/tasks/extract.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs @@ -286,24 +286,13 @@ function __parse($functionName, $map) { } $mapCount = count($map); - $strings = array(); - while (count($strings) < $mapCount && ($this->__tokens[$position] == ',' || $this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING)) { - if ($this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING) { - $strings[] = $this->__tokens[$position][1]; - } - $position++; - } + $strings = $this->__getStrings($position, $mapCount); if ($mapCount == count($strings)) { extract(array_combine($map, $strings)); - if (!isset($domain)) { - $domain = '\'default\''; - } - $string = $this->__formatString($singular); - if (isset($plural)) { - $string .= "\0" . $this->__formatString($plural); - } - $this->__strings[$this->__formatString($domain)][$string][$this->__file][] = $line; + $domain = isset($domain) ? $domain : 'default'; + $string = isset($plural) ? $singular . "\0" . $plural : $singular; + $this->__strings[$domain][$string][$this->__file][] = $line; } else { $this->__markerError($this->__file, $line, $functionName, $count); } @@ -312,6 +301,37 @@ function __parse($functionName, $map) { } } +/** +* Get the strings from the position forward +* +* @param integer $position Actual position on tokens array +* @param integer $target Number of strings to extract +* @return array Strings extracted +*/ + function __getStrings($position, $target) { + $strings = array(); + while (count($strings) < $target && ($this->__tokens[$position] == ',' || $this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING)) { + $condition1 = ($this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING && $this->__tokens[$position+1] == '.'); + $condition2 = ($this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING && $this->__tokens[$position+1][0] == T_COMMENT); + if ($condition1 || $condition2) { + $string = ''; + while ($this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING || $this->__tokens[$position][0] == T_COMMENT || $this->__tokens[$position] == '.') { + if ($this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING) { + $string .= $this->__formatString($this->__tokens[$position][1]); + } + $position++; + } + if ($this->__tokens[$position][0] == T_COMMENT || $this->__tokens[$position] == ',' || $this->__tokens[$position] == ')') { + $strings[] = $string; + } + } else if ($this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING) { + $strings[] = $this->__formatString($this->__tokens[$position][1]); + } + $position++; + } + return $strings; + } + /** * Build the translate template file contents out of obtained strings * diff --git a/cake/console/libs/tasks/fixture.php b/cake/console/libs/tasks/fixture.php index 7c4508c..482e96b 100755 --- a/cake/console/libs/tasks/fixture.php +++ b/cake/console/libs/tasks/fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks @@ -296,35 +296,30 @@ function _generateRecords($tableInfo, $recordCount = 1) { $insert = substr($insert, 0, (int)$fieldInfo['length'] - 2); } } - $insert = "'$insert'"; break; case 'timestamp': - $ts = time(); - $insert = "'$ts'"; + $insert = time(); break; case 'datetime': - $ts = date('Y-m-d H:i:s'); - $insert = "'$ts'"; + $insert = date('Y-m-d H:i:s'); break; case 'date': - $ts = date('Y-m-d'); - $insert = "'$ts'"; + $insert = date('Y-m-d'); break; case 'time': - $ts = date('H:i:s'); - $insert = "'$ts'"; + $insert = date('H:i:s'); break; case 'boolean': $insert = 1; break; case 'text': - $insert = "'Lorem ipsum dolor sit amet, aliquet feugiat."; + $insert = "Lorem ipsum dolor sit amet, aliquet feugiat."; $insert .= " Convallis morbi fringilla gravida,"; $insert .= " phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin"; $insert .= " venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla"; $insert .= " vestibulum massa neque ut et, id hendrerit sit,"; $insert .= " feugiat in taciti enim proin nibh, tempor dignissim, rhoncus"; - $insert .= " duis vestibulum nunc mattis convallis.'"; + $insert .= " duis vestibulum nunc mattis convallis."; break; } $record[$field] = $insert; @@ -346,7 +341,8 @@ function _makeRecordString($records) { foreach ($records as $record) { $values = array(); foreach ($record as $field => $value) { - $values[] = "\t\t\t'$field' => $value"; + $val = var_export($value, true); + $values[] = "\t\t\t'$field' => $val"; } $out .= "\t\tarray(\n"; $out .= implode(",\n", $values); @@ -387,7 +383,10 @@ function _getRecordsFromTable($modelName, $useTable = null) { foreach ($records as $record) { $row = array(); foreach ($record[$modelObject->alias] as $field => $value) { - $row[$field] = $db->value($value, $schema[$field]['type']); + if ($schema[$field]['type'] === 'boolean') { + $value = (int)(bool)$value; + } + $row[$field] = $value; } $out[] = $row; } diff --git a/cake/console/libs/tasks/model.php b/cake/console/libs/tasks/model.php index 885302c..839b0e2 100755 --- a/cake/console/libs/tasks/model.php +++ b/cake/console/libs/tasks/model.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks diff --git a/cake/console/libs/tasks/plugin.php b/cake/console/libs/tasks/plugin.php index 5243516..efb5626 100755 --- a/cake/console/libs/tasks/plugin.php +++ b/cake/console/libs/tasks/plugin.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks diff --git a/cake/console/libs/tasks/project.php b/cake/console/libs/tasks/project.php index 07f3f1c..826938d 100755 --- a/cake/console/libs/tasks/project.php +++ b/cake/console/libs/tasks/project.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.bake diff --git a/cake/console/libs/tasks/template.php b/cake/console/libs/tasks/template.php index 8575928..083f2a8 100755 --- a/cake/console/libs/tasks/template.php +++ b/cake/console/libs/tasks/template.php @@ -5,15 +5,15 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake - * @subpackage cake.console.libs.tasks + * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/cake/console/libs/tasks/test.php b/cake/console/libs/tasks/test.php index 99d12b7..ab698b8 100755 --- a/cake/console/libs/tasks/test.php +++ b/cake/console/libs/tasks/test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks diff --git a/cake/console/libs/tasks/view.php b/cake/console/libs/tasks/view.php index 0a60d7f..bdcd089 100755 --- a/cake/console/libs/tasks/view.php +++ b/cake/console/libs/tasks/view.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks @@ -343,11 +343,11 @@ function customAction() { $this->hr(); $this->out(sprintf(__('Controller Name: %s', true), $this->controllerName)); $this->out(sprintf(__('Action Name: %s', true), $action)); - $this->out(sprintf(__('Path: %s', true), $this->params['app'] . DS . $this->controllerPath . DS . Inflector::underscore($action) . ".ctp")); + $this->out(sprintf(__('Path: %s', true), $this->params['app'] . DS . 'views' . DS . $this->controllerPath . DS . Inflector::underscore($action) . ".ctp")); $this->hr(); $looksGood = $this->in(__('Look okay?', true), array('y','n'), 'y'); if (strtolower($looksGood) == 'y') { - $this->bake($action); + $this->bake($action, true); $this->_stop(); } else { $this->out(__('Bake Aborted.', true)); diff --git a/cake/console/libs/testsuite.php b/cake/console/libs/testsuite.php index 84faa54..a197fca 100755 --- a/cake/console/libs/testsuite.php +++ b/cake/console/libs/testsuite.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.console.libs diff --git a/cake/console/templates/default/actions/controller_actions.ctp b/cake/console/templates/default/actions/controller_actions.ctp index 89c4027..034233c 100755 --- a/cake/console/templates/default/actions/controller_actions.ctp +++ b/cake/console/templates/default/actions/controller_actions.ctp @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.console.libs.template.objects diff --git a/cake/console/templates/default/classes/controller.ctp b/cake/console/templates/default/classes/controller.ctp index 717aba4..b9089c2 100755 --- a/cake/console/templates/default/classes/controller.ctp +++ b/cake/console/templates/default/classes/controller.ctp @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake. diff --git a/cake/console/templates/default/classes/fixture.ctp b/cake/console/templates/default/classes/fixture.ctp index f0fd771..db69482 100755 --- a/cake/console/templates/default/classes/fixture.ctp +++ b/cake/console/templates/default/classes/fixture.ctp @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake. diff --git a/cake/console/templates/default/classes/model.ctp b/cake/console/templates/default/classes/model.ctp index 1c77aab..5c286bd 100755 --- a/cake/console/templates/default/classes/model.ctp +++ b/cake/console/templates/default/classes/model.ctp @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.console.libs.templates.objects diff --git a/cake/console/templates/default/classes/test.ctp b/cake/console/templates/default/classes/test.ctp index 8cf20fe..902769d 100755 --- a/cake/console/templates/default/classes/test.ctp +++ b/cake/console/templates/default/classes/test.ctp @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.console.libs.templates.objects diff --git a/cake/console/templates/default/views/form.ctp b/cake/console/templates/default/views/form.ctp index fbcd867..371654d 100755 --- a/cake/console/templates/default/views/form.ctp +++ b/cake/console/templates/default/views/form.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views diff --git a/cake/console/templates/default/views/index.ctp b/cake/console/templates/default/views/index.ctp index 71f3307..d17cbc1 100755 --- a/cake/console/templates/default/views/index.ctp +++ b/cake/console/templates/default/views/index.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views diff --git a/cake/console/templates/default/views/view.ctp b/cake/console/templates/default/views/view.ctp index fd1f031..dcd4fed 100755 --- a/cake/console/templates/default/views/view.ctp +++ b/cake/console/templates/default/views/view.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views diff --git a/cake/console/templates/skel/app_controller.php b/cake/console/templates/skel/app_controller.php index 7f54dc7..26b0d70 100755 --- a/cake/console/templates/skel/app_controller.php +++ b/cake/console/templates/skel/app_controller.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app diff --git a/cake/console/templates/skel/app_helper.php b/cake/console/templates/skel/app_helper.php index 3cc883d..4f831e6 100755 --- a/cake/console/templates/skel/app_helper.php +++ b/cake/console/templates/skel/app_helper.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake diff --git a/cake/console/templates/skel/app_model.php b/cake/console/templates/skel/app_model.php index d3e1e39..7a3e548 100755 --- a/cake/console/templates/skel/app_model.php +++ b/cake/console/templates/skel/app_model.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app diff --git a/cake/console/templates/skel/config/acl.ini.php b/cake/console/templates/skel/config/acl.ini.php index 4b9ae66..96bda3d 100755 --- a/cake/console/templates/skel/config/acl.ini.php +++ b/cake/console/templates/skel/config/acl.ini.php @@ -7,12 +7,12 @@ ; * PHP versions 4 and 5 ; * ; * CakePHP(tm) : Rapid Development Framework http://www.cakephp.org/ -; * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) ; * @link http://cakephp.org CakePHP(tm) Project ; * @package cake ; * @subpackage cake.app.config diff --git a/cake/console/templates/skel/config/bootstrap.php b/cake/console/templates/skel/config/bootstrap.php index f722570..f20653c 100755 --- a/cake/console/templates/skel/config/bootstrap.php +++ b/cake/console/templates/skel/config/bootstrap.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config diff --git a/cake/console/templates/skel/config/core.php b/cake/console/templates/skel/config/core.php index c6a3abd..ef2dff0 100755 --- a/cake/console/templates/skel/config/core.php +++ b/cake/console/templates/skel/config/core.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config diff --git a/cake/console/templates/skel/config/database.php.default b/cake/console/templates/skel/config/database.php.default index 8711da0..da9f3ac 100755 --- a/cake/console/templates/skel/config/database.php.default +++ b/cake/console/templates/skel/config/database.php.default @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config @@ -81,6 +81,7 @@ class DATABASE_CONFIG { 'password' => 'password', 'database' => 'database_name', 'prefix' => '', + //'encoding' => 'utf8', ); var $test = array( @@ -91,5 +92,6 @@ class DATABASE_CONFIG { 'password' => 'password', 'database' => 'test_database_name', 'prefix' => '', + //'encoding' => 'utf8', ); } diff --git a/cake/console/templates/skel/config/routes.php b/cake/console/templates/skel/config/routes.php index 66f6455..ce120e7 100755 --- a/cake/console/templates/skel/config/routes.php +++ b/cake/console/templates/skel/config/routes.php @@ -9,12 +9,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config diff --git a/cake/console/templates/skel/config/schema/db_acl.php b/cake/console/templates/skel/config/schema/db_acl.php index 987f30b..c05f7e2 100755 --- a/cake/console/templates/skel/config/schema/db_acl.php +++ b/cake/console/templates/skel/config/schema/db_acl.php @@ -9,12 +9,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql diff --git a/cake/console/templates/skel/config/schema/db_acl.sql b/cake/console/templates/skel/config/schema/db_acl.sql index 973995f..f50f392 100755 --- a/cake/console/templates/skel/config/schema/db_acl.sql +++ b/cake/console/templates/skel/config/schema/db_acl.sql @@ -1,6 +1,6 @@ # $Id$ # -# Copyright 2005-2011, Cake Software Foundation, Inc. +# Copyright 2005-2012, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. diff --git a/cake/console/templates/skel/config/schema/i18n.php b/cake/console/templates/skel/config/schema/i18n.php index f7d1c88..7817b42 100755 --- a/cake/console/templates/skel/config/schema/i18n.php +++ b/cake/console/templates/skel/config/schema/i18n.php @@ -9,12 +9,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql diff --git a/cake/console/templates/skel/config/schema/i18n.sql b/cake/console/templates/skel/config/schema/i18n.sql index 5a053ff..239e146 100755 --- a/cake/console/templates/skel/config/schema/i18n.sql +++ b/cake/console/templates/skel/config/schema/i18n.sql @@ -1,6 +1,6 @@ # $Id$ # -# Copyright 2005-2011, Cake Software Foundation, Inc. +# Copyright 2005-2012, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. diff --git a/cake/console/templates/skel/config/schema/sessions.php b/cake/console/templates/skel/config/schema/sessions.php index 6c5d393..aa38127 100755 --- a/cake/console/templates/skel/config/schema/sessions.php +++ b/cake/console/templates/skel/config/schema/sessions.php @@ -9,12 +9,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql diff --git a/cake/console/templates/skel/config/schema/sessions.sql b/cake/console/templates/skel/config/schema/sessions.sql index 18a68b4..b8951b6 100755 --- a/cake/console/templates/skel/config/schema/sessions.sql +++ b/cake/console/templates/skel/config/schema/sessions.sql @@ -1,6 +1,6 @@ # $Id$ # -# Copyright 2005-2011, Cake Software Foundation, Inc. +# Copyright 2005-2012, Cake Software Foundation, Inc. # 1785 E. Sahara Avenue, Suite 490-204 # Las Vegas, Nevada 89104 # diff --git a/cake/console/templates/skel/controllers/pages_controller.php b/cake/console/templates/skel/controllers/pages_controller.php index ae568e4..4a9e851 100755 --- a/cake/console/templates/skel/controllers/pages_controller.php +++ b/cake/console/templates/skel/controllers/pages_controller.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller diff --git a/cake/console/templates/skel/index.php b/cake/console/templates/skel/index.php index 1d5f4bb..1a6fbf9 100755 --- a/cake/console/templates/skel/index.php +++ b/cake/console/templates/skel/index.php @@ -3,12 +3,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app diff --git a/cake/console/templates/skel/views/elements/email/html/default.ctp b/cake/console/templates/skel/views/elements/email/html/default.ctp index 59e71d9..26c0c66 100755 --- a/cake/console/templates/skel/views/elements/email/html/default.ctp +++ b/cake/console/templates/skel/views/elements/email/html/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.html diff --git a/cake/console/templates/skel/views/elements/email/text/default.ctp b/cake/console/templates/skel/views/elements/email/text/default.ctp index 60d71c3..c1ed92d 100755 --- a/cake/console/templates/skel/views/elements/email/text/default.ctp +++ b/cake/console/templates/skel/views/elements/email/text/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text diff --git a/cake/console/templates/skel/views/layouts/ajax.ctp b/cake/console/templates/skel/views/layouts/ajax.ctp index 718f8a5..6d3693d 100755 --- a/cake/console/templates/skel/views/layouts/ajax.ctp +++ b/cake/console/templates/skel/views/layouts/ajax.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/console/templates/skel/views/layouts/default.ctp b/cake/console/templates/skel/views/layouts/default.ctp index 5e7b260..3d15b2d 100755 --- a/cake/console/templates/skel/views/layouts/default.ctp +++ b/cake/console/templates/skel/views/layouts/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.skel.views.layouts diff --git a/cake/console/templates/skel/views/layouts/email/html/default.ctp b/cake/console/templates/skel/views/layouts/email/html/default.ctp index f463a33..f39c4fd 100755 --- a/cake/console/templates/skel/views/layouts/email/html/default.ctp +++ b/cake/console/templates/skel/views/layouts/email/html/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html diff --git a/cake/console/templates/skel/views/layouts/email/text/default.ctp b/cake/console/templates/skel/views/layouts/email/text/default.ctp index ac24545..5abe3bd 100755 --- a/cake/console/templates/skel/views/layouts/email/text/default.ctp +++ b/cake/console/templates/skel/views/layouts/email/text/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.text diff --git a/cake/console/templates/skel/views/layouts/flash.ctp b/cake/console/templates/skel/views/layouts/flash.ctp index eb015a5..70b4cfa 100755 --- a/cake/console/templates/skel/views/layouts/flash.ctp +++ b/cake/console/templates/skel/views/layouts/flash.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/console/templates/skel/webroot/css.php b/cake/console/templates/skel/webroot/css.php index cda03da..e39a76b 100755 --- a/cake/console/templates/skel/webroot/css.php +++ b/cake/console/templates/skel/webroot/css.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot diff --git a/cake/console/templates/skel/webroot/css/cake.generic.css b/cake/console/templates/skel/webroot/css/cake.generic.css index ba15c51..46fb44e 100755 --- a/cake/console/templates/skel/webroot/css/cake.generic.css +++ b/cake/console/templates/skel/webroot/css/cake.generic.css @@ -3,12 +3,12 @@ * Generic CSS for CakePHP * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot.css diff --git a/cake/console/templates/skel/webroot/index.php b/cake/console/templates/skel/webroot/index.php index 5b5c987..7ebf52b 100755 --- a/cake/console/templates/skel/webroot/index.php +++ b/cake/console/templates/skel/webroot/index.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot @@ -73,6 +73,9 @@ define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } } + if (php_sapi_name() == 'cli-server') { + $_SERVER['PHP_SELF'] = '/'.basename(__FILE__); + } if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } diff --git a/cake/console/templates/skel/webroot/test.php b/cake/console/templates/skel/webroot/test.php index b68a774..1856d0d 100755 --- a/cake/console/templates/skel/webroot/test.php +++ b/cake/console/templates/skel/webroot/test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 534f6e2..1a2cd90 100755 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake @@ -363,10 +363,10 @@ function baseUrl() { $docRootContainsWebroot = strpos($docRoot, $dir . '/' . $webroot); if (!empty($base) || !$docRootContainsWebroot) { - if (strpos($this->webroot, $dir) === false) { + if (strpos($this->webroot, '/' . $dir . '/') === false) { $this->webroot .= $dir . '/' ; } - if (strpos($this->webroot, $webroot) === false) { + if (strpos($this->webroot, '/' . $webroot . '/') === false) { $this->webroot .= $webroot . '/'; } } diff --git a/cake/libs/cache.php b/cake/libs/cache.php index 3180b35..20cd4fa 100755 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/cache/apc.php b/cake/libs/cache/apc.php index 3508824..fd90909 100755 --- a/cake/libs/cache/apc.php +++ b/cake/libs/cache/apc.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache diff --git a/cake/libs/cache/file.php b/cake/libs/cache/file.php index b1c851d..54608c8 100755 --- a/cake/libs/cache/file.php +++ b/cake/libs/cache/file.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache @@ -136,13 +136,27 @@ function write($key, &$data, $duration) { } } - if ($this->settings['lock']) { - $this->_File->lock = true; - } $expires = time() + $duration; $contents = $expires . $lineBreak . $data . $lineBreak; - $success = $this->_File->write($contents); - $this->_File->close(); + $old = umask(0); + $handle = fopen($this->_File->path, 'a'); + umask($old); + + if (!$handle) { + return false; + } + + if ($this->settings['lock']) { + flock($handle, LOCK_EX); + } + + $success = ftruncate($handle, 0) && fwrite($handle, $contents) && fflush($handle); + + if ($this->settings['lock']) { + flock($handle, LOCK_UN); + } + + fclose($handle); return $success; } diff --git a/cake/libs/cache/memcache.php b/cake/libs/cache/memcache.php index 3ae5351..8acdc1b 100755 --- a/cake/libs/cache/memcache.php +++ b/cake/libs/cache/memcache.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache @@ -94,12 +94,15 @@ function init($settings = array()) { /** * Parses the server address into the host/port. Handles both IPv6 and IPv4 - * addresses + * addresses and Unix sockets * * @param string $server The server address string. * @return array Array containing host, port */ function _parseServerString($server) { + if ($server[0] == 'u') { + return array($server, 0); + } if (substr($server, 0, 1) == '[') { $position = strpos($server, ']:'); if ($position !== false) { diff --git a/cake/libs/cache/xcache.php b/cake/libs/cache/xcache.php index d0e3880..9067c3a 100755 --- a/cake/libs/cache/xcache.php +++ b/cake/libs/cache/xcache.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache diff --git a/cake/libs/cake_log.php b/cake/libs/cake_log.php index 9247441..b58b44e 100755 --- a/cake/libs/cake_log.php +++ b/cake/libs/cake_log.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/cake_session.php b/cake/libs/cake_session.php index 5d54874..43813a5 100755 --- a/cake/libs/cake_session.php +++ b/cake/libs/cake_session.php @@ -10,12 +10,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/cake_socket.php b/cake/libs/cake_socket.php index 384ca43..32e1da5 100755 --- a/cake/libs/cake_socket.php +++ b/cake/libs/cake_socket.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/class_registry.php b/cake/libs/class_registry.php index 8590223..90a8568 100755 --- a/cake/libs/class_registry.php +++ b/cake/libs/class_registry.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/configure.php b/cake/libs/configure.php index 0f310cc..cd2a598 100755 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -114,10 +114,11 @@ function write($config, $value = null) { if (!class_exists('Debugger')) { require LIBS . 'debugger.php'; } - $reporting = E_ALL & ~E_DEPRECATED; + $reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT; if (function_exists('ini_set')) { ini_set('display_errors', 1); } + $callback = array('Debugger', 'getInstance'); } elseif (function_exists('ini_set')) { ini_set('display_errors', 0); } @@ -126,12 +127,18 @@ function write($config, $value = null) { if (is_integer($_this->log) && !$_this->debug) { $reporting = $_this->log; } else { - $reporting = E_ALL & ~E_DEPRECATED; + $reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT; } error_reporting($reporting); if (!class_exists('CakeLog')) { require LIBS . 'cake_log.php'; } + if (empty($callback)) { + $callback = array('CakeLog', 'getInstance'); + } + } + if (!empty($callback) && !defined('DISABLE_DEFAULT_ERROR_HANDLING') && class_exists('Debugger')) { + Debugger::invoke(call_user_func($callback)); } error_reporting($reporting); } @@ -1057,8 +1064,8 @@ function __load($file) { } if (file_exists($file)) { if (!$this->return) { - require($file); $this->__loaded[$file] = true; + require($file); } return true; } diff --git a/cake/libs/controller/app_controller.php b/cake/libs/controller/app_controller.php index dcb9e63..70c27a9 100755 --- a/cake/libs/controller/app_controller.php +++ b/cake/libs/controller/app_controller.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller @@ -33,5 +33,4 @@ * @link http://book.cakephp.org/view/957/The-App-Controller */ class AppController extends Controller { - } diff --git a/cake/libs/controller/component.php b/cake/libs/controller/component.php index 2d94338..4bdd345 100755 --- a/cake/libs/controller/component.php +++ b/cake/libs/controller/component.php @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller @@ -257,10 +257,10 @@ function _loadComponents(&$object, $parent = null) { if (!empty($config)) { $this->__settings[$component] = $config; } - } - if (isset($object->{$component}->components) && is_array($object->{$component}->components) && (!isset($object->{$component}->{$parent}))) { - $this->_loadComponents($object->{$component}, $component); + if (isset($object->{$component}->components) && is_array($object->{$component}->components) && (!isset($object->{$component}->{$parent}))) { + $this->_loadComponents($object->{$component}, $component); + } } } } diff --git a/cake/libs/controller/components/acl.php b/cake/libs/controller/components/acl.php index 6f7c605..9ecb4f8 100755 --- a/cake/libs/controller/components/acl.php +++ b/cake/libs/controller/components/acl.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index c98387e..75c56e9 100755 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components @@ -687,10 +687,6 @@ function login($data = null) { } if ($user = $this->identify($data)) { - if(empty($this->Session)) { - App::import('Component', 'Session'); - $this->Session = new SessionComponent(); - } $this->Session->write($this->sessionKey, $user); $this->_loggedIn = true; } diff --git a/cake/libs/controller/components/cookie.php b/cake/libs/controller/components/cookie.php index bcee6be..6c82d4e 100755 --- a/cake/libs/controller/components/cookie.php +++ b/cake/libs/controller/components/cookie.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components @@ -425,20 +425,22 @@ function __decrypt($values) { if (is_array($value)) { foreach ($value as $key => $val) { $pos = strpos($val, 'Q2FrZQ==.'); - $decrypted[$name][$key] = $this->__explode($val); if ($pos !== false) { $val = substr($val, 8); $decrypted[$name][$key] = $this->__explode(Security::$type(base64_decode($val), $this->key)); + } else { + $decrypted[$name][$key] = $this->__explode($val); } } } else { $pos = strpos($value, 'Q2FrZQ==.'); - $decrypted[$name] = $this->__explode($value); if ($pos !== false) { $value = substr($value, 8); $decrypted[$name] = $this->__explode(Security::$type(base64_decode($value), $this->key)); + } else { + $decrypted[$name] = $this->__explode($value); } } } @@ -464,10 +466,15 @@ function __implode($array) { * Explode method to return array from string set in CookieComponent::__implode() * * @param string $string String in the form key1|value1,key2|value2 - * @return array Map of key and values + * @return mixed If array, map of key and values. If string, value. * @access private */ function __explode($string) { + $first = substr($string, 0, 1); + if ($first !== false && ($first === '{' || $first === '[') && function_exists('json_decode')) { + $ret = json_decode($string, true); + return ($ret != null) ? $ret : $string; + } $array = array(); foreach (explode(',', $string) as $pair) { $key = explode('|', $pair); diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index be1b231..13d100a 100755 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components @@ -18,6 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'Multibyte'); +App::import('Core', 'String'); /** * EmailComponent @@ -399,13 +400,12 @@ function send($content = null, $template = null, $layout = null) { $this->_attachFiles(); } - if (!is_null($this->__boundary)) { + if (!empty($this->attachments)) { $this->__message[] = ''; $this->__message[] = '--' . $this->__boundary . '--'; $this->__message[] = ''; } - $_method = '_' . $this->delivery; $sent = $this->$_method(); @@ -429,6 +429,7 @@ function reset() { $this->return = null; $this->cc = array(); $this->bcc = array(); + $this->headers = array(); $this->subject = null; $this->additionalParams = null; $this->date = null; @@ -437,6 +438,7 @@ function reset() { $this->htmlMessage = null; $this->textMessage = null; $this->messageId = true; + $this->delivery = 'mail'; $this->__header = array(); $this->__boundary = null; $this->__message = array(); @@ -491,7 +493,9 @@ function _render($content) { $htmlContent = $View->element('email' . DS . 'html' . DS . $this->template, array('content' => $htmlContent), true); $View->layoutPath = 'email' . DS . 'html'; $htmlContent = explode("\n", $this->htmlMessage = str_replace(array("\r\n", "\r"), "\n", $View->renderLayout($htmlContent))); + $msg = array_merge($msg, $htmlContent); + $msg[] = ''; $msg[] = '--alt-' . $this->__boundary . '--'; $msg[] = ''; @@ -588,7 +592,7 @@ function _createHeader() { if ($this->messageId !== false) { if ($this->messageId === true) { - $headers['Message-ID'] = '<' . String::UUID() . '@' . env('HTTP_HOST') . '>'; + $headers['Message-ID'] = '<' . str_replace('-', '', String::uuid()) . '@' . env('HTTP_HOST') . '>'; } else { $headers['Message-ID'] = $this->messageId; } @@ -608,13 +612,13 @@ function _createHeader() { } } - if (!empty($this->attachments)) { + if (!empty($this->attachments) || $this->sendAs === 'both') { $this->_createBoundary(); + } + + if (!empty($this->attachments)) { $headers['MIME-Version'] = '1.0'; $headers['Content-Type'] = 'multipart/mixed; boundary="' . $this->__boundary . '"'; - $headers[] = 'This part of the E-mail should never be seen. If'; - $headers[] = 'you are reading this, consider upgrading your e-mail'; - $headers[] = 'client to a MIME-compatible client.'; } elseif ($this->sendAs === 'text') { $headers['Content-Type'] = 'text/plain; charset=' . $this->charset; } elseif ($this->sendAs === 'html') { @@ -780,7 +784,7 @@ function _formatAddress($string, $smtp = false) { } if ($hasAlias && !empty($matches[2])) { - return $this->_encode($matches[2]) . $this->_strip(' <' . $matches[3] . '>'); + return $this->_encode(trim($matches[2])) . $this->_strip(' <' . $matches[3] . '>'); } return $this->_strip($string); } @@ -796,7 +800,7 @@ function _formatAddress($string, $smtp = false) { */ function _strip($value, $message = false) { $search = '%0a|%0d|Content-(?:Type|Transfer-Encoding)\:'; - $search .= '|charset\=|mime-version\:|multipart/mixed|(?:[^a-z]to|b?cc)\:.*'; + $search .= '|charset\=|mime-version\:|multipart/mixed|(?:[\n\r]+to|b?cc)\:.*'; if ($message !== true) { $search .= '|\r|\n'; diff --git a/cake/libs/controller/components/request_handler.php b/cake/libs/controller/components/request_handler.php index af708d3..f0f7069 100755 --- a/cake/libs/controller/components/request_handler.php +++ b/cake/libs/controller/components/request_handler.php @@ -7,12 +7,12 @@ * should respond to the different needs of a handheld computer and a desktop machine. * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components @@ -80,7 +80,7 @@ class RequestHandlerComponent extends Object { 'html' => array('text/html', '*/*'), 'text' => 'text/plain', 'txt' => 'text/plain', - 'csv' => array('application/vnd.ms-excel', 'text/plain'), + 'csv' => array('text/csv', 'application/vnd.ms-excel', 'text/plain'), 'form' => 'application/x-www-form-urlencoded', 'file' => 'multipart/form-data', 'xhtml' => array('application/xhtml+xml', 'application/xhtml', 'text/xhtml'), @@ -115,11 +115,13 @@ class RequestHandlerComponent extends Object { 'DoCoMo', 'iPod', 'iPhone', + 'iPad', 'J2ME', 'MIDP', 'NetFront', 'Nokia', 'Opera Mini', + 'Opera Mobi', 'PalmOS', 'PalmSource', 'portalmmm', @@ -130,6 +132,7 @@ class RequestHandlerComponent extends Object { 'UP\.Browser', 'webOS', 'Windows CE', + 'Windows Phone OS', 'Xiino' ); @@ -176,11 +179,12 @@ class RequestHandlerComponent extends Object { */ function __construct() { $this->__acceptTypes = explode(',', env('HTTP_ACCEPT')); + $this->__acceptTypes = array_map('trim', $this->__acceptTypes); foreach ($this->__acceptTypes as $i => $type) { if (strpos($type, ';')) { $type = explode(';', $type); - $this->__acceptTypes[$i] = $type[0]; + $this->__acceptTypes[$i] = trim($type[0]); } } parent::__construct(); diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index e8f5db1..6548079 100755 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components @@ -607,6 +607,8 @@ function _validatePost(&$controller) { if ($tokenData['expires'] < time() || $tokenData['key'] !== $token) { return false; } + } else { + return false; } $locked = null; diff --git a/cake/libs/controller/components/session.php b/cake/libs/controller/components/session.php index 0150734..dadeb75 100755 --- a/cake/libs/controller/components/session.php +++ b/cake/libs/controller/components/session.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 371fc74..4d69591 100755 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller @@ -1126,7 +1126,7 @@ function paginate($object = null, $scope = array(), $whitelist = array()) { } if (!empty($options['order']) && is_array($options['order'])) { - $alias = $object->alias ; + $alias = $object->alias; $key = $field = key($options['order']); if (strpos($key, '.') !== false) { @@ -1136,8 +1136,8 @@ function paginate($object = null, $scope = array(), $whitelist = array()) { unset($options['order'][$key]); if ($object->hasField($field)) { - $options['order'][$alias . '.' . $field] = $value; - } elseif ($object->hasField($field, true)) { + $options['order'][$object->alias . '.' . $field] = $value; + } elseif ($object->hasField($key, true)) { $options['order'][$field] = $value; } elseif (isset($object->{$alias}) && $object->{$alias}->hasField($field)) { $options['order'][$alias . '.' . $field] = $value; diff --git a/cake/libs/controller/pages_controller.php b/cake/libs/controller/pages_controller.php index 3c49656..b5f6cd0 100755 --- a/cake/libs/controller/pages_controller.php +++ b/cake/libs/controller/pages_controller.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller diff --git a/cake/libs/controller/scaffold.php b/cake/libs/controller/scaffold.php index 80a7baa..b870fb0 100755 --- a/cake/libs/controller/scaffold.php +++ b/cake/libs/controller/scaffold.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller @@ -540,7 +540,7 @@ function __associations() { * Scaffold View. * * @package cake - * @subpackage cake.cake.libs.controller + * @subpackage cake.cake.libs.view */ if (!class_exists('ThemeView')) { App::import('View', 'Theme'); @@ -549,7 +549,8 @@ function __associations() { /** * ScaffoldView provides specific view file loading features for scaffolded views. * - * @package cake.libs.view + * @package cake + * @subpackage cake.cake.libs.view */ class ScaffoldView extends ThemeView { diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index 9e25fdc..26d093b 100755 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -629,7 +629,10 @@ function _output($data = array()) { $data += $defaults; $files = $this->trace(array('start' => 2, 'format' => 'points')); - $code = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1); + $code = ''; + if (isset($files[1]['file'])) { + $code = $this->excerpt($files[1]['file'], $files[1]['line'] - 1, 1); + } $trace = $this->trace(array('start' => 2, 'depth' => '20')); $insertOpts = array('before' => '{:', 'after' => '}'); $context = array(); diff --git a/cake/libs/error.php b/cake/libs/error.php index 4491881..96fd648 100755 --- a/cake/libs/error.php +++ b/cake/libs/error.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/file.php b/cake/libs/file.php index 972f072..d4d734a 100755 --- a/cake/libs/file.php +++ b/cake/libs/file.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -290,6 +290,10 @@ function close() { */ function delete() { clearstatcache(); + if (is_resource($this->handle)) { + fclose($this->handle); + $this->handle = null; + } if ($this->exists()) { return unlink($this->path); } diff --git a/cake/libs/folder.php b/cake/libs/folder.php index 0b9f118..7941b97 100755 --- a/cake/libs/folder.php +++ b/cake/libs/folder.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/http_socket.php b/cake/libs/http_socket.php index 258eeb6..3811959 100755 --- a/cake/libs/http_socket.php +++ b/cake/libs/http_socket.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/i18n.php b/cake/libs/i18n.php index 4b17df2..0cf893a 100755 --- a/cake/libs/i18n.php +++ b/cake/libs/i18n.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/inflector.php b/cake/libs/inflector.php index 37d4ab3..e34177f 100755 --- a/cake/libs/inflector.php +++ b/cake/libs/inflector.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -70,6 +70,7 @@ class Inflector { 'atlas' => 'atlases', 'beef' => 'beefs', 'brother' => 'brothers', + 'cafe' => 'cafes', 'child' => 'children', 'corpus' => 'corpuses', 'cow' => 'cows', @@ -133,7 +134,7 @@ class Inflector { '/(drive)s$/i' => '\1', '/([^fo])ves$/i' => '\1fe', '/(^analy)ses$/i' => '\1sis', - '/(analy|ba|diagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', + '/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', '/([ti])a$/i' => '\1um', '/(p)eople$/i' => '\1\2erson', '/(m)en$/i' => '\1an', @@ -147,6 +148,7 @@ class Inflector { '.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', '.*ss' ), 'irregular' => array( + 'foes' => 'foe', 'waves' => 'wave', 'curves' => 'curve' ) @@ -164,12 +166,12 @@ class Inflector { 'debris', 'diabetes', 'djinn', 'eland', 'elk', 'equipment', 'Faroese', 'flounder', 'Foochowese', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti', 'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', - 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', 'media', + 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', '.*?media', 'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', 'proceedings', 'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', 'sea[- ]bass', 'series', 'Shavese', 'shears', 'siemens', 'species', 'swine', 'testes', - 'trousers', 'trout','tuna', 'Vermontese', 'Wenchowese', 'whiting', 'wildebeest', + 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese', 'whiting', 'wildebeest', 'Yengeese' ); @@ -368,7 +370,11 @@ function rules($type, $rules, $reset = false) { if ($reset) { $_this->{$var}[$rule] = $pattern; } else { - $_this->{$var}[$rule] = array_merge($pattern, $_this->{$var}[$rule]); + if ($rule === 'uninflected') { + $_this->{$var}[$rule] = array_merge($pattern, $_this->{$var}[$rule]); + } else { + $_this->{$var}[$rule] = $pattern + $_this->{$var}[$rule]; + } } unset($rules[$rule], $_this->{$var}['cache' . ucfirst($rule)]); if (isset($_this->{$var}['merged'][$rule])) { @@ -381,7 +387,7 @@ function rules($type, $rules, $reset = false) { } } } - $_this->{$var}['rules'] = array_merge($rules, $_this->{$var}['rules']); + $_this->{$var}['rules'] = $rules + $_this->{$var}['rules']; break; } } diff --git a/cake/libs/l10n.php b/cake/libs/l10n.php index d6d0c6b..e24f0ea 100755 --- a/cake/libs/l10n.php +++ b/cake/libs/l10n.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -103,6 +103,7 @@ class L10n extends Object { /* Arabic */ 'ara' => 'ar', /* Armenian - Armenia */ 'hye' => 'hy', /* Basque */ 'baq' => 'eu', + /* Tibetan */ 'bod' => 'bo', /* Bosnian */ 'bos' => 'bs', /* Bulgarian */ 'bul' => 'bg', /* Byelorussian */ 'bel' => 'be', @@ -205,6 +206,9 @@ class L10n extends Object { 'ar-ye' => array('language' => 'Arabic (Yemen)', 'locale' => 'ar_ye', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'be' => array('language' => 'Byelorussian', 'locale' => 'bel', 'localeFallback' => 'bel', 'charset' => 'utf-8', 'direction' => 'ltr'), 'bg' => array('language' => 'Bulgarian', 'locale' => 'bul', 'localeFallback' => 'bul', 'charset' => 'utf-8', 'direction' => 'ltr'), + 'bo' => array('language' => 'Tibetan', 'locale' => 'bod', 'localeFallback' => 'bod', 'charset' => 'utf-8', 'direction' => 'ltr'), + 'bo-cn' => array('language' => 'Tibetan (China)', 'locale' => 'bo_cn', 'localeFallback' => 'bod', 'charset' => 'utf-8', 'direction' => 'ltr'), + 'bo-in' => array('language' => 'Tibetan (India)', 'locale' => 'bo_in', 'localeFallback' => 'bod', 'charset' => 'utf-8', 'direction' => 'ltr'), 'bs' => array('language' => 'Bosnian', 'locale' => 'bos', 'localeFallback' => 'bos', 'charset' => 'utf-8', 'direction' => 'ltr'), 'ca' => array('language' => 'Catalan', 'locale' => 'cat', 'localeFallback' => 'cat', 'charset' => 'utf-8', 'direction' => 'ltr'), 'cs' => array('language' => 'Czech', 'locale' => 'cze', 'localeFallback' => 'cze', 'charset' => 'utf-8', 'direction' => 'ltr'), diff --git a/cake/libs/log/file_log.php b/cake/libs/log/file_log.php index 988a983..604d62d 100755 --- a/cake/libs/log/file_log.php +++ b/cake/libs/log/file_log.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.log diff --git a/cake/libs/magic_db.php b/cake/libs/magic_db.php index 2fafde3..53b6023 100755 --- a/cake/libs/magic_db.php +++ b/cake/libs/magic_db.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -27,8 +27,8 @@ /** * A class to parse and use the MagicDb for file type analysis * - * @package cake.tests - * @subpackage cake.tests.cases.libs + * @package cake + * @subpackage cake.cake.libs */ class MagicDb extends Object { @@ -173,10 +173,10 @@ function analyze($file, $options = array()) { } /** - * undocumented class + * MagicFileResource * - * @package cake.tests - * @subpackage cake.tests.cases.libs + * @package cake + * @subpackage cake.cake.libs */ class MagicFileResource extends Object{ diff --git a/cake/libs/model/app_model.php b/cake/libs/model/app_model.php index 165abfa..a7b5a32 100755 --- a/cake/libs/model/app_model.php +++ b/cake/libs/model/app_model.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model diff --git a/cake/libs/model/behaviors/acl.php b/cake/libs/model/behaviors/acl.php index bf063d8..05f6423 100755 --- a/cake/libs/model/behaviors/acl.php +++ b/cake/libs/model/behaviors/acl.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.model.behaviors diff --git a/cake/libs/model/behaviors/containable.php b/cake/libs/model/behaviors/containable.php index aaab354..5c36996 100755 --- a/cake/libs/model/behaviors/containable.php +++ b/cake/libs/model/behaviors/containable.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs @@ -98,16 +98,26 @@ function setup(&$Model, $settings = array()) { */ function beforeFind(&$Model, $query) { $reset = (isset($query['reset']) ? $query['reset'] : true); - $noContain = ((isset($this->runtime[$Model->alias]['contain']) && empty($this->runtime[$Model->alias]['contain'])) || (isset($query['contain']) && empty($query['contain']))); + $noContain = false; $contain = array(); + if (isset($this->runtime[$Model->alias]['contain'])) { + $noContain = empty($this->runtime[$Model->alias]['contain']); $contain = $this->runtime[$Model->alias]['contain']; unset($this->runtime[$Model->alias]['contain']); } + if (isset($query['contain'])) { - $contain = array_merge($contain, (array)$query['contain']); + $noContain = $noContain || empty($query['contain']); + if ($query['contain'] !== false) { + $contain = array_merge($contain, (array)$query['contain']); + } } - if ($noContain || !$contain || in_array($contain, array(null, false), true) || (isset($contain[0]) && $contain[0] === null)) { + $noContain = $noContain && empty($contain); + + if ( + $noContain || empty($contain) || (isset($contain[0]) && $contain[0] === null) + ) { if ($noContain) { $query['recursive'] = -1; } @@ -147,8 +157,6 @@ function beforeFind(&$Model, $query) { if (!empty($unbind)) { if (!$reset && empty($instance->__backOriginalAssociation)) { $instance->__backOriginalAssociation = $backupBindings; - } else if ($reset && empty($instance->__backContainableAssociation)) { - $instance->__backContainableAssociation = $backupBindings; } $instance->unbindModel(array($type => $unbind), $reset); } @@ -219,24 +227,6 @@ function beforeFind(&$Model, $query) { return $query; } -/** - * Resets original associations on models that may have receive multiple, - * subsequent unbindings. - * - * @param object $Model Model on which we are resetting - * @param array $results Results of the find operation - * @param bool $primary true if this is the primary model that issued the find operation, false otherwise - * @access public - */ - function afterFind(&$Model, $results, $primary) { - if (!empty($Model->__backContainableAssociation)) { - foreach ($Model->__backContainableAssociation as $relation => $bindings) { - $Model->{$relation} = $bindings; - unset($Model->__backContainableAssociation); - } - } - } - /** * Unbinds all relations from a model except the specified ones. Calling this function without * parameters unbinds all related models. diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index 3e92c41..d5014ee 100755 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.behaviors @@ -34,6 +34,20 @@ class TranslateBehavior extends ModelBehavior { */ var $runtime = array(); +/** + * Stores the joinTable object for generating joins. + * + * @var object + */ + var $_joinTable; + +/** + * Stores the runtime model for generating joins. + * + * @var Model + */ + var $_runtimeModel; + /** * Callback * @@ -96,24 +110,37 @@ function beforeFind(&$model, $query) { } $db =& ConnectionManager::getDataSource($model->useDbConfig); $RuntimeModel =& $this->translateModel($model); + if (!empty($RuntimeModel->tablePrefix)) { $tablePrefix = $RuntimeModel->tablePrefix; } else { $tablePrefix = $db->config['prefix']; } + $joinTable = new StdClass(); + $joinTable->tablePrefix = $tablePrefix; + $joinTable->table = $RuntimeModel->table; + + $this->_joinTable = $joinTable; + $this->_runtimeModel = $RuntimeModel; - if (is_string($query['fields']) && 'COUNT(*) AS '.$db->name('count') == $query['fields']) { + if (is_string($query['fields']) && 'COUNT(*) AS ' . $db->name('count') == $query['fields']) { $query['fields'] = 'COUNT(DISTINCT('.$db->name($model->alias . '.' . $model->primaryKey) . ')) ' . $db->alias . 'count'; + $query['joins'][] = array( 'type' => 'INNER', 'alias' => $RuntimeModel->alias, - 'table' => $db->name($tablePrefix . $RuntimeModel->useTable), + 'table' => $joinTable, 'conditions' => array( $model->alias . '.' . $model->primaryKey => $db->identifier($RuntimeModel->alias.'.foreign_key'), $RuntimeModel->alias.'.model' => $model->name, $RuntimeModel->alias.'.locale' => $locale ) ); + $conditionFields = $this->_checkConditions($model, $query); + foreach ($conditionFields as $field) { + $query = $this->_addJoin($model, $query, $field, $locale, false); + } + unset($this->_joinTable, $this->_runtimeModel); return $query; } $autoFields = false; @@ -147,7 +174,6 @@ function beforeFind(&$model, $query) { if (is_array($query['fields'])) { foreach ($fields as $key => $value) { $field = (is_numeric($key)) ? $value : $key; - if (in_array($model->alias.'.*', $query['fields']) || $autoFields || in_array($model->alias.'.'.$field, $query['fields']) || in_array($field, $query['fields'])) { $addFields[] = $field; } @@ -163,47 +189,90 @@ function beforeFind(&$model, $query) { unset($query['fields'][$key]); } } + $query = $this->_addJoin($model, $query, $field, $locale, true); + } + } + $this->runtime[$model->alias]['beforeFind'] = $addFields; + unset($this->_joinTable, $this->_runtimeModel); + return $query; + } - if (is_array($locale)) { - foreach ($locale as $_locale) { - $query['fields'][] = 'I18n__'.$field.'__'.$_locale.'.content'; - $query['joins'][] = array( - 'type' => 'LEFT', - 'alias' => 'I18n__'.$field.'__'.$_locale, - 'table' => $db->name($tablePrefix . $RuntimeModel->useTable), - 'conditions' => array( - $model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}__{$_locale}.foreign_key"), - 'I18n__'.$field.'__'.$_locale.'.model' => $model->name, - 'I18n__'.$field.'__'.$_locale.'.'.$RuntimeModel->displayField => $field, - 'I18n__'.$field.'__'.$_locale.'.locale' => $_locale - ) - ); - } - } else { - $query['fields'][] = 'I18n__'.$field.'.content'; - $query['joins'][] = array( - 'type' => 'LEFT', - 'alias' => 'I18n__'.$field, - 'table' => $db->name($tablePrefix . $RuntimeModel->useTable), - 'conditions' => array( - $model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}.foreign_key"), - 'I18n__'.$field.'.model' => $model->name, - 'I18n__'.$field.'.'.$RuntimeModel->displayField => $field - ) - ); - - if (is_string($query['conditions'])) { - $query['conditions'] = $db->conditions($query['conditions'], true, false, $model) . ' AND '.$db->name('I18n__'.$field.'.locale').' = \''.$locale.'\''; - } else { - $query['conditions'][$db->name("I18n__{$field}.locale")] = $locale; - } +/** + * Check a query's conditions for translated fields. + * Return an array of translated fields found in the conditions. + * + * @param Model $model The model being read. + * @param array $query The query array. + * @return array The list of translated fields that are in the conditions. + */ + function _checkConditions(&$model, $query) { + $conditionFields = array(); + if (empty($query['conditions']) || (!empty($query['conditions']) && !is_array($query['conditions'])) ) { + return $conditionFields; + } + foreach ($query['conditions'] as $col => $val) { + foreach ($this->settings[$model->alias] as $field => $assoc) { + if (is_numeric($field)) { + $field = $assoc; + } + if (strpos($col, $field) !== false) { + $conditionFields[] = $field; } } } - if (is_array($query['fields'])) { - $query['fields'] = array_merge($query['fields']); + return $conditionFields; + } + +/** + * Appends a join for translated fields and possibly a field. + * + * @param Model $model The model being worked on. + * @param object $joinTable The jointable object. + * @param array $query The query array to append a join to. + * @param string $field The field name being joined. + * @param mixed $locale The locale(s) having joins added. + * @param boolean $addField Whether or not to add a field. + * @return array The modfied query + */ + function _addJoin(&$model, $query, $field, $locale, $addField = false) { + $db =& ConnectionManager::getDataSource($model->useDbConfig); + + $RuntimeModel = $this->_runtimeModel; + $joinTable = $this->_joinTable; + + if (is_array($locale)) { + foreach ($locale as $_locale) { + if ($addField) { + $query['fields'][] = 'I18n__'.$field.'__'.$_locale.'.content'; + } + $query['joins'][] = array( + 'type' => 'LEFT', + 'alias' => 'I18n__'.$field.'__'.$_locale, + 'table' => $joinTable, + 'conditions' => array( + $model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}__{$_locale}.foreign_key"), + 'I18n__'.$field.'__'.$_locale.'.model' => $model->name, + 'I18n__'.$field.'__'.$_locale.'.'.$RuntimeModel->displayField => $field, + 'I18n__'.$field.'__'.$_locale.'.locale' => $_locale + ) + ); + } + } else { + if ($addField) { + $query['fields'][] = 'I18n__'.$field.'.content'; + } + $query['joins'][] = array( + 'type' => 'INNER', + 'alias' => 'I18n__'.$field, + 'table' => $joinTable, + 'conditions' => array( + $model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}.foreign_key"), + 'I18n__'.$field.'.model' => $model->name, + 'I18n__'.$field.'.'.$RuntimeModel->displayField => $field, + 'I18n__'.$field.'.locale' => $locale + ) + ); } - $this->runtime[$model->alias]['beforeFind'] = $addFields; return $query; } @@ -261,6 +330,42 @@ function afterFind(&$model, $results, $primary) { * @access public */ function beforeValidate(&$model) { + unset($this->runtime[$model->alias]['beforeSave']); + $this->_setRuntimeData($model); + return true; + } + +/** + * beforeSave callback. + * + * Copies data into the runtime property when `$options['validate']` is + * disabled. Or the runtime data hasn't been set yet. + * + * @param Model $model Model save was called on. + * @return boolean true. + */ + function beforeSave($model, $options = array()) { + if (isset($options['validate']) && $options['validate'] == false) { + unset($this->runtime[$model->alias]['beforeSave']); + } + if (isset($this->runtime[$model->alias]['beforeSave'])) { + return true; + } + $this->_setRuntimeData($model); + return true; + } + +/** + * Sets the runtime data. + * + * Used from beforeValidate() and beforeSave() for compatibility issues, + * and to allow translations to be persisted even when validation + * is disabled. + * + * @param Model $model + * @return void + */ + function _setRuntimeData(Model $model) { $locale = $this->_getLocale($model); if (empty($locale)) { return true; @@ -284,7 +389,6 @@ function beforeValidate(&$model) { } } $this->runtime[$model->alias]['beforeSave'] = $tempData; - return true; } /** @@ -296,12 +400,17 @@ function beforeValidate(&$model) { * @access public */ function afterSave(&$model, $created) { - if (!isset($this->runtime[$model->alias]['beforeSave'])) { + if (!isset($this->runtime[$model->alias]['beforeValidate']) && !isset($this->runtime[$model->alias]['beforeSave'])) { return true; } $locale = $this->_getLocale($model); - $tempData = $this->runtime[$model->alias]['beforeSave']; - unset($this->runtime[$model->alias]['beforeSave']); + if (isset($this->runtime[$model->alias]['beforeValidate'])) { + $tempData = $this->runtime[$model->alias]['beforeValidate']; + } else { + $tempData = $this->runtime[$model->alias]['beforeSave']; + } + + unset($this->runtime[$model->alias]['beforeValidate'], $this->runtime[$model->alias]['beforeSave']); $conditions = array('model' => $model->alias, 'foreign_key' => $model->id); $RuntimeModel =& $this->translateModel($model); diff --git a/cake/libs/model/behaviors/tree.php b/cake/libs/model/behaviors/tree.php index 52d8c01..7e0eb86 100755 --- a/cake/libs/model/behaviors/tree.php +++ b/cake/libs/model/behaviors/tree.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.model.behaviors @@ -226,7 +226,7 @@ function childcount(&$Model, $id = null, $direct = false) { if ($id === null) { return $Model->find('count', array('conditions' => $scope)); - } elseif (isset($Model->data[$Model->alias][$left]) && isset($Model->data[$Model->alias][$right])) { + } elseif ($Model->id === $id && isset($Model->data[$Model->alias][$left]) && isset($Model->data[$Model->alias][$right])) { $data = $Model->data[$Model->alias]; } else { $data = $Model->find('first', array('conditions' => array($scope, $Model->escapeField() => $id), 'recursive' => $recursive)); @@ -574,7 +574,7 @@ function recover(&$Model, $mode = 'parent', $missingParentAction = null) { $Model->recursive = $recursive; if ($mode == 'parent') { $Model->bindModel(array('belongsTo' => array('VerifyParent' => array( - 'className' => $Model->alias, + 'className' => $Model->name, 'foreignKey' => $parent, 'fields' => array($Model->primaryKey, $left, $right, $parent), )))); @@ -589,7 +589,6 @@ function recover(&$Model, $mode = 'parent', $missingParentAction = null) { if ($missingParentAction == 'return') { foreach ($missingParents as $id => $display) { $this->errors[] = 'cannot find the parent for ' . $Model->alias . ' with id ' . $id . '(' . $display . ')'; - } return false; } elseif ($missingParentAction == 'delete') { @@ -600,13 +599,14 @@ function recover(&$Model, $mode = 'parent', $missingParentAction = null) { } $count = 1; foreach ($Model->find('all', array('conditions' => $scope, 'fields' => array($Model->primaryKey), 'order' => $left)) as $array) { - $Model->id = $array[$Model->alias][$Model->primaryKey]; $lft = $count++; $rght = $count++; + $Model->create(false); + $Model->id = $array[$Model->alias][$Model->primaryKey]; $Model->save(array($left => $lft, $right => $rght), array('callbacks' => false)); } foreach ($Model->find('all', array('conditions' => $scope, 'fields' => array($Model->primaryKey, $parent), 'order' => $left)) as $array) { - $Model->create(); + $Model->create(false); $Model->id = $array[$Model->alias][$Model->primaryKey]; $this->_setParent($Model, $array[$Model->alias][$parent]); } @@ -717,7 +717,7 @@ function removefromtree(&$Model, $id = null, $delete = false) { $db =& ConnectionManager::getDataSource($Model->useDbConfig); $Model->updateAll( - array($parent => $db->value($node[$parent], $parent)), + array($parent => $db->value($node[$parent], $parent)), array($Model->escapeField($parent) => $node[$Model->primaryKey]) ); $this->__sync($Model, 1, '-', 'BETWEEN ' . ($node[$left] + 1) . ' AND ' . ($node[$right] - 1)); @@ -785,7 +785,7 @@ function verify(&$Model) { } $Model->bindModel(array('belongsTo' => array('VerifyParent' => array( - 'className' => $Model->alias, + 'className' => $Model->name, 'foreignKey' => $parent, 'fields' => array($Model->primaryKey, $left, $right, $parent) )))); @@ -827,6 +827,7 @@ function verify(&$Model) { * * @param AppModel $Model Model instance * @param mixed $parentId + * @param boolean $created * @return boolean true on success, false on failure * @access protected */ @@ -861,11 +862,10 @@ function _setParent(&$Model, $parentId = null, $created = false) { if (($Model->id == $parentId)) { return false; - } elseif (($node[$left] < $parentNode[$left]) && ($parentNode[$right] < $node[$right])) { return false; } - if (empty ($node[$left]) && empty ($node[$right])) { + if (empty($node[$left]) && empty ($node[$right])) { $this->__sync($Model, 2, '+', '>= ' . $parentNode[$right], $created); $result = $Model->save( array($left => $parentNode[$right], $right => $parentNode[$right] + 1, $parent => $parentId), @@ -899,6 +899,8 @@ function _setParent(&$Model, $parentId = null, $created = false) { * @param AppModel $Model * @param string $scope * @param string $right + * @param int $recursive + * @param boolean $created * @return int * @access private */ @@ -950,6 +952,7 @@ function __getMin($Model, $scope, $left, $recursive = -1) { * @param integer $shift * @param string $direction * @param array $conditions + * @param boolean $created * @param string $field * @access private */ diff --git a/cake/libs/model/cake_schema.php b/cake/libs/model/cake_schema.php index 940b4a1..c4e3ea4 100755 --- a/cake/libs/model/cake_schema.php +++ b/cake/libs/model/cake_schema.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model @@ -309,19 +309,21 @@ function read($options = array()) { $systemTables = array( 'aros', 'acos', 'aros_acos', Configure::read('Session.table'), 'i18n' ); - + + $fulltable = $db->fullTableName($Object, false); + if (in_array($table, $systemTables)) { $tables[$Object->table] = $this->__columns($Object); $tables[$Object->table]['indexes'] = $db->index($Object); - $tables[$Object->table]['tableParameters'] = $db->readTableParameters($table); + $tables[$Object->table]['tableParameters'] = $db->readTableParameters($fulltable); } elseif ($models === false) { $tables[$table] = $this->__columns($Object); $tables[$table]['indexes'] = $db->index($Object); - $tables[$table]['tableParameters'] = $db->readTableParameters($table); + $tables[$table]['tableParameters'] = $db->readTableParameters($fulltable); } else { $tables['missing'][$table] = $this->__columns($Object); $tables['missing'][$table]['indexes'] = $db->index($Object); - $tables['missing'][$table]['tableParameters'] = $db->readTableParameters($table); + $tables['missing'][$table]['tableParameters'] = $db->readTableParameters($fulltable); } } } @@ -491,7 +493,7 @@ function compare($old, $new = null) { } } - if (isset($add[$table][$field])) { + if (isset($tables[$table]['add'][$field]) && $field !== 'indexes' && $field !== 'tableParameters') { $wrapper = array_keys($fields); if ($column = array_search($field, $wrapper)) { if (isset($wrapper[$column - 1])) { @@ -555,6 +557,9 @@ function _arrayDiffAssoc($array1, $array2) { $difference[$key] = $value; continue; } + if (is_array($value) && is_array($correspondingValue)) { + continue; + } $compare = strval($value); $correspondingValue = strval($correspondingValue); if ($compare === $correspondingValue) { diff --git a/cake/libs/model/connection_manager.php b/cake/libs/model/connection_manager.php index 64c08a6..69cbe85 100755 --- a/cake/libs/model/connection_manager.php +++ b/cake/libs/model/connection_manager.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model diff --git a/cake/libs/model/datasources/datasource.php b/cake/libs/model/datasources/datasource.php index 086905f..b141f5c 100755 --- a/cake/libs/model/datasources/datasource.php +++ b/cake/libs/model/datasources/datasource.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources @@ -375,13 +375,11 @@ function update(&$model, $fields = null, $values = null) { * To-be-overridden in subclasses. * * @param Model $model The model class having record(s) deleted - * @param mixed $id Primary key of the model + * @param mixed $conditions The conditions to use for deleting. * @access public */ - function delete(&$model, $id = null) { - if ($id == null) { - $id = $model->id; - } + function delete(&$model, $conditions = null) { + return false; } /** diff --git a/cake/libs/model/datasources/dbo/dbo_mssql.php b/cake/libs/model/datasources/dbo/dbo_mssql.php index 504f514..5ba9abe 100755 --- a/cake/libs/model/datasources/dbo/dbo_mssql.php +++ b/cake/libs/model/datasources/dbo/dbo_mssql.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo @@ -325,7 +325,11 @@ function fields(&$model, $alias = null, $fields = array(), $quote = true) { $fields = parent::fields($model, $alias, $fields, false); $count = count($fields); - if ($count >= 1 && strpos($fields[0], 'COUNT(*)') === false) { + if ( + $count >= 1 && + strpos($fields[0], 'COUNT(*)') === false && + strpos($fields[0], 'COUNT(DISTINCT') === false + ) { $result = array(); for ($i = 0; $i < $count; $i++) { $prepend = ''; diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/cake/libs/model/datasources/dbo/dbo_mysql.php index 70367b9..dc11d7a 100755 --- a/cake/libs/model/datasources/dbo/dbo_mysql.php +++ b/cake/libs/model/datasources/dbo/dbo_mysql.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo @@ -672,7 +672,7 @@ function value($data, $column = null, $safe = false) { return 'NULL'; } if (is_float($data)) { - return sprintf('%F', $data); + return str_replace(',', '.', strval($data)); } if ((is_int($data) || $data === '0') || ( is_numeric($data) && strpos($data, ',') === false && diff --git a/cake/libs/model/datasources/dbo/dbo_mysqli.php b/cake/libs/model/datasources/dbo/dbo_mysqli.php index c71ee91..81cfd97 100755 --- a/cake/libs/model/datasources/dbo/dbo_mysqli.php +++ b/cake/libs/model/datasources/dbo/dbo_mysqli.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo @@ -188,6 +188,9 @@ function value($data, $column = null, $safe = false) { if ($data === '') { return 'NULL'; } + if (is_float($data)) { + return str_replace(',', '.', strval($data)); + } if ((is_int($data) || is_float($data) || $data === '0') || ( is_numeric($data) && strpos($data, ',') === false && $data[0] != '0' && strpos($data, 'e') === false)) { @@ -269,7 +272,7 @@ function resultSet(&$results) { $j = 0; while ($j < $numFields) { $column = mysqli_fetch_field_direct($results, $j); - if (!empty($column->table)) { + if (!empty($column->table) && strpos($column->name, $this->virtualFieldSeparator) === false) { $this->map[$index++] = array($column->table, $column->name); } else { $this->map[$index++] = array(0, $column->name); diff --git a/cake/libs/model/datasources/dbo/dbo_oracle.php b/cake/libs/model/datasources/dbo/dbo_oracle.php index 2090509..8c0892c 100755 --- a/cake/libs/model/datasources/dbo/dbo_oracle.php +++ b/cake/libs/model/datasources/dbo/dbo_oracle.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo @@ -173,9 +173,9 @@ function connect() { $config['charset'] = !empty($config['charset']) ? $config['charset'] : null; if (!$config['persistent']) { - $this->connection = @ocilogon($config['login'], $config['password'], $config['database'], $config['charset']); + $this->connection = ocilogon($config['login'], $config['password'], $config['database'], $config['charset']); } else { - $this->connection = @ociplogon($config['login'], $config['password'], $config['database'], $config['charset']); + $this->connection = ociplogon($config['login'], $config['password'], $config['database'], $config['charset']); } if ($this->connection) { @@ -467,7 +467,7 @@ function listSources() { if ($cache != null) { return $cache; } - $sql = 'SELECT view_name AS name FROM all_views UNION SELECT table_name AS name FROM all_tables'; + $sql = 'SELECT view_name AS name FROM user_views UNION SELECT table_name AS name FROM user_tables'; if (!$this->execute($sql)) { return false; @@ -503,7 +503,7 @@ function describe(&$model) { return $cache; } - $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \''; + $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM user_tab_columns WHERE table_name = \''; $sql .= strtoupper($this->fullTableName($model)) . '\''; if (!$this->execute($sql)) { diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/cake/libs/model/datasources/dbo/dbo_postgres.php index b1dc8a8..693a68a 100755 --- a/cake/libs/model/datasources/dbo/dbo_postgres.php +++ b/cake/libs/model/datasources/dbo/dbo_postgres.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo @@ -403,7 +403,7 @@ function getSequence($table, $field = 'id') { * @access public */ function truncate($table, $reset = 0) { - if (parent::truncate($table)) { + if ($this->execute('DELETE FROM ' . $this->fullTableName($table))) { $table = $this->fullTableName($table, false); if (isset($this->_sequenceMap[$table]) && $reset !== 1) { foreach ($this->_sequenceMap[$table] as $field => $sequence) { @@ -492,6 +492,7 @@ function fields(&$model, $alias = null, $fields = array(), $quote = true) { /** * Auxiliary function to quote matched `(Model.fields)` from a preg_replace_callback call + * Quotes the fields in a function call. * * @param string matched string * @return string quoted strig @@ -503,9 +504,11 @@ function __quoteFunctionField($match) { $prepend = 'DISTINCT '; $match[1] = trim(str_replace('DISTINCT', '', $match[1])); } - if (strpos($match[1], '.') === false) { + $constant = preg_match('/^\d+|NULL|FALSE|TRUE$/i', $match[1]); + + if (!$constant && strpos($match[1], '.') === false) { $match[1] = $this->name($match[1]); - } else { + } elseif (!$constant){ $parts = explode('.', $match[1]); if (!Set::numeric($parts)) { $match[1] = $this->name($match[1]); @@ -580,11 +583,7 @@ function alterSchema($compare, $table = null) { case 'add': foreach ($column as $field => $col) { $col['name'] = $field; - $alter = 'ADD COLUMN '.$this->buildColumn($col); - if (isset($col['after'])) { - $alter .= ' AFTER '. $this->name($col['after']); - } - $colList[] = $alter; + $colList[] = 'ADD COLUMN '.$this->buildColumn($col); } break; case 'drop': @@ -603,8 +602,7 @@ function alterSchema($compare, $table = null) { $default = isset($col['default']) ? $col['default'] : null; $nullable = isset($col['null']) ? $col['null'] : null; unset($col['default'], $col['null']); - $colList[] = 'ALTER COLUMN '. $fieldName .' TYPE ' . str_replace($fieldName, '', $this->buildColumn($col)); - + $colList[] = 'ALTER COLUMN '. $fieldName .' TYPE ' . str_replace(array($fieldName, 'NOT NULL'), '', $this->buildColumn($col)); if (isset($nullable)) { $nullable = ($nullable) ? 'DROP NOT NULL' : 'SET NOT NULL'; $colList[] = 'ALTER COLUMN '. $fieldName .' ' . $nullable; diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/cake/libs/model/datasources/dbo/dbo_sqlite.php index d541f51..3513cea 100755 --- a/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/cake/libs/model/datasources/dbo/dbo_sqlite.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index c1c6a02..762290a 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources @@ -420,7 +420,7 @@ function fetchAll($sql, $cache = true, $modelName = null) { } if ($cache) { - if (strpos(trim(strtolower($sql)), 'select') !== false) { + if (preg_match('/^\s*select/i', $sql)) { $this->_queryCache[$sql] = $out; } } @@ -736,8 +736,6 @@ function create(&$model, $fields = null, $values = null) { for ($i = 0; $i < $count; $i++) { $valueInsert[] = $this->value($values[$i], $model->getColumnType($fields[$i]), false); - } - for ($i = 0; $i < $count; $i++) { $fieldInsert[] = $this->name($fields[$i]); if ($fields[$i] == $model->primaryKey) { $id = $values[$i]; @@ -776,7 +774,7 @@ function read(&$model, $queryData = array(), $recursive = null) { $queryData = $this->__scrubQueryData($queryData); $null = null; - $array = array(); + $array = array('callbacks' => $queryData['callbacks']); $linkedModels = array(); $this->__bypass = false; $this->__booleans = array(); @@ -827,7 +825,11 @@ function read(&$model, $queryData = array(), $recursive = null) { return false; } - $filtered = $this->__filterResults($resultSet, $model); + $filtered = array(); + + if ($queryData['callbacks'] === true || $queryData['callbacks'] === 'after') { + $filtered = $this->__filterResults($resultSet, $model); + } if ($model->recursive > -1) { foreach ($_associations as $type) { @@ -855,7 +857,9 @@ function read(&$model, $queryData = array(), $recursive = null) { } } } - $this->__filterResults($resultSet, $model, $filtered); + if ($queryData['callbacks'] === true || $queryData['callbacks'] === 'after') { + $this->__filterResults($resultSet, $model, $filtered); + } } if (!is_null($recursive)) { @@ -961,7 +965,9 @@ function queryAssociation(&$model, &$linkModel, $type, $association, $assocData, } } } - $this->__filterResults($fetch, $model); + if ($queryData['callbacks'] === true || $queryData['callbacks'] === 'after') { + $this->__filterResults($fetch, $model); + } return $this->__mergeHasMany($resultSet, $fetch, $association, $model, $linkModel, $recursive); } elseif ($type === 'hasAndBelongsToMany') { $ins = $fetch = array(); @@ -1186,14 +1192,16 @@ function __mergeAssociation(&$data, $merge, $association, $type, $selfJoin = fal } } else { foreach ($merge as $i => $row) { - if (count($row) == 1) { - if (empty($data[$association]) || (isset($data[$association]) && !in_array($row[$association], $data[$association]))) { - $data[$association][] = $row[$association]; - } - } else if (!empty($row)) { - $tmp = array_merge($row[$association], $row); - unset($tmp[$association]); - $data[$association][] = $tmp; + $insert = array(); + if (count($row) === 1) { + $insert = $row[$association]; + } elseif (isset($row[$association])) { + $insert = array_merge($row[$association], $row); + unset($insert[$association]); + } + + if (empty($data[$association]) || (isset($data[$association]) && !in_array($insert, $data[$association], true))) { + $data[$association][] = $insert; } } } @@ -1297,7 +1305,7 @@ function generateAssociationQuery(&$model, &$linkModel, $type, $association = nu $query = array_merge(array('order' => $assocData['order'], 'limit' => $assocData['limit']), $query); } else { $join = array( - 'table' => $this->fullTableName($linkModel), + 'table' => $linkModel, 'alias' => $alias, 'type' => isset($assocData['type']) ? $assocData['type'] : 'LEFT', 'conditions' => trim($this->conditions($conditions, true, false, $model)) @@ -1336,7 +1344,7 @@ function generateAssociationQuery(&$model, &$linkModel, $type, $association = nu $joinKeys = array($assocData['foreignKey'], $assocData['associationForeignKey']); list($with, $joinFields) = $model->joinModel($assocData['with'], $joinKeys); - $joinTbl = $this->fullTableName($model->{$with}); + $joinTbl = $model->{$with}; $joinAlias = $joinTbl; if (is_array($joinFields) && !empty($joinFields)) { @@ -1346,8 +1354,8 @@ function generateAssociationQuery(&$model, &$linkModel, $type, $association = nu $joinFields = array(); } } else { - $joinTbl = $this->fullTableName($assocData['joinTable']); - $joinAlias = $joinTbl; + $joinTbl = $assocData['joinTable']; + $joinAlias = $this->fullTableName($assocData['joinTable']); } $query = array( 'conditions' => $assocData['conditions'], @@ -1436,6 +1444,9 @@ function buildJoinStatement($join) { if (!empty($data['conditions'])) { $data['conditions'] = trim($this->conditions($data['conditions'], true, false)); } + if (!empty($data['table'])) { + $data['table'] = $this->fullTableName($data['table']); + } return $this->renderJoinStatement($data); } @@ -1730,7 +1741,7 @@ function _getJoins($model) { if (isset($model->{$assoc}) && $model->useDbConfig == $model->{$assoc}->useDbConfig) { $assocData = $model->getAssociated($assoc); $join[] = $this->buildJoinStatement(array( - 'table' => $this->fullTableName($model->{$assoc}), + 'table' => $model->{$assoc}, 'alias' => $assoc, 'type' => isset($assocData['type']) ? $assocData['type'] : 'LEFT', 'conditions' => trim($this->conditions( @@ -1912,6 +1923,9 @@ function __scrubQueryData($data) { $data[$key] = array(); } } + if (!array_key_exists('callbacks', $data)) { + $data['callbacks'] = null; + } return $data; } @@ -2239,8 +2253,8 @@ function conditionKeysToString($conditions, $quoteValues = true, $model = null) * @access private */ function __parseKey(&$model, $key, $value) { - $operatorMatch = '/^((' . implode(')|(', $this->__sqlOps); - $operatorMatch .= '\\x20)|<[>=]?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)/is'; + $operatorMatch = '/^(((' . implode(')|(', $this->__sqlOps); + $operatorMatch .= ')\\x20?)|<[>=]?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)/is'; $bound = (strpos($key, '?') !== false || (is_array($value) && strpos($key, ':') !== false)); if (!strpos($key, ' ')) { diff --git a/cake/libs/model/db_acl.php b/cake/libs/model/db_acl.php index 0008a39..ea03023 100755 --- a/cake/libs/model/db_acl.php +++ b/cake/libs/model/db_acl.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model @@ -93,7 +93,7 @@ function node($ref = null) { $db->name("{$type}.rght") . ' >= ' . $db->name("{$type}0.rght")), 'fields' => array('id', 'parent_id', 'model', 'foreign_key', 'alias'), 'joins' => array(array( - 'table' => $db->fullTableName($this), + 'table' => $table, 'alias' => "{$type}0", 'type' => 'LEFT', 'conditions' => array("{$type}0.alias" => $start) @@ -105,7 +105,7 @@ function node($ref = null) { $j = $i - 1; $queryData['joins'][] = array( - 'table' => $db->fullTableName($this), + 'table' => $table, 'alias' => "{$type}{$i}", 'type' => 'LEFT', 'conditions' => array( @@ -175,7 +175,7 @@ function node($ref = null) { 'conditions' => $ref, 'fields' => array('id', 'parent_id', 'model', 'foreign_key', 'alias'), 'joins' => array(array( - 'table' => $db->fullTableName($this), + 'table' => $table, 'alias' => "{$type}0", 'type' => 'LEFT', 'conditions' => array( diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index f25c031..0a34405 100755 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -7,12 +7,12 @@ * PHP versions 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model @@ -1037,7 +1037,7 @@ function isVirtualField($field) { } if (strpos($field, '.') !== false) { list($model, $field) = explode('.', $field); - if (isset($this->virtualFields[$field])) { + if ($model == $this->alias && isset($this->virtualFields[$field])) { return true; } } @@ -1687,7 +1687,10 @@ function saveAll($data = null, $options = array()) { $type = $associations[$association]; switch ($type) { case 'hasOne': - $values[$this->{$type}[$association]['foreignKey']] = $this->id; + if (!$validating) { + $values[$this->{$type}[$association]['foreignKey']] = $this->id; + } + if (!$this->{$association}->__save($values, $options)) { $validationErrors[$association] = $this->{$association}->validationErrors; $validates = false; @@ -1697,9 +1700,12 @@ function saveAll($data = null, $options = array()) { } break; case 'hasMany': - foreach ($values as $i => $value) { - $values[$i][$this->{$type}[$association]['foreignKey']] = $this->id; + if (!$validating) { + foreach ($values as $i => $value) { + $values[$i][$this->{$type}[$association]['foreignKey']] = $this->id; + } } + $_options = array_merge($options, array('atomic' => false)); if ($_options['validate'] === 'first') { @@ -1858,26 +1864,33 @@ function _deleteDependent($id, $cascade) { $savedAssociatons = $this->__backAssociation; $this->__backAssociation = array(); } - foreach (array_merge($this->hasMany, $this->hasOne) as $assoc => $data) { - if ($data['dependent'] === true && $cascade === true) { + if ($cascade === true) { + foreach (array_merge($this->hasMany, $this->hasOne) as $assoc => $data) { + if ($data['dependent'] === true) { - $model =& $this->{$assoc}; - $conditions = array($model->escapeField($data['foreignKey']) => $id); - if ($data['conditions']) { - $conditions = array_merge((array)$data['conditions'], $conditions); - } - $model->recursive = -1; + $model =& $this->{$assoc}; + if ($data['foreignKey'] === false && $data['conditions'] && in_array($this->name, $model->getAssociated('belongsTo'))) { + $model->recursive = 0; + $conditions = array($this->escapeField(null, $this->name) => $id); + } else { + $model->recursive = -1; + $conditions = array($model->escapeField($data['foreignKey']) => $id); + if ($data['conditions']) { + $conditions = array_merge((array)$data['conditions'], $conditions); + } + } - if (isset($data['exclusive']) && $data['exclusive']) { - $model->deleteAll($conditions); - } else { - $records = $model->find('all', array( - 'conditions' => $conditions, 'fields' => $model->primaryKey - )); + if (isset($data['exclusive']) && $data['exclusive']) { + $model->deleteAll($conditions); + } else { + $records = $model->find('all', array( + 'conditions' => $conditions, 'fields' => $model->primaryKey + )); - if (!empty($records)) { - foreach ($records as $record) { - $model->delete($record[$model->alias][$model->primaryKey]); + if (!empty($records)) { + foreach ($records as $record) { + $model->delete($record[$model->alias][$model->primaryKey]); + } } } } @@ -2056,6 +2069,9 @@ function hasAny($conditions = null) { * - If three fields are specified, they are used (in order) for key, value and group. * - Otherwise, first and second fields are used for key and value. * + * Note: find(list) + database views have issues with MySQL 5.0. Try upgrading to MySQL 5.1 if you + * have issues with database views. + * * @param array $conditions SQL conditions array, or type of find operation (all / first / count / * neighbors / list / threaded) * @param mixed $fields Either a single string of a field name, or an array of field names, or @@ -2123,7 +2139,6 @@ function find($conditions = null, $fields = array(), $order = null, $recursive = if (!$db =& ConnectionManager::getDataSource($this->useDbConfig)) { return false; } - $results = $db->read($this, $query); $this->resetAssociations(); @@ -2522,7 +2537,7 @@ function invalidFields($options = array()) { } $Validation =& Validation::getInstance(); - $exists = $this->exists(); + $exists = null; $_validate = $this->validate; $whitelist = $this->whitelist; @@ -2565,72 +2580,76 @@ function invalidFields($options = array()) { $message = __('This field cannot be left blank', true); } - if ( - empty($validator['on']) || ($validator['on'] == 'create' && - !$exists) || ($validator['on'] == 'update' && $exists - )) { - $required = ( - (!isset($data[$fieldName]) && $validator['required'] === true) || - ( - isset($data[$fieldName]) && (empty($data[$fieldName]) && - !is_numeric($data[$fieldName])) && $validator['allowEmpty'] === false - ) - ); + if (!empty($validator['on'])) { + if ($exists === null) { + $exists = $this->exists(); + } + if (($validator['on'] == 'create' && $exists) || ($validator['on'] == 'update' && !$exists)) { + continue; + } + } - if ($required) { - $this->invalidate($fieldName, $message); - if ($validator['last']) { - break; - } - } elseif (array_key_exists($fieldName, $data)) { - if (empty($data[$fieldName]) && $data[$fieldName] != '0' && $validator['allowEmpty'] === true) { - break; - } - if (is_array($validator['rule'])) { - $rule = $validator['rule'][0]; - unset($validator['rule'][0]); - $ruleParams = array_merge(array($data[$fieldName]), array_values($validator['rule'])); - } else { - $rule = $validator['rule']; - $ruleParams = array($data[$fieldName]); - } + $required = ( + (!isset($data[$fieldName]) && $validator['required'] === true) || + ( + isset($data[$fieldName]) && (empty($data[$fieldName]) && + !is_numeric($data[$fieldName])) && $validator['allowEmpty'] === false + ) + ); - $valid = true; - - if (in_array(strtolower($rule), $methods)) { - $ruleParams[] = $validator; - $ruleParams[0] = array($fieldName => $ruleParams[0]); - $valid = $this->dispatchMethod($rule, $ruleParams); - } elseif (in_array($rule, $behaviorMethods) || in_array(strtolower($rule), $behaviorMethods)) { - $ruleParams[] = $validator; - $ruleParams[0] = array($fieldName => $ruleParams[0]); - $valid = $this->Behaviors->dispatchMethod($this, $rule, $ruleParams); - } elseif (method_exists($Validation, $rule)) { - $valid = $Validation->dispatchMethod($rule, $ruleParams); - } elseif (!is_array($validator['rule'])) { - $valid = preg_match($rule, $data[$fieldName]); - } elseif (Configure::read('debug') > 0) { - trigger_error(sprintf(__('Could not find validation handler %s for %s', true), $rule, $fieldName), E_USER_WARNING); - } + if ($required) { + $this->invalidate($fieldName, $message); + if ($validator['last']) { + break; + } + } elseif (array_key_exists($fieldName, $data)) { + if (empty($data[$fieldName]) && $data[$fieldName] != '0' && $validator['allowEmpty'] === true) { + break; + } + if (is_array($validator['rule'])) { + $rule = $validator['rule'][0]; + unset($validator['rule'][0]); + $ruleParams = array_merge(array($data[$fieldName]), array_values($validator['rule'])); + } else { + $rule = $validator['rule']; + $ruleParams = array($data[$fieldName]); + } - if (!$valid || (is_string($valid) && strlen($valid) > 0)) { - if (is_string($valid) && strlen($valid) > 0) { - $validator['message'] = $valid; - } elseif (!isset($validator['message'])) { - if (is_string($index)) { - $validator['message'] = $index; - } elseif (is_numeric($index) && count($ruleSet) > 1) { - $validator['message'] = $index + 1; - } else { - $validator['message'] = $message; - } - } - $this->invalidate($fieldName, $validator['message']); + $valid = true; + + if (in_array(strtolower($rule), $methods)) { + $ruleParams[] = $validator; + $ruleParams[0] = array($fieldName => $ruleParams[0]); + $valid = $this->dispatchMethod($rule, $ruleParams); + } elseif (in_array($rule, $behaviorMethods) || in_array(strtolower($rule), $behaviorMethods)) { + $ruleParams[] = $validator; + $ruleParams[0] = array($fieldName => $ruleParams[0]); + $valid = $this->Behaviors->dispatchMethod($this, $rule, $ruleParams); + } elseif (method_exists($Validation, $rule)) { + $valid = $Validation->dispatchMethod($rule, $ruleParams); + } elseif (!is_array($validator['rule'])) { + $valid = preg_match($rule, $data[$fieldName]); + } elseif (Configure::read('debug') > 0) { + trigger_error(sprintf(__('Could not find validation handler %s for %s', true), $rule, $fieldName), E_USER_WARNING); + } - if ($validator['last']) { - break; + if (!$valid || (is_string($valid) && strlen($valid) > 0)) { + if (is_string($valid) && strlen($valid) > 0) { + $validator['message'] = $valid; + } elseif (!isset($validator['message'])) { + if (is_string($index)) { + $validator['message'] = $index; + } elseif (is_numeric($index) && count($ruleSet) > 1) { + $validator['message'] = $index + 1; + } else { + $validator['message'] = $message; } } + $this->invalidate($fieldName, $validator['message']); + + if ($validator['last']) { + break; + } } } } diff --git a/cake/libs/model/model_behavior.php b/cake/libs/model/model_behavior.php index 4021b9b..a79fd7a 100755 --- a/cake/libs/model/model_behavior.php +++ b/cake/libs/model/model_behavior.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model diff --git a/cake/libs/multibyte.php b/cake/libs/multibyte.php index 44aa20e..ce8518b 100755 --- a/cake/libs/multibyte.php +++ b/cake/libs/multibyte.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -1047,7 +1047,7 @@ function mimeEncode($string, $charset = null, $newline = "\r\n") { $parts = array(); $maxchars = floor(($length * 3) / 4); while (strlen($string) > $maxchars) { - $i = $maxchars; + $i = (int)$maxchars; $test = ord($string[$i]); while ($test >= 128 && $test <= 191) { $i--; diff --git a/cake/libs/object.php b/cake/libs/object.php index 1ed21d1..a35c3ff 100755 --- a/cake/libs/object.php +++ b/cake/libs/object.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/overloadable.php b/cake/libs/overloadable.php index 77fbc80..f867037 100755 --- a/cake/libs/overloadable.php +++ b/cake/libs/overloadable.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/overloadable_php4.php b/cake/libs/overloadable_php4.php index 52550c7..e0cafe9 100755 --- a/cake/libs/overloadable_php4.php +++ b/cake/libs/overloadable_php4.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/overloadable_php5.php b/cake/libs/overloadable_php5.php index e69d514..392e0a6 100755 --- a/cake/libs/overloadable_php5.php +++ b/cake/libs/overloadable_php5.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/router.php b/cake/libs/router.php index 405a6b7..6cfdc7b 100755 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -275,7 +275,7 @@ function connect($route, $defaults = array(), $options = array()) { } $defaults += array('plugin' => null); if (empty($options['action'])) { - $defaults += array('action' => 'index'); + $defaults += array('action' => 'index'); } $routeClass = 'CakeRoute'; if (isset($options['routeClass'])) { @@ -326,10 +326,10 @@ function connect($route, $defaults = array(), $options = array()) { * Router::connectNamed( * array('page' => array('action' => 'index', 'controller' => 'pages')), * array('default' => false, 'greedy' => false) - * ); + * ); * }}} * - * @param array $named A list of named parameters. Key value pairs are accepted where values are + * @param array $named A list of named parameters. Key value pairs are accepted where values are * either regex strings to match, or arrays as seen above. * @param array $options Allows to control all settings: separator, greedy, reset, default * @return array @@ -612,7 +612,7 @@ function __connectDefaultRoutes() { /** * Takes parameter and path information back from the Dispatcher, sets these - * parameters as the current request parameters that are merged with url arrays + * parameters as the current request parameters that are merged with url arrays * created later in the request. * * @param array $params Parameters and path information @@ -692,7 +692,7 @@ function getPaths($current = false) { } /** - * Reloads default Router settings. Resets all class variables and + * Reloads default Router settings. Resets all class variables and * removes all connected routes. * * @access public @@ -741,7 +741,7 @@ function promote($which = null) { * - A combination of controller/action - the method will find url for it. * * There are a few 'special' parameters that can change the final URL string that is generated - * + * * - `base` - Set to false to remove the base path from the generated url. If your application * is not in the root directory, this can be used to generate urls that are 'cake relative'. * cake relative urls are required when using requestAction. @@ -853,7 +853,7 @@ function url($url = null, $full = false) { } $output = str_replace('//', '/', $base . '/' . $output); } else { - if (((strpos($url, '://')) || (strpos($url, 'javascript:') === 0) || (strpos($url, 'mailto:') === 0)) || (!strncmp($url, '#', 1))) { + if (((strpos($url, '://')) !== false || (strpos($url, 'javascript:') === 0) || (strpos($url, 'mailto:') === 0)) || (!strncmp($url, '#', 1))) { return $url; } if (empty($url)) { @@ -948,7 +948,14 @@ function _handleNoRoute($url) { if (!empty($named)) { foreach ($named as $name => $value) { - $output .= '/' . $name . $this->named['separator'] . $value; + if (is_array($value)) { + $flattend = Set::flatten($value, ']['); + foreach ($flattend as $namedKey => $namedValue) { + $output .= '/' . $name . "[$namedKey]" . $this->named['separator'] . $namedValue; + } + } else { + $output .= '/' . $name . $this->named['separator'] . $value; + } } } return $output; @@ -1240,7 +1247,8 @@ function getArgs($args, $options = array()) { * Not normally created as a standalone. Use Router::connect() to create * Routes for your application. * - * @package cake.libs + * @package cake + * @subpackage cake.cake.libs * @since 1.3.0 * @see Router::connect() */ @@ -1455,8 +1463,8 @@ function parse($url) { } /** - * Apply persistent parameters to a url array. Persistant parameters are a special - * key used during route creation to force route parameters to persist when omitted from + * Apply persistent parameters to a url array. Persistant parameters are a special + * key used during route creation to force route parameters to persist when omitted from * a url array. * * @param array $url The array to apply persistent parameters to. @@ -1610,12 +1618,13 @@ function _writeUrl($params) { * Plugin short route, that copies the plugin param to the controller parameters * It is used for supporting /:plugin routes. * - * @package cake.libs + * @package cake + * @subpackage cake.cake.libs */ class PluginShortRoute extends CakeRoute { /** - * Parses a string url into an array. If a plugin key is found, it will be copied to the + * Parses a string url into an array. If a plugin key is found, it will be copied to the * controller parameter * * @param string $url The url to parse diff --git a/cake/libs/sanitize.php b/cake/libs/sanitize.php index 09305e1..3d3adc5 100755 --- a/cake/libs/sanitize.php +++ b/cake/libs/sanitize.php @@ -1,5 +1,5 @@ $key, 'item' => array_keys($context['item']), ); - } elseif (($key === $token || (ctype_digit($token) && $key == $token) || $token === '.')) { - $context['trace'][] = $key; - $matches[] = array( - 'trace' => $context['trace'], - 'key' => $key, - 'item' => $context['item'], - ); - } elseif (is_array($context['item']) && array_key_exists($token, $context['item'])) { + } elseif (is_array($context['item']) + && array_key_exists($token, $context['item']) + && !(strval($key) === strval($token) && count($tokens) == 1 && $tokens[0] === '.')) { $items = $context['item'][$token]; if (!is_array($items)) { $items = array($items); @@ -477,6 +472,13 @@ function extract($path, $data = null, $options = array()) { 'item' => $item, ); } + } elseif ($key === $token || (ctype_digit($token) && $key == $token) || $token === '.') { + $context['trace'][] = $key; + $matches[] = array( + 'trace' => $context['trace'], + 'key' => $key, + 'item' => $context['item'], + ); } } if ($conditions) { @@ -702,6 +704,9 @@ function insert($list, $path, $data = null) { } $_list =& $_list[$key]; } + if (!is_array($_list)) { + return array(); + } } return $list; } diff --git a/cake/libs/string.php b/cake/libs/string.php index f255029..6df5d4d 100755 --- a/cake/libs/string.php +++ b/cake/libs/string.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/libs/validation.php b/cake/libs/validation.php index 2a4f871..ac9b6e5 100755 --- a/cake/libs/validation.php +++ b/cake/libs/validation.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -400,7 +400,7 @@ function date($check, $format = 'ymd', $regex = null) { $regex['mdy'] = '%^(?:(?:(?:0?[13578]|1[02])(\\/|-|\\.|\\x20)31)\\1|(?:(?:0?[13-9]|1[0-2])(\\/|-|\\.|\\x20)(?:29|30)\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:0?2(\\/|-|\\.|\\x20)29\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\\/|-|\\.|\\x20)(?:0?[1-9]|1\\d|2[0-8])\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$%'; $regex['ymd'] = '%^(?:(?:(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\\/|-|\\.|\\x20)(?:0?2\\1(?:29)))|(?:(?:(?:1[6-9]|[2-9]\\d)?\\d{2})(\\/|-|\\.|\\x20)(?:(?:(?:0?[13578]|1[02])\\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\\2(?:0?[1-9]|1\\d|2[0-8]))))$%'; $regex['dMy'] = '/^((31(?!\\ (Feb(ruary)?|Apr(il)?|June?|(Sep(?=\\b|t)t?|Nov)(ember)?)))|((30|29)(?!\\ Feb(ruary)?))|(29(?=\\ Feb(ruary)?\\ (((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\\d|2[0-8])\\ (Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\\b|t)t?|Nov|Dec)(ember)?)\\ ((1[6-9]|[2-9]\\d)\\d{2})$/'; - $regex['Mdy'] = '/^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sept|Nov|Dec)(ember)?)\\ (0?[1-9]|([12]\\d)|30))|(Feb(ruary)?\\ (0?[1-9]|1\\d|2[0-8]|(29(?=,?\\ ((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\\,?\\ ((1[6-9]|[2-9]\\d)\\d{2}))$/'; + $regex['Mdy'] = '/^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep)(tember)?|(Nov|Dec)(ember)?)\\ (0?[1-9]|([12]\\d)|30))|(Feb(ruary)?\\ (0?[1-9]|1\\d|2[0-8]|(29(?=,?\\ ((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\\,?\\ ((1[6-9]|[2-9]\\d)\\d{2}))$/'; $regex['My'] = '%^(Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\\b|t)t?|Nov|Dec)(ember)?)[ /]((1[6-9]|[2-9]\\d)\\d{2})$%'; $regex['my'] = '%^(((0[123456789]|10|11|12)([- /.])(([1][9][0-9][0-9])|([2][0-9][0-9][0-9]))))$%'; @@ -429,7 +429,7 @@ function time($check) { $_this =& Validation::getInstance(); $_this->__reset(); $_this->check = $check; - $_this->regex = '%^((0?[1-9]|1[012])(:[0-5]\d){0,2}([AP]M|[ap]m))$|^([01]\d|2[0-3])(:[0-5]\d){0,2}$%'; + $_this->regex = '%^((0?[1-9]|1[012])(:[0-5]\d){0,2} ?([AP]M|[ap]m))$|^([01]\d|2[0-3])(:[0-5]\d){0,2}$%'; return $_this->_check(); } @@ -840,7 +840,7 @@ function ssn($check, $regex = null, $country = null) { /** * Checks that a value is a valid uuid - http://tools.ietf.org/html/rfc4122 - * + * * @param string $check Value to check * @return boolean Success * @access public diff --git a/cake/libs/view/elements/email/html/default.ctp b/cake/libs/view/elements/email/html/default.ctp index 4282be5..529185a 100755 --- a/cake/libs/view/elements/email/html/default.ctp +++ b/cake/libs/view/elements/email/html/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.html diff --git a/cake/libs/view/elements/email/text/default.ctp b/cake/libs/view/elements/email/text/default.ctp index 60d71c3..c1ed92d 100755 --- a/cake/libs/view/elements/email/text/default.ctp +++ b/cake/libs/view/elements/email/text/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text diff --git a/cake/libs/view/elements/sql_dump.ctp b/cake/libs/view/elements/sql_dump.ctp index 4ff82d8..2290c88 100755 --- a/cake/libs/view/elements/sql_dump.ctp +++ b/cake/libs/view/elements/sql_dump.ctp @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements diff --git a/cake/libs/view/errors/error404.ctp b/cake/libs/view/errors/error404.ctp index 99c2459..474c180 100755 --- a/cake/libs/view/errors/error404.ctp +++ b/cake/libs/view/errors/error404.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/error500.ctp b/cake/libs/view/errors/error500.ctp index 93a2326..898b996 100755 --- a/cake/libs/view/errors/error500.ctp +++ b/cake/libs/view/errors/error500.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_action.ctp b/cake/libs/view/errors/missing_action.ctp index 7416a78..7a652b1 100755 --- a/cake/libs/view/errors/missing_action.ctp +++ b/cake/libs/view/errors/missing_action.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_behavior_class.ctp b/cake/libs/view/errors/missing_behavior_class.ctp index b06eaf3..bb0757e 100755 --- a/cake/libs/view/errors/missing_behavior_class.ctp +++ b/cake/libs/view/errors/missing_behavior_class.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_behavior_file.ctp b/cake/libs/view/errors/missing_behavior_file.ctp index a86b816..82c4c48 100755 --- a/cake/libs/view/errors/missing_behavior_file.ctp +++ b/cake/libs/view/errors/missing_behavior_file.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_component_class.ctp b/cake/libs/view/errors/missing_component_class.ctp index 485aa65..e5552e8 100755 --- a/cake/libs/view/errors/missing_component_class.ctp +++ b/cake/libs/view/errors/missing_component_class.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_component_file.ctp b/cake/libs/view/errors/missing_component_file.ctp index a15737e..d4ae8e1 100755 --- a/cake/libs/view/errors/missing_component_file.ctp +++ b/cake/libs/view/errors/missing_component_file.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_connection.ctp b/cake/libs/view/errors/missing_connection.ctp index 4c53098..9816b23 100755 --- a/cake/libs/view/errors/missing_connection.ctp +++ b/cake/libs/view/errors/missing_connection.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_controller.ctp b/cake/libs/view/errors/missing_controller.ctp index c72215b..65d802a 100755 --- a/cake/libs/view/errors/missing_controller.ctp +++ b/cake/libs/view/errors/missing_controller.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_helper_class.ctp b/cake/libs/view/errors/missing_helper_class.ctp index 28d9f47..1d5296b 100755 --- a/cake/libs/view/errors/missing_helper_class.ctp +++ b/cake/libs/view/errors/missing_helper_class.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_helper_file.ctp b/cake/libs/view/errors/missing_helper_file.ctp index c346df6..268348a 100755 --- a/cake/libs/view/errors/missing_helper_file.ctp +++ b/cake/libs/view/errors/missing_helper_file.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_layout.ctp b/cake/libs/view/errors/missing_layout.ctp index ed71f18..5e54238 100755 --- a/cake/libs/view/errors/missing_layout.ctp +++ b/cake/libs/view/errors/missing_layout.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_model.ctp b/cake/libs/view/errors/missing_model.ctp index c68967f..6899128 100755 --- a/cake/libs/view/errors/missing_model.ctp +++ b/cake/libs/view/errors/missing_model.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_scaffolddb.ctp b/cake/libs/view/errors/missing_scaffolddb.ctp index 19d0267..79792c3 100755 --- a/cake/libs/view/errors/missing_scaffolddb.ctp +++ b/cake/libs/view/errors/missing_scaffolddb.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_table.ctp b/cake/libs/view/errors/missing_table.ctp index 9e4a8ba..402e624 100755 --- a/cake/libs/view/errors/missing_table.ctp +++ b/cake/libs/view/errors/missing_table.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/missing_view.ctp b/cake/libs/view/errors/missing_view.ctp index 8f7dbf2..1f5ee0c 100755 --- a/cake/libs/view/errors/missing_view.ctp +++ b/cake/libs/view/errors/missing_view.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/private_action.ctp b/cake/libs/view/errors/private_action.ctp index abfc42e..ac8c9b1 100755 --- a/cake/libs/view/errors/private_action.ctp +++ b/cake/libs/view/errors/private_action.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/errors/scaffold_error.ctp b/cake/libs/view/errors/scaffold_error.ctp index 8013091..1ab2718 100755 --- a/cake/libs/view/errors/scaffold_error.ctp +++ b/cake/libs/view/errors/scaffold_error.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index a25e4f9..ff9a47a 100755 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view @@ -573,20 +573,20 @@ function field() { } /** - * Returns false if given FORM field has no errors. Otherwise it returns the constant set in + * Returns null if given FORM field has no errors. Otherwise it returns the constant set in * the array Model->validationErrors. * * @param string $model Model name as a string * @param string $field Fieldname as a string * @param integer $modelID Unique index identifying this record within the form - * @return boolean True on errors. + * @return mixed Null if no errors, string with error otherwhise. */ function tagIsInvalid($model = null, $field = null, $modelID = null) { $view =& ClassRegistry::getObject('view'); $errors = $this->validationErrors; $entity = $view->entity(); if (!empty($entity)) { - return Set::extract($errors, join('.', $entity)); + return Set::extract(join('.', $entity), $errors); } } @@ -704,7 +704,7 @@ function value($options = array(), $field = null, $key = 'value') { $entity = $view->entity(); if (!empty($this->data) && !empty($entity)) { - $result = Set::extract($this->data, join('.', $entity)); + $result = Set::extract(join('.', $entity), $this->data); } $habtmKey = $this->field(); @@ -756,7 +756,7 @@ function _initInputField($field, $options = array()) { $options = $this->_name($options); $options = $this->value($options); $options = $this->domId($options); - if ($this->tagIsInvalid()) { + if ($this->tagIsInvalid() !== null) { $options = $this->addClass($options, 'form-error'); } return $options; diff --git a/cake/libs/view/helpers/ajax.php b/cake/libs/view/helpers/ajax.php index 68860ed..3009906 100755 --- a/cake/libs/view/helpers/ajax.php +++ b/cake/libs/view/helpers/ajax.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers diff --git a/cake/libs/view/helpers/app_helper.php b/cake/libs/view/helpers/app_helper.php index d08ff0e..696ff35 100755 --- a/cake/libs/view/helpers/app_helper.php +++ b/cake/libs/view/helpers/app_helper.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake diff --git a/cake/libs/view/helpers/cache.php b/cake/libs/view/helpers/cache.php index 9c006e7..0ae759e 100755 --- a/cake/libs/view/helpers/cache.php +++ b/cake/libs/view/helpers/cache.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers @@ -56,6 +56,13 @@ class CacheHelper extends AppHelper { */ var $cacheAction; +/** + * Counter used for counting nocache section tags. + * + * @var integer + */ + var $_counter = 0; + /** * Main method used to cache a view * @@ -101,10 +108,13 @@ function cache($file, $out, $cache = false) { } if ($cacheTime != '' && $cacheTime > 0) { + $out = preg_replace_callback('//', array($this, '_replaceSection'), $out); + $this->__parseFile($file, $out); if ($cache === true) { $cached = $this->__parseOutput($out); $this->__writeFile($cached, $cacheTime, $useCallbacks); + $out = $this->_stripTags($out); } return $out; } else { @@ -125,7 +135,8 @@ function __parseFile($file, $cache) { } elseif ($file = fileExistsInPath($file)) { $file = file_get_contents($file); } - preg_match_all('/((?<=)[\\s\\S]*?(?=<\/cake:nocache>)<\/cake:nocache>)/i', $cache, $outputResult, PREG_PATTERN_ORDER); + + preg_match_all('/((?<=)[\\s\\S]*?(?=<\/cake:nocache>)<\/cake:nocache>)/i', $cache, $outputResult, PREG_PATTERN_ORDER); preg_match_all('/(?<=)([\\s\\S]*?)(?=<\/cake:nocache>)/i', $file, $fileResult, PREG_PATTERN_ORDER); $fileResult = $fileResult[0]; $outputResult = $outputResult[0]; @@ -152,6 +163,30 @@ function __parseFile($file, $cache) { } } +/** + * Munges the output from a view with cache tags, and numbers the sections. + * This helps solve issues with empty/duplicate content. + * + * @param string $content The content to munge. + * @return string The content with cake:nocache tags replaced. + */ + function _replaceSection($matches) { + $this->_counter += 1; + return sprintf('', $this->_counter); + } + +/** + * Strip cake:nocache tags from a string. Since View::render() + * only removes un-numbered nocache tags, remove all the numbered ones. + * This is the complement to _replaceSection. + * + * @param string $content String to remove tags from. + * @return string String with tags removed. + */ + function _stripTags($content) { + return preg_replace('#<\/?cake\:nocache(\:\d{3})?>#', '', $content); + } + /** * Parse the output and replace cache tags * @@ -229,7 +264,7 @@ function __writeFile($content, $timestamp, $useCallbacks = false) { $controller->base = $this->base = \'' . $this->base . '\'; $controller->layout = $this->layout = \'' . $this->layout. '\'; $controller->webroot = $this->webroot = \'' . $this->webroot . '\'; - $controller->here = $this->here = \'' . $this->here . '\'; + $controller->here = $this->here = \'' . addslashes($this->here) . '\'; $controller->params = $this->params = unserialize(stripslashes(\'' . addslashes(serialize($this->params)) . '\')); $controller->action = $this->action = unserialize(\'' . serialize($this->action) . '\'); $controller->data = $this->data = unserialize(stripslashes(\'' . addslashes(serialize($this->data)) . '\')); @@ -242,7 +277,8 @@ function __writeFile($content, $timestamp, $useCallbacks = false) { $controller->constructClasses(); $controller->Component->initialize($controller); $controller->beforeFilter(); - $controller->Component->startup($controller);'; + $controller->Component->startup($controller); + $this->params = $controller->params;'; } $file .= ' diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index 93067a4..f5b9c5b 100755 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers @@ -173,8 +173,11 @@ function _isRequiredField($validateProperties) { * * - `type` Form method defaults to POST * - `action` The controller action the form submits to, (optional). - * - `url` The url the form submits to. Can be a string or a url array, - * - `default` Allows for the creation of Ajax forms. + * - `url` The url the form submits to. Can be a string or a url array. If you use 'url' + * you should leave 'action' undefined. + * - `default` Allows for the creation of Ajax forms. Set this to false to prevent the default event handler. + * Will create an onsubmit attribute if it doesn't not exist. If it does, default action suppression + * will be appended. * - `onsubmit` Used in conjunction with 'default' to create ajax forms. * - `inputDefaults` set the default $options for FormHelper::input(). Any options that would * be set when using FormHelper::input() can be set here. Options set with `inputDefaults` @@ -294,19 +297,18 @@ function create($model = null, $options = array()) { unset($options['type'], $options['action']); if ($options['default'] == false) { - if (isset($htmlAttributes['onSubmit']) || isset($htmlAttributes['onsubmit'])) { - $htmlAttributes['onsubmit'] .= ' event.returnValue = false; return false;'; - } else { - $htmlAttributes['onsubmit'] = 'event.returnValue = false; return false;'; + if (!isset($options['onsubmit'])) { + $options['onsubmit'] = ''; } + $htmlAttributes['onsubmit'] = $options['onsubmit'] . 'event.returnValue = false; return false;'; } + unset($options['default']); if (!empty($options['encoding'])) { $htmlAttributes['accept-charset'] = $options['encoding']; unset($options['encoding']); } - unset($options['default']); $htmlAttributes = array_merge($options, $htmlAttributes); $this->fields = array(); @@ -437,6 +439,12 @@ function __secure($field = null, $value = null) { } } } + + $last = end($field); + if (is_numeric($last) || empty($last)) { + array_pop($field); + } + $field = implode('.', $field); if (!in_array($field, $this->fields)) { if ($value !== null) { @@ -482,7 +490,8 @@ function error($field, $text = null, $options = array()) { $options = array_merge($defaults, $options); $this->setEntity($field); - if ($error = $this->tagIsInvalid()) { + $error = $this->tagIsInvalid(); + if ($error !== null) { if (is_array($error)) { list(,,$field) = explode('.', $field); if (isset($error[$field])) { @@ -504,7 +513,7 @@ function error($field, $text = null, $options = array()) { unset($options[$error]); } - if ($text != null) { + if ($text !== null) { $error = $text; } elseif (is_numeric($error)) { $error = sprintf(__('Error in field %s', true), Inflector::humanize($this->field())); @@ -1086,7 +1095,7 @@ function radio($fieldName, $options = array(), $attributes = array()) { foreach ($options as $optValue => $optTitle) { $optionsHere = array('value' => $optValue); - if (isset($value) && $optValue == $value) { + if (isset($value) && $value !== '' && $optValue == $value) { $optionsHere['checked'] = 'checked'; } $parsedOptions = $this->_parseAttributes( @@ -1351,7 +1360,7 @@ function submit($caption = null, $options = array()) { } $out .= $before . sprintf( $this->Html->tags['submitimage'], - $url, + $this->assetTimestamp($url), $this->_parseAttributes($options, null, '', ' ') ) . $after; } else { @@ -1836,6 +1845,8 @@ function dateTime($fieldName, $dateFormat = 'DMY', $timeFormat = '12', $selected if (($time[0] > 12) && $timeFormat == '12') { $time[0] = $time[0] - 12; $meridian = 'pm'; + } elseif ($time[0] == '12' && $timeFormat == '12') { + $meridian = 'pm'; } elseif ($time[0] == '00' && $timeFormat == '12') { $time[0] = 12; } elseif ($time[0] > 12) { diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 2ba022c..ff8699a 100755 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -5,12 +5,12 @@ * Simplifies the construction of HTML elements. * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers @@ -346,7 +346,7 @@ function css($path, $rel = null, $options = array()) { return; } - if (strpos($path, '://') !== false) { + if (strpos($path, '//') !== false) { $url = $path; } else { if ($path[0] !== '/') { @@ -427,7 +427,7 @@ function script($url, $options = array()) { } $this->__includedScripts[$url] = true; - if (strpos($url, '://') === false) { + if (strpos($url, '//') === false) { if ($url[0] !== '/') { $url = JS_URL . $url; } diff --git a/cake/libs/view/helpers/javascript.php b/cake/libs/view/helpers/javascript.php index 12b1bd2..0100dfe 100755 --- a/cake/libs/view/helpers/javascript.php +++ b/cake/libs/view/helpers/javascript.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers diff --git a/cake/libs/view/helpers/jquery_engine.php b/cake/libs/view/helpers/jquery_engine.php index 0b9825c..b3f408e 100755 --- a/cake/libs/view/helpers/jquery_engine.php +++ b/cake/libs/view/helpers/jquery_engine.php @@ -11,19 +11,25 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake - * @subpackage cake.view.helpers + * @subpackage cake.cake.libs.view.helpers * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Js'); +/** + * jQuery Engine Helper for JsHelper + * + * @package cake + * @subpackage cake.cake.libs.view.helpers + */ class JqueryEngineHelper extends JsBaseEngineHelper { /** * Option mappings for jQuery @@ -178,7 +184,7 @@ function event($type, $callback, $options = array()) { } /** - * Create a domReady event. For jQuery. This method does not + * Create a domReady event. For jQuery. This method does not * bind a 'traditional event' as `$(document).bind('ready', fn)` * Works in an entirely different fashion than `$(document).ready()` * The first will not run the function when eval()'d as part of a response diff --git a/cake/libs/view/helpers/js.php b/cake/libs/view/helpers/js.php index 42f20e2..0f94d9c 100755 --- a/cake/libs/view/helpers/js.php +++ b/cake/libs/view/helpers/js.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.view.helpers @@ -76,7 +76,7 @@ class JsHelper extends AppHelper { * @var string * @access public */ - var $setVariable = APP_DIR; + var $setVariable = 'app'; /** * Constructor - determines engine helper @@ -205,7 +205,7 @@ function value($val, $quoteString = true) { function writeBuffer($options = array()) { $domReady = isset($this->params['isAjax']) ? !$this->params['isAjax'] : true; $defaults = array( - 'onDomReady' => $domReady, 'inline' => true, + 'onDomReady' => $domReady, 'inline' => true, 'cache' => false, 'clear' => true, 'safe' => true ); $options = array_merge($defaults, $options); @@ -240,7 +240,7 @@ function writeBuffer($options = array()) { * Write a script to the buffered scripts. * * @param string $script Script string to add to the buffer. - * @param boolean $top If true the script will be added to the top of the + * @param boolean $top If true the script will be added to the top of the * buffered scripts array. If false the bottom. * @return void * @access public @@ -366,7 +366,7 @@ function set($one, $two = null) { * and require an iframe or flash. * * ### Options - * + * * - `url` The url you wish the XHR request to submit to. * - `confirm` A string to use for a confirm() message prior to submitting the request. * - `method` The method you wish the form to send by, defaults to POST @@ -429,7 +429,7 @@ function submit($caption = null, $options = array()) { */ function _getHtmlOptions($options, $additional = array()) { $htmlKeys = array_merge( - array('class', 'id', 'escape', 'onblur', 'onfocus', 'rel', 'title', 'style'), + array('class', 'id', 'escape', 'onblur', 'onfocus', 'rel', 'title', 'style'), $additional ); $htmlOptions = array(); @@ -452,7 +452,8 @@ function _getHtmlOptions($options, $additional = array()) { * * Abstract Base Class for All JsEngines to extend. Provides generic methods. * - * @package cake.view.helpers + * @package cake + * @subpackage cake.cake.libs.view.helpers */ class JsBaseEngineHelper extends AppHelper { /** diff --git a/cake/libs/view/helpers/mootools_engine.php b/cake/libs/view/helpers/mootools_engine.php index bd9d902..bb4eb7b 100755 --- a/cake/libs/view/helpers/mootools_engine.php +++ b/cake/libs/view/helpers/mootools_engine.php @@ -13,20 +13,26 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake - * @subpackage cake.libs.view.helpers + * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Js'); +/** + * Mootools Engine Helper for JsHelper + * + * @package cake + * @subpackage cake.cake.libs.view.helpers + */ class MootoolsEngineHelper extends JsBaseEngineHelper { /** * Option mappings for MooTools diff --git a/cake/libs/view/helpers/number.php b/cake/libs/view/helpers/number.php index c5021d0..569a816 100755 --- a/cake/libs/view/helpers/number.php +++ b/cake/libs/view/helpers/number.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers @@ -60,7 +60,7 @@ class NumberHelper extends AppHelper { * @access protected */ var $_currencyDefaults = array( - 'before'=>'', 'after' => '', 'zero' => '0', 'places' => 2, 'thousands' => ',', + 'before'=>'', 'after' => false, 'zero' => '0', 'places' => 2, 'thousands' => ',', 'decimals' => '.','negative' => '()', 'escape' => true ); diff --git a/cake/libs/view/helpers/paginator.php b/cake/libs/view/helpers/paginator.php index fafd202..e7918bf 100755 --- a/cake/libs/view/helpers/paginator.php +++ b/cake/libs/view/helpers/paginator.php @@ -5,12 +5,12 @@ * Generates pagination links * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers diff --git a/cake/libs/view/helpers/prototype_engine.php b/cake/libs/view/helpers/prototype_engine.php index 169aa60..6561ee3 100755 --- a/cake/libs/view/helpers/prototype_engine.php +++ b/cake/libs/view/helpers/prototype_engine.php @@ -8,20 +8,26 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake - * @subpackage cake.libs.view.helpers + * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Js'); +/** + * Prototype Engine Helper for JsHelper + * + * @package cake + * @subpackage cake.cake.libs.view.helpers + */ class PrototypeEngineHelper extends JsBaseEngineHelper { /** * Is the current selection a multiple selection? or is it just a single element. diff --git a/cake/libs/view/helpers/rss.php b/cake/libs/view/helpers/rss.php index 7956e37..2f2c2ca 100755 --- a/cake/libs/view/helpers/rss.php +++ b/cake/libs/view/helpers/rss.php @@ -5,12 +5,12 @@ * Simplifies the output of RSS feeds. * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers diff --git a/cake/libs/view/helpers/session.php b/cake/libs/view/helpers/session.php index 63b037b..df81468 100755 --- a/cake/libs/view/helpers/session.php +++ b/cake/libs/view/helpers/session.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers diff --git a/cake/libs/view/helpers/text.php b/cake/libs/view/helpers/text.php index 2a7a9cc..e4cb782 100755 --- a/cake/libs/view/helpers/text.php +++ b/cake/libs/view/helpers/text.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers @@ -75,7 +75,7 @@ function highlight($text, $phrase, $options = array()) { $with = array(); foreach ($phrase as $key => $segment) { - $segment = "($segment)"; + $segment = '(' . preg_quote($segment, '|') . ')'; if ($html) { $segment = "(?![^<]+>)$segment(?![^<]+>)"; } @@ -86,7 +86,7 @@ function highlight($text, $phrase, $options = array()) { return preg_replace($replace, $with, $text); } else { - $phrase = "($phrase)"; + $phrase = '(' . preg_quote($phrase, '|') . ')'; if ($html) { $phrase = "(?![^<]+>)$phrase(?![^<]+>)"; } @@ -287,34 +287,31 @@ function excerpt($text, $phrase, $radius = 100, $ending = '...') { return $this->truncate($text, $radius * 2, array('ending' => $ending)); } + $append = $prepend = $ending; + $phraseLen = mb_strlen($phrase); - if ($radius < $phraseLen) { - $radius = $phraseLen; - } + $textLen = mb_strlen($text); $pos = mb_strpos(mb_strtolower($text), mb_strtolower($phrase)); - - $startPos = 0; - if ($pos > $radius) { - $startPos = $pos - $radius; + if ($pos === false) { + return mb_substr($text, 0, $radius) . $ending; } - $textLen = mb_strlen($text); + $startPos = $pos - $radius; + if ($startPos <= 0) { + $startPos = 0; + $prepend = ''; + } $endPos = $pos + $phraseLen + $radius; if ($endPos >= $textLen) { $endPos = $textLen; + $append = ''; } $excerpt = mb_substr($text, $startPos, $endPos - $startPos); - if ($startPos != 0) { - $excerpt = substr_replace($excerpt, $ending, 0, $phraseLen); - } - - if ($endPos != $textLen) { - $excerpt = substr_replace($excerpt, $ending, -$phraseLen); - } - + $excerpt = $prepend . $excerpt . $append; + return $excerpt; } diff --git a/cake/libs/view/helpers/time.php b/cake/libs/view/helpers/time.php index 232841b..28c6eb4 100755 --- a/cake/libs/view/helpers/time.php +++ b/cake/libs/view/helpers/time.php @@ -5,18 +5,21 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +if (!class_exists('Multibyte')) { + App::import('Core', 'Multibyte'); +} /** * Time Helper class for easy use of time data. @@ -213,7 +216,7 @@ function nice($dateString = null, $userOffset = null) { $date = time(); } $format = $this->convertSpecifiers('%a, %b %eS %Y, %H:%M', $date); - return strftime($format, $date); + return $this->_strftime($format, $date); } /** @@ -236,12 +239,12 @@ function niceShort($dateString = null, $userOffset = null) { $y = $this->isThisYear($date) ? '' : ' %Y'; if ($this->isToday($dateString, $userOffset)) { - $ret = sprintf(__('Today, %s',true), strftime("%H:%M", $date)); + $ret = sprintf(__('Today, %s',true), $this->_strftime("%H:%M", $date)); } elseif ($this->wasYesterday($dateString, $userOffset)) { - $ret = sprintf(__('Yesterday, %s',true), strftime("%H:%M", $date)); + $ret = sprintf(__('Yesterday, %s',true), $this->_strftime("%H:%M", $date)); } else { $format = $this->convertSpecifiers("%b %eS{$y}, %H:%M", $date); - $ret = strftime($format, $date); + $ret = $this->_strftime($format, $date); } return $ret; @@ -440,6 +443,17 @@ function toAtom($dateString, $userOffset = null) { */ function toRSS($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); + + if(!is_null($userOffset)) { + if($userOffset == 0) { + $timezone = '+0000'; + } else { + $hours = (int) floor(abs($userOffset)); + $minutes = (int) (fmod(abs($userOffset), $hours) * 60); + $timezone = ($userOffset < 0 ? '-' : '+') . str_pad($hours, 2, '0', STR_PAD_LEFT) . str_pad($minutes, 2, '0', STR_PAD_LEFT); + } + return date('D, d M Y H:i:s', $date) . ' ' . $timezone; + } return date("r", $date); } @@ -739,6 +753,32 @@ function i18nFormat($date, $format = null, $invalid = false, $userOffset = null) $format = '%x'; } $format = $this->convertSpecifiers($format, $date); - return strftime($format, $date); + return $this->_strftime($format, $date); + } + +/** + * Multibyte wrapper for strftime. + * + * Handles utf8_encoding the result of strftime when necessary. + * + * @param string $format Format string. + * @param int $date Timestamp to format. + * @return string formatted string with correct encoding. + */ + function _strftime($format, $date) { + $format = strftime($format, $date); + $encoding = Configure::read('App.encoding'); + + if (!empty($encoding) && $encoding === 'UTF-8') { + if (function_exists('mb_check_encoding')) { + $valid = mb_check_encoding($format, $encoding); + } else { + $valid = !Multibyte::checkMultibyte($format); + } + if (!$valid) { + $format = utf8_encode($format); + } + } + return $format; } } diff --git a/cake/libs/view/helpers/xml.php b/cake/libs/view/helpers/xml.php index 1a935d3..ddebe83 100755 --- a/cake/libs/view/helpers/xml.php +++ b/cake/libs/view/helpers/xml.php @@ -5,12 +5,12 @@ * Simplifies the output of XML documents. * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers diff --git a/cake/libs/view/layouts/ajax.ctp b/cake/libs/view/layouts/ajax.ctp index 718f8a5..6d3693d 100755 --- a/cake/libs/view/layouts/ajax.ctp +++ b/cake/libs/view/layouts/ajax.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/libs/view/layouts/default.ctp b/cake/libs/view/layouts/default.ctp index 03b960b..97c6887 100755 --- a/cake/libs/view/layouts/default.ctp +++ b/cake/libs/view/layouts/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/libs/view/layouts/email/html/default.ctp b/cake/libs/view/layouts/email/html/default.ctp index 5508597..fd0404c 100755 --- a/cake/libs/view/layouts/email/html/default.ctp +++ b/cake/libs/view/layouts/email/html/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html diff --git a/cake/libs/view/layouts/email/text/default.ctp b/cake/libs/view/layouts/email/text/default.ctp index a066b29..977037a 100755 --- a/cake/libs/view/layouts/email/text/default.ctp +++ b/cake/libs/view/layouts/email/text/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.text diff --git a/cake/libs/view/layouts/flash.ctp b/cake/libs/view/layouts/flash.ctp index 98be96f..8cd2cab 100755 --- a/cake/libs/view/layouts/flash.ctp +++ b/cake/libs/view/layouts/flash.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/libs/view/media.php b/cake/libs/view/media.php index 5800ef2..6314a02 100755 --- a/cake/libs/view/media.php +++ b/cake/libs/view/media.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view diff --git a/cake/libs/view/pages/home.ctp b/cake/libs/view/pages/home.ctp index b512c8b..dd64428 100755 --- a/cake/libs/view/pages/home.ctp +++ b/cake/libs/view/pages/home.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages @@ -24,7 +24,7 @@ endif;

For updates and important announcements, visit http://cakefest.org

- + 0): Debugger::checkSecurityKeys(); diff --git a/cake/libs/view/scaffolds/edit.ctp b/cake/libs/view/scaffolds/edit.ctp index 4fc1652..d9c3534 100755 --- a/cake/libs/view/scaffolds/edit.ctp +++ b/cake/libs/view/scaffolds/edit.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.scaffolds diff --git a/cake/libs/view/scaffolds/index.ctp b/cake/libs/view/scaffolds/index.ctp index 2c0a5e0..13d0ada 100755 --- a/cake/libs/view/scaffolds/index.ctp +++ b/cake/libs/view/scaffolds/index.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views diff --git a/cake/libs/view/scaffolds/view.ctp b/cake/libs/view/scaffolds/view.ctp index e501c2c..699fb0b 100755 --- a/cake/libs/view/scaffolds/view.ctp +++ b/cake/libs/view/scaffolds/view.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.scaffolds diff --git a/cake/libs/view/theme.php b/cake/libs/view/theme.php index c964031..3dec749 100755 --- a/cake/libs/view/theme.php +++ b/cake/libs/view/theme.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 9d60f5d..48cc1f9 100755 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view @@ -163,7 +163,7 @@ class View extends Object { * @access public */ var $subDir = null; - + /** * Theme name. * @@ -357,9 +357,11 @@ function element($name, $params = array(), $loadHelpers = false) { if (is_array($params['cache'])) { $expires = $params['cache']['time']; $key = Inflector::slug($params['cache']['key']); - } elseif ($params['cache'] !== true) { - $expires = $params['cache']; + } else { $key = implode('_', array_keys($params)); + if ($params['cache'] !== true) { + $expires = $params['cache']; + } } if ($expires) { @@ -380,6 +382,9 @@ function element($name, $params = array(), $loadHelpers = false) { break; } } + if ($file) { + break; + } } if (is_file($file)) { @@ -500,7 +505,7 @@ function renderLayout($content_for_layout, $layout = null) { } /** - * Fire a callback on all loaded Helpers. All helpers must implement this method, + * Fire a callback on all loaded Helpers. All helpers must implement this method, * it is not checked before being called. You can add additional helper callbacks in AppHelper. * * @param string $callback name of callback fire. @@ -523,7 +528,7 @@ function _triggerHelpers($callback) { } /** - * Render cached view. Works in concert with CacheHelper and Dispatcher to + * Render cached view. Works in concert with CacheHelper and Dispatcher to * render cached view files. * * @param string $filename the cache file to include @@ -754,7 +759,7 @@ function _render($___viewFn, $___dataForView, $loadHelpers = true, $cached = fal $cache->layout = $this->layout; $cache->cacheAction = $this->cacheAction; $cache->viewVars = $this->viewVars; - $cache->cache($___viewFn, $out, $cached); + $out = $cache->cache($___viewFn, $out, $cached); } } return $out; @@ -863,7 +868,7 @@ function _getViewFileName($name = null) { } } $paths = $this->_paths(Inflector::underscore($this->plugin)); - + $exts = $this->_getExtensions(); foreach ($exts as $ext) { foreach ($paths as $path) { diff --git a/cake/libs/xml.php b/cake/libs/xml.php index a555f45..0f877ad 100755 --- a/cake/libs/xml.php +++ b/cake/libs/xml.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/tests/cases/basics.test.php b/cake/tests/cases/basics.test.php index f0d5691..d6ce2f4 100755 --- a/cake/tests/cases/basics.test.php +++ b/cake/tests/cases/basics.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases diff --git a/cake/tests/cases/console/cake.test.php b/cake/tests/cases/console/cake.test.php index 24a1c4d..030cd84 100755 --- a/cake/tests/cases/console/cake.test.php +++ b/cake/tests/cases/console/cake.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.console diff --git a/cake/tests/cases/console/libs/acl.test.php b/cake/tests/cases/console/libs/acl.test.php index bb435a3..1cb3143 100755 --- a/cake/tests/cases/console/libs/acl.test.php +++ b/cake/tests/cases/console/libs/acl.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/api.test.php b/cake/tests/cases/console/libs/api.test.php index 6d00f23..b963e67 100755 --- a/cake/tests/cases/console/libs/api.test.php +++ b/cake/tests/cases/console/libs/api.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/bake.test.php b/cake/tests/cases/console/libs/bake.test.php index 09c4fea..43216ad 100755 --- a/cake/tests/cases/console/libs/bake.test.php +++ b/cake/tests/cases/console/libs/bake.test.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/schema.test.php b/cake/tests/cases/console/libs/schema.test.php index a8de44d..10f8532 100755 --- a/cake/tests/cases/console/libs/schema.test.php +++ b/cake/tests/cases/console/libs/schema.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.Shells diff --git a/cake/tests/cases/console/libs/shell.test.php b/cake/tests/cases/console/libs/shell.test.php index 7b3c559..c75ac66 100755 --- a/cake/tests/cases/console/libs/shell.test.php +++ b/cake/tests/cases/console/libs/shell.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs @@ -208,6 +208,18 @@ function testIn() { $result = $this->Shell->in('Just a test?', 'y', 'y'); $this->assertEqual($result, 'y'); + $this->Shell->Dispatch->setReturnValueAt(5, 'getInput', 'y'); + $this->Shell->Dispatch->expectAt(5, 'getInput', array('Just a test?', array(0, 1, 2), 0)); + $result = $this->Shell->in('Just a test?', array(0, 1, 2), 0); + $this->assertEqual($result, 0); + } + +/** + * Test in() when not interactive + * + * @return void + */ + function testInNonInteractive() { $this->Shell->interactive = false; $result = $this->Shell->in('Just a test?', 'y/n', 'n'); diff --git a/cake/tests/cases/console/libs/tasks/controller.test.php b/cake/tests/cases/console/libs/tasks/controller.test.php index d00b5f4..fb10e63 100755 --- a/cake/tests/cases/console/libs/tasks/controller.test.php +++ b/cake/tests/cases/console/libs/tasks/controller.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/tasks/db_config.test.php b/cake/tests/cases/console/libs/tasks/db_config.test.php index cb67711..ab68d6e 100755 --- a/cake/tests/cases/console/libs/tasks/db_config.test.php +++ b/cake/tests/cases/console/libs/tasks/db_config.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/tasks/extract.test.php b/cake/tests/cases/console/libs/tasks/extract.test.php index d071c58..ca45eb6 100755 --- a/cake/tests/cases/console/libs/tasks/extract.test.php +++ b/cake/tests/cases/console/libs/tasks/extract.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks @@ -135,10 +135,22 @@ function testExecute() { $this->assertPattern($pattern, $result); $pattern = '/\#: (\\\\|\/)extract\.ctp:14\n'; - $pattern .= '\#: (\\\\|\/)home\.ctp:74\n'; + $pattern .= '\#: (\\\\|\/)home\.ctp:77\n'; $pattern .= 'msgid "Editing this Page"\nmsgstr ""/'; $this->assertPattern($pattern, $result); + $pattern = '/\#: (\\\\|\/)extract\.ctp:17\nmsgid "'; + $pattern .= 'Hot features!'; + $pattern .= '\\\n - No Configuration: Set-up the database and let the magic begin'; + $pattern .= '\\\n - Extremely Simple: Just look at the name...It\'s Cake'; + $pattern .= '\\\n - Active, Friendly Community: Join us #cakephp on IRC. We\'d love to help you get started'; + $pattern .= '"\nmsgstr ""/'; + $this->assertPattern($pattern, $result); + + $pattern = '/\#: (\\\\|\/)extract\.ctp:26\n'; + $pattern .= 'msgid "Found "/'; + $this->assertNoPattern($pattern, $result); + // extract.ctp - reading the domain.pot $result = file_get_contents($path . DS . 'domain.pot'); @@ -155,9 +167,6 @@ function testExecute() { $Folder = new Folder($path); $Folder->delete(); } - function getTests() { - return array('start', 'startCase', 'testExtractMultiplePaths', 'endCase', 'end'); - } /** * test extract can read more than one path. diff --git a/cake/tests/cases/console/libs/tasks/fixture.test.php b/cake/tests/cases/console/libs/tasks/fixture.test.php index b35b2e9..c502db1 100755 --- a/cake/tests/cases/console/libs/tasks/fixture.test.php +++ b/cake/tests/cases/console/libs/tasks/fixture.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks @@ -74,6 +74,7 @@ function startTest() { $this->Dispatcher =& new TestFixtureTaskMockShellDispatcher(); $this->Task =& new MockFixtureTask(); $this->Task->Model =& new MockFixtureModelTask(); + $this->Task->DbConfig =& new MockFixtureModelTask(); $this->Task->Dispatch =& $this->Dispatcher; $this->Task->Template =& new TemplateTask($this->Task->Dispatch); $this->Task->Dispatch->shellPaths = App::path('shells'); @@ -141,9 +142,9 @@ function testImportOptions() { * @return void */ function testImportOptionsAlternateConnection() { - $this->Task->connection = 'test'; + $this->Task->connection = 'test_suite'; $result = $this->Task->bake('Article', false, array('schema' => 'Article')); - $this->assertPattern("/'connection' => 'test'/", $result); + $this->assertPattern("/'connection' => 'test_suite'/", $result); } /** @@ -167,6 +168,28 @@ function testImportRecordsFromDatabaseWithConditions() { $this->assertPattern('/Third Article/', $result, 'Missing import data %s'); } +/** + * Ensure that fixture data doesn't get overly escaped. + * + * @return void + */ + function testImportRecordsNoEscaping() { + $Article = ClassRegistry::init('Article'); + $Article->updateAll(array('body' => "'Body \"value\"'")); + + $this->Task->interactive = true; + $this->Task->setReturnValueAt(0, 'in', 'WHERE 1=1 LIMIT 10'); + $this->Task->connection = 'test_suite'; + $this->Task->path = '/my/path/'; + $result = $this->Task->bake('Article', false, array( + 'fromTable' => true, + 'schema' => 'Article', + 'records' => false + )); + + $this->assertPattern("/'body' => 'Body \"value\"'/", $result, 'Data has escaping %s'); + } + /** * test that execute passes runs bake depending with named model. * @@ -332,6 +355,7 @@ function testRecordGenerationForBinaryAndFloat() { $result = $this->Task->bake('Article', 'datatypes'); $this->assertPattern("/'float_field' => 1/", $result); + $this->assertPattern("/'bool' => 1/", $result); $result = $this->Task->bake('Article', 'binary_tests'); $this->assertPattern("/'data' => 'Lorem ipsum dolor sit amet'/", $result); @@ -351,7 +375,7 @@ function testGenerateFixtureFile() { $this->Task->expectAt(0, 'createFile', array($filename, new PatternExpectation('/Article/'))); $result = $this->Task->generateFixtureFile('Article', array()); - $this->Task->expectAt(1, 'createFile', array($filename, new PatternExpectation('/\<\?php(.*)\?\>/ms'))); + $this->Task->expectAt(1, 'createFile', array($filename, new PatternExpectation('/\<\?php(.*)$/ms'))); $result = $this->Task->generateFixtureFile('Article', array()); } diff --git a/cake/tests/cases/console/libs/tasks/model.test.php b/cake/tests/cases/console/libs/tasks/model.test.php index 6dad33a..0ba2d59 100755 --- a/cake/tests/cases/console/libs/tasks/model.test.php +++ b/cake/tests/cases/console/libs/tasks/model.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/tasks/plugin.test.php b/cake/tests/cases/console/libs/tasks/plugin.test.php index 288f248..d650f7a 100755 --- a/cake/tests/cases/console/libs/tasks/plugin.test.php +++ b/cake/tests/cases/console/libs/tasks/plugin.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/tasks/project.test.php b/cake/tests/cases/console/libs/tasks/project.test.php index 023d0c9..7590f49 100755 --- a/cake/tests/cases/console/libs/tasks/project.test.php +++ b/cake/tests/cases/console/libs/tasks/project.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/tasks/template.test.php b/cake/tests/cases/console/libs/tasks/template.test.php index b84541e..98a2655 100755 --- a/cake/tests/cases/console/libs/tasks/template.test.php +++ b/cake/tests/cases/console/libs/tasks/template.test.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/tasks/test.test.php b/cake/tests/cases/console/libs/tasks/test.test.php index e81f0e8..4bb7350 100755 --- a/cake/tests/cases/console/libs/tasks/test.test.php +++ b/cake/tests/cases/console/libs/tasks/test.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks diff --git a/cake/tests/cases/console/libs/tasks/view.test.php b/cake/tests/cases/console/libs/tasks/view.test.php index 15d99a8..93551df 100755 --- a/cake/tests/cases/console/libs/tasks/view.test.php +++ b/cake/tests/cases/console/libs/tasks/view.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks @@ -260,6 +260,7 @@ function startTest() { $this->Task->Template =& new TemplateTask($this->Dispatcher); $this->Task->Controller =& new ViewTaskMockControllerTask(); $this->Task->Project =& new ViewTaskMockProjectTask(); + $this->Task->DbConfig =& new ViewTaskMockProjectTask(); $this->Task->path = TMP; $this->Task->Template->params['theme'] = 'default'; diff --git a/cake/tests/cases/dispatcher.test.php b/cake/tests/cases/dispatcher.test.php index 354ddbe..461a156 100755 --- a/cake/tests/cases/dispatcher.test.php +++ b/cake/tests/cases/dispatcher.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases @@ -1207,6 +1207,31 @@ function testBaseUrlAndWebrootWithBaseUrl() { $this->assertEqual($expectedWebroot, $Dispatcher->webroot); } +/** + * Check that a sub-directory containing app|webroot doesn't get mishandled when re-writing is off. + * + * @return void + */ + function testBaseUrlWithAppAndWebrootInDirname() { + Configure::write('App.baseUrl', '/approval/index.php'); + $_SERVER['DOCUMENT_ROOT'] = '/Users/markstory/Sites/'; + $_SERVER['SCRIPT_FILENAME'] = '/Users/markstory/Sites/approval/index.php'; + $Dispatcher =& new Dispatcher(); + $result = $Dispatcher->baseUrl(); + + $this->assertEqual('/approval/index.php', $result); + $this->assertEqual('/approval/app/webroot/', $Dispatcher->webroot); + + Configure::write('App.baseUrl', '/webrootable/index.php'); + $_SERVER['DOCUMENT_ROOT'] = '/Users/markstory/Sites/'; + $_SERVER['SCRIPT_FILENAME'] = '/Users/markstory/Sites/webrootable/index.php'; + $Dispatcher =& new Dispatcher(); + $result = $Dispatcher->baseUrl(); + + $this->assertEqual('/webrootable/index.php', $result); + $this->assertEqual('/webrootable/app/webroot/', $Dispatcher->webroot); + } + /** * test baseUrl with no rewrite and using the top level index.php. * diff --git a/cake/tests/cases/libs/cache.test.php b/cake/tests/cases/libs/cache.test.php index 2a6d53d..b087618 100755 --- a/cake/tests/cases/libs/cache.test.php +++ b/cake/tests/cases/libs/cache.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/cache/apc.test.php b/cake/tests/cases/libs/cache/apc.test.php index baeee56..8379130 100755 --- a/cake/tests/cases/libs/cache/apc.test.php +++ b/cake/tests/cases/libs/cache/apc.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache diff --git a/cake/tests/cases/libs/cache/file.test.php b/cake/tests/cases/libs/cache/file.test.php index 6259d60..d58700a 100755 --- a/cake/tests/cases/libs/cache/file.test.php +++ b/cake/tests/cases/libs/cache/file.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache diff --git a/cake/tests/cases/libs/cache/memcache.test.php b/cake/tests/cases/libs/cache/memcache.test.php index c43d8ac..70e882d 100755 --- a/cake/tests/cases/libs/cache/memcache.test.php +++ b/cake/tests/cases/libs/cache/memcache.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache @@ -187,6 +187,17 @@ function testParseServerStringNonLatin() { $this->assertEqual($result, array('sülül', '1111')); } +/** + * test unix sockets. + * + * @return void + */ + function testParseServerStringUnix() { + $Memcache =& new TestMemcacheEngine(); + $result = $Memcache->parseServerString('unix:///path/to/memcached.sock'); + $this->assertEqual($result, array('unix:///path/to/memcached.sock', 0)); + } + /** * testReadAndWriteCache method * diff --git a/cake/tests/cases/libs/cache/xcache.test.php b/cake/tests/cases/libs/cache/xcache.test.php index 8791c2e..c7fc47a 100755 --- a/cake/tests/cases/libs/cache/xcache.test.php +++ b/cake/tests/cases/libs/cache/xcache.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache diff --git a/cake/tests/cases/libs/cake_log.test.php b/cake/tests/cases/libs/cake_log.test.php index 09004b8..0613005 100755 --- a/cake/tests/cases/libs/cake_log.test.php +++ b/cake/tests/cases/libs/cake_log.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -166,7 +166,7 @@ function testLogFileWriting() { */ function testLoggingWithErrorHandling() { @unlink(LOGS . 'debug.log'); - Configure::write('log', E_ALL & ~E_DEPRECATED); + Configure::write('log', E_ALL & ~E_DEPRECATED & ~E_STRICT); Configure::write('debug', 0); set_error_handler(array('CakeLog', 'handleError')); diff --git a/cake/tests/cases/libs/cake_session.test.php b/cake/tests/cases/libs/cake_session.test.php index 3079bed..edf92dd 100755 --- a/cake/tests/cases/libs/cake_session.test.php +++ b/cake/tests/cases/libs/cake_session.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/cake_socket.test.php b/cake/tests/cases/libs/cake_socket.test.php index 2750155..2a242b3 100755 --- a/cake/tests/cases/libs/cake_socket.test.php +++ b/cake/tests/cases/libs/cake_socket.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/cake_test_case.test.php b/cake/tests/cases/libs/cake_test_case.test.php index fd94c4f..409a31a 100755 --- a/cake/tests/cases/libs/cake_test_case.test.php +++ b/cake/tests/cases/libs/cake_test_case.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs. diff --git a/cake/tests/cases/libs/cake_test_fixture.test.php b/cake/tests/cases/libs/cake_test_fixture.test.php index 1931664..92e6916 100755 --- a/cake/tests/cases/libs/cake_test_fixture.test.php +++ b/cake/tests/cases/libs/cake_test_fixture.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/tests/cases/libs/class_registry.test.php b/cake/tests/cases/libs/class_registry.test.php index dc156d1..47253d8 100755 --- a/cake/tests/cases/libs/class_registry.test.php +++ b/cake/tests/cases/libs/class_registry.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/code_coverage_manager.test.php b/cake/tests/cases/libs/code_coverage_manager.test.php index af4572f..e064c8f 100755 --- a/cake/tests/cases/libs/code_coverage_manager.test.php +++ b/cake/tests/cases/libs/code_coverage_manager.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -474,7 +474,7 @@ function testGetExecutableLines() { } ?> - - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -149,7 +149,7 @@ function testSetErrorReportingLevel() { Configure::write('debug', 2); $result = ini_get('error_reporting'); - $this->assertEqual($result, E_ALL & ~E_DEPRECATED); + $this->assertEqual($result, E_ALL & ~E_DEPRECATED & ~E_STRICT); $result = ini_get('display_errors'); $this->assertEqual($result, 1); @@ -177,7 +177,7 @@ function testInteractionOfDebugAndLog() { $this->assertEqual(ini_get('display_errors'), 0); Configure::write('debug', 2); - $this->assertEqual(ini_get('error_reporting'), E_ALL & ~E_DEPRECATED); + $this->assertEqual(ini_get('error_reporting'), E_ALL & ~E_DEPRECATED & ~E_STRICT); $this->assertEqual(ini_get('display_errors'), 1); Configure::write('debug', 0); diff --git a/cake/tests/cases/libs/controller/component.test.php b/cake/tests/cases/libs/controller/component.test.php index fc1f5ad..a8bf372 100755 --- a/cake/tests/cases/libs/controller/component.test.php +++ b/cake/tests/cases/libs/controller/component.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller @@ -227,6 +227,14 @@ class BananaComponent extends Object { */ var $testField = 'BananaField'; +/** + * components property + * + * @var array + * @access public + */ + var $components = array('Apple'); + /** * startup method * diff --git a/cake/tests/cases/libs/controller/components/acl.test.php b/cake/tests/cases/libs/controller/components/acl.test.php index ea79355..2ef26ab 100755 --- a/cake/tests/cases/libs/controller/components/acl.test.php +++ b/cake/tests/cases/libs/controller/components/acl.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components diff --git a/cake/tests/cases/libs/controller/components/auth.test.php b/cake/tests/cases/libs/controller/components/auth.test.php index 93c5de2..b876dfb 100755 --- a/cake/tests/cases/libs/controller/components/auth.test.php +++ b/cake/tests/cases/libs/controller/components/auth.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.cases.libs.controller.components @@ -1020,17 +1020,6 @@ function testLoginRedirect() { $this->Controller->Session->delete('Auth'); - $this->Controller->params['url']['url'] = 'admin/'; - $this->Controller->Auth->initialize($this->Controller); - $this->Controller->Auth->userModel = 'AuthUser'; - $this->Controller->Auth->loginRedirect = null; - $this->Controller->Auth->startup($this->Controller); - $expected = Router::normalize('admin/'); - $this->assertTrue($this->Controller->Session->check('Message.auth')); - $this->assertEqual($expected, $this->Controller->Auth->redirect()); - - $this->Controller->Session->delete('Auth'); - //empty referer no session $_SERVER['HTTP_REFERER'] = false; $_ENV['HTTP_REFERER'] = false; diff --git a/cake/tests/cases/libs/controller/components/cookie.test.php b/cake/tests/cases/libs/controller/components/cookie.test.php index d5eca2f..9a5bba4 100755 --- a/cake/tests/cases/libs/controller/components/cookie.test.php +++ b/cake/tests/cases/libs/controller/components/cookie.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components @@ -478,6 +478,27 @@ function testDeleteChildrenNotExist() { $this->assertNull($this->Controller->Cookie->delete('Not.Found')); } +/** + * Test that 1.3 can read 2.0 format codes if json_encode exists. + * + * @return void + */ + function testForwardsCompatibility() { + if ($this->skipIf(!function_exists('json_decode'), 'no json_decode, skipping.')) { + return; + } + $_COOKIE['CakeTestCookie'] = array( + 'JSON' => '{"name":"value"}', + 'Empty' => '', + 'String' => '{"somewhat:"broken"}' + ); + $this->Controller->Cookie->startup($this->Controller); + $this->assertEqual(array('name' => 'value'), $this->Controller->Cookie->read('JSON')); + $this->assertEqual('value', $this->Controller->Cookie->read('JSON.name')); + $this->assertEqual('', $this->Controller->Cookie->read('Empty')); + $this->assertEqual('{"somewhat:"broken"}', $this->Controller->Cookie->read('String')); + } + /** * encrypt method * diff --git a/cake/tests/cases/libs/controller/components/email.test.php b/cake/tests/cases/libs/controller/components/email.test.php index f97be8e..d130dd2 100755 --- a/cake/tests/cases/libs/controller/components/email.test.php +++ b/cake/tests/cases/libs/controller/components/email.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.cases.libs.controller.components @@ -559,6 +559,7 @@ function testSendFormats() { MSGBLOC; + $this->Controller->EmailTest->sendAs = 'text'; $expect = str_replace('{CONTENTTYPE}', 'text/plain; charset=UTF-8', $message); $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message')); @@ -571,9 +572,10 @@ function testSendFormats() { // TODO: better test for format of message sent? $this->Controller->EmailTest->sendAs = 'both'; - $expect = str_replace('{CONTENTTYPE}', 'multipart/alternative; boundary="alt-"', $message); - $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message')); + $boundary = $this->Controller->EmailTest->getBoundary(); + + $expect = str_replace('{CONTENTTYPE}', 'multipart/alternative; boundary="alt-' . $boundary . '"', $message); $this->assertEqual($this->Controller->Session->read('Message.email.message'), $this->__osFix($expect)); } @@ -649,14 +651,24 @@ function testTemplates() { $this->assertEqual($this->Controller->Session->read('Message.email.message'), $this->__osFix($expect)); $this->Controller->EmailTest->sendAs = 'both'; - $expect = str_replace('{CONTENTTYPE}', 'multipart/alternative; boundary="alt-"', $header); - $expect .= '--alt-' . "\n" . 'Content-Type: text/plain; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: 7bit' . "\n\n" . $text . "\n\n"; - $expect .= '--alt-' . "\n" . 'Content-Type: text/html; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: 7bit' . "\n\n" . $html . "\n\n"; - $expect = '
' . $expect . '--alt---' . "\n\n" . '
'; - $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message')); + $boundary = $this->Controller->EmailTest->getBoundary(); + + $expect = str_replace('{CONTENTTYPE}', 'multipart/alternative; boundary="alt-' . $boundary . '"', $header); + $expect .= '--alt-' . $boundary . "\n" . 'Content-Type: text/plain; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: 7bit' . "\n\n" . $text . "\n\n"; + $expect .= '--alt-' . $boundary . "\n" . 'Content-Type: text/html; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: 7bit' . "\n\n" . $html . "\n\n"; + $expect = '
' . $expect . "--alt-$boundary--" . "\n\n" . '
'; $this->assertEqual($this->Controller->Session->read('Message.email.message'), $this->__osFix($expect)); + $this->Controller->EmailTest->reset(); + $this->Controller->EmailTest->to = 'postmaster@localhost'; + $this->Controller->EmailTest->from = 'noreply@example.com'; + $this->Controller->EmailTest->subject = 'Cake SMTP test'; + $this->Controller->EmailTest->replyTo = 'noreply@example.com'; + + $this->Controller->EmailTest->delivery = 'debug'; + $this->Controller->EmailTest->messageId = false; + $html = << @@ -674,8 +686,11 @@ function testTemplates() { HTMLBLOC; $this->Controller->EmailTest->sendAs = 'html'; - $expect = '
' . str_replace('{CONTENTTYPE}', 'text/html; charset=UTF-8', $header) . $html . '
'; $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message', 'default', 'thin')); + + $boundary = $this->Controller->EmailTest->getBoundary(); + $expect = str_replace('{CONTENTTYPE}', 'text/html; charset=UTF-8', $header) . $html; + $expect = '
' . $expect . '
'; $this->assertEqual($this->Controller->Session->read('Message.email.message'), $this->__osFix($expect)); $result = ClassRegistry::getObject('view'); @@ -962,6 +977,11 @@ function testContentStripping() { $result = $this->Controller->EmailTest->strip($content, true); $expected = $content; $this->assertEqual($result, $expected); + + $content = 'This is a test email to: you and whomever you forward it to'; + $result = $this->Controller->EmailTest->strip($content, true); + $expected = $content; + $this->assertEqual($result, $expected); } /** @@ -1161,6 +1181,7 @@ function testReset() { $this->assertIdentical($this->Controller->EmailTest->attachments, array()); $this->assertNull($this->Controller->EmailTest->textMessage); $this->assertTrue($this->Controller->EmailTest->messageId); + $this->assertEqual('mail', $this->Controller->EmailTest->delivery); } function testPluginCustomViewClass() { @@ -1211,7 +1232,7 @@ function testMessageId() { $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message')); $result = $this->Controller->Session->read('Message.email.message'); - $this->assertPattern('/Message-ID: \<[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}@' . env('HTTP_HOST') . '\>\n/', $result); + $this->assertPattern('/Message-ID: \<[a-f0-9]{32}@' . env('HTTP_HOST') . '\>\n/', $result); $this->Controller->EmailTest->messageId = '<22091985.998877@localhost>'; @@ -1299,7 +1320,7 @@ function testFormatAddressAliases() { function testFormatAddressMultibyte() { $this->Controller->EmailTest->charset = 'UTF-8'; $result = $this->Controller->EmailTest->formatAddress('ÄÖÜTest '); - $this->assertEqual($result, '=?UTF-8?B?w4TDlsOcVGVzdCA=?= '); + $this->assertEqual($result, '=?UTF-8?B?w4TDlsOcVGVzdA==?= '); $result = $this->Controller->EmailTest->formatAddress('ÄÖÜTest'); $this->assertEqual($result, '=?UTF-8?B?w4TDlsOcVGVzdA==?= '); diff --git a/cake/tests/cases/libs/controller/components/request_handler.test.php b/cake/tests/cases/libs/controller/components/request_handler.test.php index ce8d7a2..cc10322 100755 --- a/cake/tests/cases/libs/controller/components/request_handler.test.php +++ b/cake/tests/cases/libs/controller/components/request_handler.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components @@ -469,7 +469,10 @@ function testRequestContentTypes() { $this->_init(); $this->assertTrue($this->RequestHandler->isWap()); - $_SERVER['HTTP_ACCEPT'] = 'application/rss+xml,text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,*/*'; + $_SERVER['HTTP_ACCEPT'] = 'application/rss+xml ;q=0.9 , text/xml, application/xml,application/xhtml+xml'; + $this->_init(); + $this->assertFalse($this->RequestHandler->isAtom()); + $this->assertTrue($this->RequestHandler->isRSS()); } /** diff --git a/cake/tests/cases/libs/controller/components/security.test.php b/cake/tests/cases/libs/controller/components/security.test.php index a4204c9..1870597 100755 --- a/cake/tests/cases/libs/controller/components/security.test.php +++ b/cake/tests/cases/libs/controller/components/security.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components @@ -582,6 +582,25 @@ function testValidatePost() { $this->assertTrue($this->Controller->Security->validatePost($this->Controller)); } +/** + * Test that validatePost fails if you are missing the session information. + * + * @return void + */ + function testValidatePostNoSession() { + $this->Controller->Security->startup($this->Controller); + $this->Controller->Session->delete('_Token'); + + $key = $this->Controller->params['_Token']['key']; + $fields = 'a5475372b40f6e3ccbf9f8af191f20e1642fd877%3AModel.valid'; + + $this->Controller->data = array( + 'Model' => array('username' => 'nate', 'password' => 'foo', 'valid' => '0'), + '_Token' => compact('key', 'fields') + ); + $this->assertFalse($this->Controller->Security->validatePost($this->Controller)); + } + /** * test that validatePost fails if any of its required fields are missing. * diff --git a/cake/tests/cases/libs/controller/components/session.test.php b/cake/tests/cases/libs/controller/components/session.test.php index 2e33046..ada4152 100755 --- a/cake/tests/cases/libs/controller/components/session.test.php +++ b/cake/tests/cases/libs/controller/components/session.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components diff --git a/cake/tests/cases/libs/controller/controller.test.php b/cake/tests/cases/libs/controller/controller.test.php index e7adb46..411a022 100755 --- a/cake/tests/cases/libs/controller/controller.test.php +++ b/cake/tests/cases/libs/controller/controller.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.libs.controller @@ -832,6 +832,36 @@ function testPaginateOrderVirtualField() { $this->assertEqual(Set::extract($result, '{n}.ControllerPost.offset_test'), array(2, 3, 4)); } +/** + * test paginate() and virtualField overlapping with real fields. + * + * @return void + */ + function testPaginateOrderVirtualFieldSharedWithRealField() { + $Controller =& new Controller(); + $Controller->uses = array('ControllerPost', 'ControllerComment'); + $Controller->params['url'] = array(); + $Controller->constructClasses(); + $Controller->ControllerComment->virtualFields = array( + 'title' => 'ControllerComment.comment' + ); + $Controller->ControllerComment->bindModel(array( + 'belongsTo' => array( + 'ControllerPost' => array( + 'className' => 'ControllerPost', + 'foreignKey' => 'article_id' + ) + ) + ), false); + + $Controller->paginate = array( + 'fields' => array('ControllerComment.id', 'title', 'ControllerPost.title'), + ); + $Controller->passedArgs = array('sort' => 'ControllerPost.title', 'dir' => 'asc'); + $result = $Controller->paginate('ControllerComment'); + $this->assertEqual(Set::extract($result, '{n}.ControllerComment.id'), array(1, 2, 3, 4, 5, 6)); + } + /** * testFlash method * @@ -1495,4 +1525,22 @@ function testShutdownProcess() { $MockedController->MockTest->expectCallCount('shutdown', 1); $MockedController->shutdownProcess(); } + +/** + * Tests that the correct alias is selected + * + * @return void + */ + function testValidateSortAlias() { + $Controller =& new Controller(); + $Controller->uses = array('ControllerPost', 'ControllerComment'); + $Controller->passedArgs[] = '1'; + $Controller->params['url'] = array(); + $Controller->constructClasses(); + $Controller->passedArgs = array('sort' => 'Derp.id', 'direction' => 'asc'); + $results = Set::extract($Controller->paginate('ControllerPost'), '{n}.ControllerPost.id'); + $this->assertEqual($Controller->params['paging']['ControllerPost']['page'], 1); + $this->assertEqual($results, array(1, 2, 3)); + } + } diff --git a/cake/tests/cases/libs/controller/controller_merge_vars.test.php b/cake/tests/cases/libs/controller/controller_merge_vars.test.php index 5bc69bf..ca71d5b 100755 --- a/cake/tests/cases/libs/controller/controller_merge_vars.test.php +++ b/cake/tests/cases/libs/controller/controller_merge_vars.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller diff --git a/cake/tests/cases/libs/controller/pages_controller.test.php b/cake/tests/cases/libs/controller/pages_controller.test.php index 4602a9e..7732870 100755 --- a/cake/tests/cases/libs/controller/pages_controller.test.php +++ b/cake/tests/cases/libs/controller/pages_controller.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller diff --git a/cake/tests/cases/libs/controller/scaffold.test.php b/cake/tests/cases/libs/controller/scaffold.test.php index a7de6c1..c4f3664 100755 --- a/cake/tests/cases/libs/controller/scaffold.test.php +++ b/cake/tests/cases/libs/controller/scaffold.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller @@ -509,7 +509,7 @@ function testEditScaffold() { new Scaffold($this->Controller, $params); $result = ob_get_clean(); - $this->assertPattern('/
assertPattern('/assertPattern('/Edit Scaffold Mock<\/legend>/', $result); $this->assertPattern('/input type="hidden" name="data\[ScaffoldMock\]\[id\]" value="1" id="ScaffoldMockId"/', $result); @@ -770,9 +770,6 @@ function testScaffoldVariableSetting() { $this->assertEqual($result['pluralVar'], 'scaffoldMock'); $this->assertEqual($result['scaffoldFields'], array('id', 'user_id', 'title', 'body', 'published', 'created', 'updated')); } - function getTests() { - return array('start', 'startCase', 'testScaffoldChangingViewProperty', 'endCase', 'end'); - } /** * test that Scaffold overrides the view property even if its set to 'Theme' diff --git a/cake/tests/cases/libs/debugger.test.php b/cake/tests/cases/libs/debugger.test.php index e2a22e9..77db2df 100755 --- a/cake/tests/cases/libs/debugger.test.php +++ b/cake/tests/cases/libs/debugger.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/error.test.php b/cake/tests/cases/libs/error.test.php index 9e16029..204d932 100755 --- a/cake/tests/cases/libs/error.test.php +++ b/cake/tests/cases/libs/error.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/file.test.php b/cake/tests/cases/libs/file.test.php index 6e904f9..9decfaa 100755 --- a/cake/tests/cases/libs/file.test.php +++ b/cake/tests/cases/libs/file.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -395,7 +395,7 @@ function testAppend() { function testDelete() { if (!$tmpFile = $this->_getTmpFile()) { return false; - }; + } if (!file_exists($tmpFile)) { touch($tmpFile); @@ -411,6 +411,24 @@ function testDelete() { $this->assertFalse($result); } +/** + * Windows has issues unlinking files if there are + * active filehandles open. + * + * @return void + */ + function testDeleteAfterRead() { + if (!$tmpFile = $this->_getTmpFile()) { + return false; + } + if (!file_exists($tmpFile)) { + touch($tmpFile); + } + $file =& new File($tmpFile); + $file->read(); + $this->assertTrue($file->delete()); + } + /** * testCopy method * diff --git a/cake/tests/cases/libs/folder.test.php b/cake/tests/cases/libs/folder.test.php index 9dc2bf1..156fb00 100755 --- a/cake/tests/cases/libs/folder.test.php +++ b/cake/tests/cases/libs/folder.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/http_socket.test.php b/cake/tests/cases/libs/http_socket.test.php index f4e8131..8f422cf 100755 --- a/cake/tests/cases/libs/http_socket.test.php +++ b/cake/tests/cases/libs/http_socket.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/i18n.test.php b/cake/tests/cases/libs/i18n.test.php index 4c89725..779a1d3 100755 --- a/cake/tests/cases/libs/i18n.test.php +++ b/cake/tests/cases/libs/i18n.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/inflector.test.php b/cake/tests/cases/libs/inflector.test.php index 39e61cf..fbbc86f 100755 --- a/cake/tests/cases/libs/inflector.test.php +++ b/cake/tests/cases/libs/inflector.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing * @package cake.tests * @subpackage cake.tests.cases.libs @@ -78,6 +78,7 @@ function testInflectingSingulars() { $this->assertEqual(Inflector::singularize('Aliases'), 'Alias'); $this->assertEqual(Inflector::singularize('Alias'), 'Alias'); $this->assertEqual(Inflector::singularize('Media'), 'Media'); + $this->assertEqual(Inflector::singularize('NodeMedia'), 'NodeMedia'); $this->assertEqual(Inflector::singularize('alumni'), 'alumnus'); $this->assertEqual(Inflector::singularize('bacilli'), 'bacillus'); $this->assertEqual(Inflector::singularize('cacti'), 'cactus'); @@ -116,6 +117,10 @@ function testInflectingSingulars() { $this->assertEqual(Inflector::singularize('bases'), 'basis'); $this->assertEqual(Inflector::singularize('analyses'), 'analysis'); $this->assertEqual(Inflector::singularize('curves'), 'curve'); + $this->assertEqual(Inflector::singularize('cafes'), 'cafe'); + $this->assertEqual(Inflector::singularize('roofs'), 'roof'); + $this->assertEqual(Inflector::singularize('foes'), 'foe'); + $this->assertEqual(Inflector::singularize('databases'), 'database'); $this->assertEqual(Inflector::singularize(''), ''); } @@ -145,6 +150,7 @@ function testInflectingPlurals() { $this->assertEqual(Inflector::pluralize('Alias'), 'Aliases'); $this->assertEqual(Inflector::pluralize('Aliases'), 'Aliases'); $this->assertEqual(Inflector::pluralize('Media'), 'Media'); + $this->assertEqual(Inflector::pluralize('NodeMedia'), 'NodeMedia'); $this->assertEqual(Inflector::pluralize('alumnus'), 'alumni'); $this->assertEqual(Inflector::pluralize('bacillus'), 'bacilli'); $this->assertEqual(Inflector::pluralize('cactus'), 'cacti'); @@ -164,6 +170,10 @@ function testInflectingPlurals() { $this->assertEqual(Inflector::pluralize('tax'), 'taxes'); $this->assertEqual(Inflector::pluralize('wave'), 'waves'); $this->assertEqual(Inflector::pluralize('bureau'), 'bureaus'); + $this->assertEqual(Inflector::pluralize('cafe'), 'cafes'); + $this->assertEqual(Inflector::pluralize('roof'), 'roofs'); + $this->assertEqual(Inflector::pluralize('foe'), 'foes'); + $this->assertEqual(Inflector::pluralize('database'), 'databases'); $this->assertEqual(Inflector::pluralize(''), ''); } @@ -430,9 +440,11 @@ function testRulesClearsCaches() { $this->assertEqual(Inflector::singularize('Bananas'), 'Banazzz', 'Was inflected with old rules. %s'); Inflector::rules('plural', array( - 'rules' => array('/(.*)na$/i' => '\1zzz') + 'rules' => array('/(.*)na$/i' => '\1zzz'), + 'irregular' => array('corpus' => 'corpora') )); - $this->assertEqual(Inflector::pluralize('Banana'), 'Banazzz', 'Was inflected with old rules. %s'); + $this->assertEqual(Inflector::pluralize('Banana'), 'Banazzz', 'Was inflected with old rules: %s'); + $this->assertEqual(Inflector::pluralize('corpus'), 'corpora', 'Was inflected with old irregular form: %s'); } /** diff --git a/cake/tests/cases/libs/l10n.test.php b/cake/tests/cases/libs/l10n.test.php index 7ba1eb3..2709387 100755 --- a/cake/tests/cases/libs/l10n.test.php +++ b/cake/tests/cases/libs/l10n.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/log/file_log.test.php b/cake/tests/cases/libs/log/file_log.test.php index 94f9657..55642ee 100755 --- a/cake/tests/cases/libs/log/file_log.test.php +++ b/cake/tests/cases/libs/log/file_log.test.php @@ -5,13 +5,13 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @filesource - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.log diff --git a/cake/tests/cases/libs/magic_db.test.php b/cake/tests/cases/libs/magic_db.test.php index d6cf147..4b01ef6 100755 --- a/cake/tests/cases/libs/magic_db.test.php +++ b/cake/tests/cases/libs/magic_db.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/tests/cases/libs/model/behaviors/acl.test.php b/cake/tests/cases/libs/model/behaviors/acl.test.php index bd0d2d3..fec30fc 100755 --- a/cake/tests/cases/libs/model/behaviors/acl.test.php +++ b/cake/tests/cases/libs/model/behaviors/acl.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.tests.model.behaviors.acl diff --git a/cake/tests/cases/libs/model/behaviors/containable.test.php b/cake/tests/cases/libs/model/behaviors/containable.test.php index bfa5a26..4be6cbc 100755 --- a/cake/tests/cases/libs/model/behaviors/containable.test.php +++ b/cake/tests/cases/libs/model/behaviors/containable.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.behaviors @@ -36,7 +36,7 @@ class ContainableBehaviorTest extends CakeTestCase { */ var $fixtures = array( 'core.article', 'core.article_featured', 'core.article_featureds_tags', 'core.articles_tag', 'core.attachment', 'core.category', - 'core.comment', 'core.featured', 'core.tag', 'core.user' + 'core.comment', 'core.featured', 'core.tag', 'core.user', 'core.join_a', 'core.join_b', 'core.join_c', 'core.join_a_c', 'core.join_a_b' ); /** @@ -244,6 +244,20 @@ function testContain() { $this->assertFalse(Set::matches('/Comment/User', $r)); } +/** + * Test that mixing contain() and the contain find option. + * + * @access public + * @return void + */ + function testContainAndContainOption() { + $this->Article->contain(); + $r = $this->Article->find('all', array( + 'contain' => array('Comment') + )); + $this->assertTrue(isset($r[0]['Comment']), 'No comment returned'); + } + /** * testFindEmbeddedNoBindings method * @@ -3406,6 +3420,21 @@ function testResetAddedAssociation() { $this->assertEqual($expected, array_keys($result)); $this->assertTrue(empty($this->Article->hasMany['ArticlesTag'])); + + $this->JoinA =& ClassRegistry::init('JoinA'); + $this->JoinB =& ClassRegistry::init('JoinB'); + $this->JoinC =& ClassRegistry::init('JoinC'); + + $this->JoinA->Behaviors->attach('Containable'); + $this->JoinB->Behaviors->attach('Containable'); + $this->JoinC->Behaviors->attach('Containable'); + + $this->JoinA->JoinB->find('all', array('contain' => array('JoinA'))); + $this->JoinA->bindModel(array('hasOne' => array('JoinAsJoinC' => array('joinTable' => 'as_cs'))), false); + $result = $this->JoinA->hasOne; + $this->JoinA->find('all'); + $resultAfter = $this->JoinA->hasOne; + $this->assertEqual($result, $resultAfter); } /** @@ -3593,6 +3622,41 @@ function testResetMultipleHabtmAssociations() { $this->assertEqual($expected, $this->Article->hasAndBelongsToMany); } +/** + * test that bindModel and unbindModel work with find() calls in between. + */ + function testBindMultipleTimesWithFind() { + $binding = array( + 'hasOne' => array( + 'ArticlesTag' => array( + 'foreignKey' => false, + 'type' => 'INNER', + 'conditions' => array( + 'ArticlesTag.article_id = Article.id' + ) + ), + 'Tag' => array( + 'type' => 'INNER', + 'foreignKey' => false, + 'conditions' => array( + 'ArticlesTag.tag_id = Tag.id' + ) + ) + ) + ); + $this->Article->unbindModel(array('hasAndBelongsToMany' => array('Tag'))); + $this->Article->bindModel($binding); + $result = $this->Article->find('all', array('limit' => 1, 'contain' => array('ArticlesTag', 'Tag'))); + + $this->Article->unbindModel(array('hasAndBelongsToMany' => array('Tag'))); + $this->Article->bindModel($binding); + $result = $this->Article->find('all', array('limit' => 1, 'contain' => array('ArticlesTag', 'Tag'))); + + $associated = $this->Article->getAssociated(); + $this->assertEqual('hasAndBelongsToMany', $associated['Tag']); + $this->assertFalse(isset($associated['ArticleTag'])); + } + /** * test that autoFields doesn't splice in fields from other databases. * diff --git a/cake/tests/cases/libs/model/behaviors/translate.test.php b/cake/tests/cases/libs/model/behaviors/translate.test.php index 957f3b8..08bf210 100755 --- a/cake/tests/cases/libs/model/behaviors/translate.test.php +++ b/cake/tests/cases/libs/model/behaviors/translate.test.php @@ -5,21 +5,18 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.behaviors * @since CakePHP(tm) v 1.2.0.5669 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ -if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { - define('CAKEPHP_UNIT_TEST_EXECUTION', 1); -} App::import('Core', array('AppModel', 'Model')); require_once(dirname(dirname(__FILE__)) . DS . 'models.php'); @@ -62,6 +59,24 @@ function endTest() { ClassRegistry::flush(); } +/** + * Test that count queries with conditions get the correct joins + * + * @return void + */ + function testCountWithConditions() { + $this->loadFixtures('Translate', 'TranslatedItem'); + + $Model =& new TranslatedItem(); + $Model->locale = 'eng'; + $result = $Model->find('count', array( + 'conditions' => array( + 'I18n__content.locale' => 'eng' + ) + )); + $this->assertEqual(3, $result); + } + /** * testTranslateModel method * @@ -106,8 +121,12 @@ function testLocaleFalsePlain() { $TestModel->locale = false; $result = $TestModel->read(null, 1); - $expected = array('TranslatedItem' => array('id' => 1, 'slug' => 'first_translated')); - $this->assertEqual($result, $expected); + $expected = array('TranslatedItem' => array( + 'id' => 1, + 'slug' => 'first_translated', + 'translated_article_id' => 1, + )); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('fields' => array('slug'))); $expected = array( @@ -135,7 +154,7 @@ function testLocaleFalseAssociations() { $result = $TestModel->read(null, 1); $expected = array( - 'TranslatedItem' => array('id' => 1, 'slug' => 'first_translated'), + 'TranslatedItem' => array('id' => 1, 'slug' => 'first_translated', 'translated_article_id' => 1), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title #1'), array('id' => 3, 'locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Titel #1'), @@ -191,7 +210,8 @@ function testLocaleSingle() { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ); $this->assertEqual($result, $expected); @@ -204,7 +224,8 @@ function testLocaleSingle() { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ), array( @@ -213,7 +234,8 @@ function testLocaleSingle() { 'slug' => 'second_translated', 'locale' => 'eng', 'title' => 'Title #2', - 'content' => 'Content #2' + 'content' => 'Content #2', + 'translated_article_id' => 1, ) ), array( @@ -222,7 +244,8 @@ function testLocaleSingle() { 'slug' => 'third_translated', 'locale' => 'eng', 'title' => 'Title #3', - 'content' => 'Content #3' + 'content' => 'Content #3', + 'translated_article_id' => 1, ) ) ); @@ -248,7 +271,8 @@ function testLocaleSingleWithConditions() { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ) ); @@ -262,7 +286,8 @@ function testLocaleSingleWithConditions() { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ) ); @@ -291,7 +316,8 @@ function testLocaleSingleAssociations() { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title #1'), @@ -312,17 +338,29 @@ function testLocaleSingleAssociations() { $result = $TestModel->find('all', array('fields' => array('TranslatedItem.title'))); $expected = array( array( - 'TranslatedItem' => array('id' => 1, 'locale' => 'eng', 'title' => 'Title #1'), + 'TranslatedItem' => array( + 'id' => 1, + 'locale' => 'eng', + 'title' => 'Title #1', + ), 'Title' => array(array('foreign_key' => 1, 'content' => 'Title #1')), 'Content' => array(array('foreign_key' => 1, 'content' => 'Content #1')) ), array( - 'TranslatedItem' => array('id' => 2, 'locale' => 'eng', 'title' => 'Title #2'), + 'TranslatedItem' => array( + 'id' => 2, + 'locale' => 'eng', + 'title' => 'Title #2', + ), 'Title' => array(array('foreign_key' => 2, 'content' => 'Title #2')), 'Content' => array(array('foreign_key' => 2, 'content' => 'Content #2')) ), array( - 'TranslatedItem' => array('id' => 3, 'locale' => 'eng', 'title' => 'Title #3'), + 'TranslatedItem' => array( + 'id' => 3, + 'locale' => 'eng', + 'title' => 'Title #3', + ), 'Title' => array(array('foreign_key' => 3, 'content' => 'Title #3')), 'Content' => array(array('foreign_key' => 3, 'content' => 'Content #3')) ) @@ -356,10 +394,11 @@ function testLocaleMultiple() { $expected = array( 'TranslatedItem' => array( 'id' => 1, + 'translated_article_id' => 1, 'slug' => 'first_translated', 'locale' => 'deu', 'title' => 'Titulek #1', - 'content' => 'Content #1' + 'content' => 'Content #1', ) ); $this->assertEqual($result, $expected); @@ -370,8 +409,8 @@ function testLocaleMultiple() { 'TranslatedItem' => array( 'slug' => 'first_translated', 'locale' => 'deu', + 'content' => 'Content #1', 'title' => 'Titulek #1', - 'content' => 'Content #1' ) ), array( @@ -379,7 +418,7 @@ function testLocaleMultiple() { 'slug' => 'second_translated', 'locale' => 'deu', 'title' => 'Title #2', - 'content' => 'Obsah #2' + 'content' => 'Obsah #2', ) ), array( @@ -387,7 +426,7 @@ function testLocaleMultiple() { 'slug' => 'third_translated', 'locale' => 'deu', 'title' => '', - 'content' => 'Content #3' + 'content' => 'Content #3', ) ) ); @@ -416,7 +455,8 @@ function testMissingTranslation() { 'slug' => 'first_translated', 'locale' => 'rus', 'title' => '', - 'content' => '' + 'content' => '', + 'translated_article_id' => 1, ) ); $this->assertEqual($result, $expected); @@ -503,7 +543,12 @@ function testSaveCreate() { $TestModel =& new TranslatedItem(); $TestModel->locale = 'spa'; - $data = array('slug' => 'fourth_translated', 'title' => 'Leyenda #4', 'content' => 'Contenido #4'); + $data = array( + 'slug' => 'fourth_translated', + 'title' => 'Leyenda #4', + 'content' => 'Contenido #4', + 'translated_article_id' => null + ); $TestModel->create($data); $TestModel->save(); $result = $TestModel->read(); @@ -522,7 +567,7 @@ function testSaveUpdate() { $TestModel =& new TranslatedItem(); $TestModel->locale = 'spa'; - $oldData = array('slug' => 'fourth_translated', 'title' => 'Leyenda #4'); + $oldData = array('slug' => 'fourth_translated', 'title' => 'Leyenda #4', 'translated_article_id' => 1); $TestModel->create($oldData); $TestModel->save(); $id = $TestModel->id; @@ -560,7 +605,14 @@ function testMultipleCreate() { $result = $TestModel->read(); $expected = array( - 'TranslatedItem' => array('id' => 4, 'slug' => 'new_translated', 'locale' => 'eng', 'title' => 'New title', 'content' => 'New content'), + 'TranslatedItem' => array( + 'id' => 4, + 'slug' => 'new_translated', + 'locale' => 'eng', + 'title' => 'New title', + 'content' => 'New content', + 'translated_article_id' => null, + ), 'Title' => array( array('id' => 21, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 4, 'field' => 'title', 'content' => 'New title'), array('id' => 22, 'locale' => 'spa', 'model' => 'TranslatedItem', 'foreign_key' => 4, 'field' => 'title', 'content' => 'Nuevo leyenda') @@ -598,7 +650,14 @@ function testMultipleUpdate() { $TestModel->bindTranslation($translations, false); $result = $TestModel->read(null, 1); $expected = array( - 'TranslatedItem' => array('id' => '1', 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'New Title #1', 'content' => 'New Content #1'), + 'TranslatedItem' => array( + 'id' => '1', + 'slug' => 'first_translated', + 'locale' => 'eng', + 'title' => 'New Title #1', + 'content' => 'New Content #1', + 'translated_article_id' => 1, + ), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'New Title #1'), array('id' => 3, 'locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Neue Titel #1'), @@ -640,7 +699,14 @@ function testMixedCreateUpdateWithArrayLocale() { $TestModel->bindTranslation($translations, false); $result = $TestModel->read(null, 1); $expected = array( - 'TranslatedItem' => array('id' => 1, 'slug' => 'first_translated', 'locale' => 'cze', 'title' => 'Titulek #1', 'content' => 'Upraveny obsah #1'), + 'TranslatedItem' => array( + 'id' => 1, + 'slug' => 'first_translated', + 'locale' => 'cze', + 'title' => 'Titulek #1', + 'content' => 'Upraveny obsah #1', + 'translated_article_id' => 1, + ), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Updated Title #1'), array('id' => 3, 'locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Titel #1'), @@ -656,6 +722,46 @@ function testMixedCreateUpdateWithArrayLocale() { $this->assertEqual($result, $expected); } +/** + * Test that saveAll() works with hasMany associations that contain + * translations. + * + * @return void + */ + public function testSaveAllTranslatedAssociations() { + $this->loadFixtures('Translate', 'TranslateArticle', 'TranslatedItem', 'TranslatedArticle', 'User'); + $Model = new TranslatedArticle(); + $Model->locale = 'eng'; + + $data = array( + 'TranslatedArticle' => array( + 'user_id' => 1, + 'published' => 'Y', + 'title' => 'Title (eng) #1', + 'body' => 'Body (eng) #1' + ), + 'TranslatedItem' => array( + array( + 'title' => 'Nuevo leyenda #1', + 'content' => 'Upraveny obsah #1' + ), + array( + 'title' => 'New Title #2', + 'content' => 'New Content #2' + ), + ) + ); + $result = $Model->saveAll($data); + $this->assertTrue($result); + + $result = $Model->TranslatedItem->find('all', array( + 'conditions' => array('translated_article_id' => $Model->id) + )); + $this->assertEqual(2, count($result)); + $this->assertEqual($data['TranslatedItem'][0]['title'], $result[0]['TranslatedItem']['title']); + $this->assertEqual($data['TranslatedItem'][1]['title'], $result[1]['TranslatedItem']['title']); + } + /** * testValidation method * @@ -668,11 +774,13 @@ function testValidation() { $TestModel =& new TranslatedItem(); $TestModel->locale = 'eng'; $TestModel->validate['title'] = '/Only this title/'; - $data = array('TranslatedItem' => array( - 'id' => 1, - 'title' => array('eng' => 'New Title #1', 'deu' => 'Neue Titel #1', 'cze' => 'Novy Titulek #1'), - 'content' => array('eng' => 'New Content #1', 'deu' => 'Neue Inhalt #1', 'cze' => 'Novy Obsah #1') - )); + $data = array( + 'TranslatedItem' => array( + 'id' => 1, + 'title' => array('eng' => 'New Title #1', 'deu' => 'Neue Titel #1', 'cze' => 'Novy Titulek #1'), + 'content' => array('eng' => 'New Content #1', 'deu' => 'Neue Inhalt #1', 'cze' => 'Novy Obsah #1') + ) + ); $TestModel->create(); $this->assertFalse($TestModel->save($data)); $this->assertEqual($TestModel->validationErrors['title'], 'This field cannot be left blank'); @@ -757,7 +865,8 @@ function testAnotherTranslateTable() { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Another Title #1', - 'content' => 'Another Content #1' + 'content' => 'Another Content #1', + 'translated_article_id' => 1, ) ); $this->assertEqual($result, $expected); @@ -770,7 +879,7 @@ function testAnotherTranslateTable() { * @return void */ function testTranslateWithAssociations() { - $this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User', 'Comment', 'ArticlesTag', 'Tag'); + $this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'TranslatedItem', 'User', 'Comment', 'ArticlesTag', 'Tag'); $TestModel =& new TranslatedArticle(); $TestModel->locale = 'eng'; @@ -793,7 +902,24 @@ function testTranslateWithAssociations() { 'user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', - 'updated' => '2007-03-17 01:18:31' + 'updated' => '2007-03-17 01:18:31' + ), + 'TranslatedItem' => array( + array( + 'id' => 1, + 'translated_article_id' => 1, + 'slug' => 'first_translated' + ), + array( + 'id' => 2, + 'translated_article_id' => 1, + 'slug' => 'second_translated' + ), + array( + 'id' => 3, + 'translated_article_id' => 1, + 'slug' => 'third_translated' + ), ) ); $this->assertEqual($result, $expected); @@ -873,7 +999,8 @@ function testTranslateTableWithPrefix() { 'slug' => 'first_translated', 'locale' => 'eng', 'content' => 'Content #1', - 'title' => 'Title #1' + 'title' => 'Title #1', + 'translated_article_id' => 1, )); $this->assertEqual($result, $expected); } @@ -895,4 +1022,5 @@ function testUnbindTranslationInfinteLoop() { $this->assertFalse($result); } + } diff --git a/cake/tests/cases/libs/model/behaviors/tree.test.php b/cake/tests/cases/libs/model/behaviors/tree.test.php index 68e3c1d..8933aa9 100755 --- a/cake/tests/cases/libs/model/behaviors/tree.test.php +++ b/cake/tests/cases/libs/model/behaviors/tree.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.behaviors @@ -173,6 +173,57 @@ function testDetectNoneExistantParent() { $this->assertIdentical($result, true); } +/** + * testRecoverUsingParentMode method + * + * @return void + */ + public function testRecoverUsingParentMode() { + extract($this->settings); + $this->Tree = new $modelClass(); + $this->Tree->Behaviors->disable('Tree'); + + $this->Tree->save(array('parent_id' => null, 'name' => 'Main', $parentField => null, $leftField => 0, $rightField => 0)); + $node1 = $this->Tree->id; + + $this->Tree->create(false); + $this->Tree->save(array('parent_id' => null, 'name' => 'About Us', $parentField => $node1, $leftField => 0, $rightField => 0)); + $node11 = $this->Tree->id; + $this->Tree->create(false); + $this->Tree->save(array('parent_id' => null, 'name' => 'Programs', $parentField => $node1, $leftField => 0, $rightField => 0)); + $node12 = $this->Tree->id; + $this->Tree->create(false); + $this->Tree->save(array('parent_id' => null, 'name' => 'Mission and History', $parentField => $node11, $leftField => 0, $rightField => 0)); + $this->Tree->create(false); + $this->Tree->save(array('parent_id' => null, 'name' => 'Overview', $parentField => $node12, $leftField => 0, $rightField => 0)); + + $this->Tree->Behaviors->enable('Tree'); + + $result = $this->Tree->verify(); + $this->assertNotIdentical($result, false); + + $result = $this->Tree->recover(); + $this->assertTrue($result); + + $result = $this->Tree->verify(); + $this->assertTrue($result); + + $result = $this->Tree->find('first', array( + 'fields' => array('name', $parentField, $leftField, $rightField), + 'conditions' => array('name' => 'Main'), + 'recursive' => -1 + )); + $expected = array( + $modelClass => array( + 'name' => 'Main', + $parentField => null, + $leftField => 1, + $rightField => 10 + ) + ); + $this->assertEqual($expected, $result); + } + /** * testRecoverFromMissingParent method * @@ -1112,6 +1163,11 @@ function testCountChildren() { $total = $this->Tree->childCount(); $this->assertEqual($total, 6); + + $this->Tree->read(null, $data[$modelClass]['id']); + $id = $this->Tree->field('id', array($modelClass . '.name' => '1.2')); + $total = $this->Tree->childCount($id); + $this->assertEqual($total, 2); } /** diff --git a/cake/tests/cases/libs/model/cake_schema.test.php b/cake/tests/cases/libs/model/cake_schema.test.php index 65ca3ce..e44771f 100755 --- a/cake/tests/cases/libs/model/cake_schema.test.php +++ b/cake/tests/cases/libs/model/cake_schema.test.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -741,8 +741,8 @@ function testSchemaComparison() { $expected = array( 'comments' => array( 'add' => array( - 'post_id' => array('type' => 'integer', 'null' => false, 'default' => 0), - 'title' => array('type' => 'string', 'null' => false, 'length' => 100), + 'post_id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'after' => 'id'), + 'title' => array('type' => 'string', 'null' => false, 'length' => 100, 'after' => 'user_id'), ), 'drop' => array( 'article_id' => array('type' => 'integer', 'null' => false), @@ -754,7 +754,7 @@ function testSchemaComparison() { ), 'posts' => array( 'add' => array( - 'summary' => array('type' => 'text', 'null' => 1), + 'summary' => array('type' => 'text', 'null' => 1, 'after' => 'body'), ), 'drop' => array( 'tableParameters' => array(), @@ -795,11 +795,11 @@ function testSchemaComparison() { 'ratings' => array( 'add' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary'), - 'foreign_key' => array('type' => 'integer', 'null' => false, 'default' => NULL), - 'model' => array('type' => 'varchar', 'null' => false, 'default' => NULL), - 'value' => array('type' => 'float', 'null' => false, 'length' => '5,2', 'default' => NULL), - 'created' => array('type' => 'datetime', 'null' => false, 'default' => NULL), - 'modified' => array('type' => 'datetime', 'null' => false, 'default' => NULL), + 'foreign_key' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'after' => 'id'), + 'model' => array('type' => 'varchar', 'null' => false, 'default' => NULL, 'after' => 'foreign_key'), + 'value' => array('type' => 'float', 'null' => false, 'length' => '5,2', 'default' => NULL, 'after' => 'model'), + 'created' => array('type' => 'datetime', 'null' => false, 'default' => NULL, 'after' => 'value'), + 'modified' => array('type' => 'datetime', 'null' => false, 'default' => NULL, 'after' => 'created'), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)), 'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'MyISAM') ) diff --git a/cake/tests/cases/libs/model/connection_manager.test.php b/cake/tests/cases/libs/model/connection_manager.test.php index b499112..2f39d63 100755 --- a/cake/tests/cases/libs/model/connection_manager.test.php +++ b/cake/tests/cases/libs/model/connection_manager.test.php @@ -5,12 +5,12 @@ * * PHP versions 4 and 5 * - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php index e264909..efdc06b 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index d94db8e..1384746 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -239,14 +239,48 @@ function testLocalizedFloats() { setlocale(LC_ALL, 'de_DE'); $result = $this->db->value(3.141593, 'float'); - $this->assertEqual((string)$result, '3.141593'); - + $this->assertEqual('3.141593', $result); + $result = $this->db->value(3.141593); - $this->assertEqual((string)$result, '3.141593'); + $this->assertEqual('3.141593', $result); + + $result = $this->db->value(3.141593); + $this->assertEqual('3.141593', $result); + + $result = $this->db->value(1234567.11, 'float'); + $this->assertEqual('1234567.11', $result); + + $result = $this->db->value(123456.45464748, 'float'); + $this->assertEqual('123456.454647', $result); + + $result = $this->db->value(0.987654321, 'float'); + $this->assertEqual('0.987654321', (string)$result); + + $result = $this->db->value(2.2E-54, 'float'); + $this->assertEqual('2.2E-54', (string)$result); + + $result = $this->db->value(2.2E-54); + $this->assertEqual('2.2E-54', (string)$result); setlocale(LC_ALL, $restore); } +/** + * test that scientific notations are working correctly + * + * @return void + */ + function testScientificNotation() { + $result = $this->db->value(2.2E-54, 'float'); + $this->assertEqual('2.2E-54', (string)$result); + + $result = $this->db->value(2.2E-54, 'float'); + $this->assertEqual('2.2E-54', (string)$result); + + $result = $this->db->value(2.2E-54); + $this->assertEqual('2.2E-54', (string)$result); + } + /** * testTinyintCasting method * diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php index d146caa..00ab077 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php index ff184e8..3c981c2 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index 1f80ef2..14c426a 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs @@ -699,6 +699,22 @@ function testAlterSchema() { $this->assertEqual($result['title']['null'], false); $this->db->query($this->db->dropSchema($New)); + + $New =& new CakeSchema(array( + 'connection' => 'test_suite', + 'name' => 'AlterPosts', + 'alter_posts' => array( + 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), + 'author_id' => array('type' => 'integer', 'null' => false), + 'title' => array('type' => 'string', 'null' => true), + 'body' => array('type' => 'text'), + 'published' => array('type' => 'string', 'length' => 1, 'default' => 'N'), + 'created' => array('type' => 'datetime'), + 'updated' => array('type' => 'datetime'), + ) + )); + $result = $this->db->alterSchema($New->compare($Old), 'alter_posts'); + $this->assertNoPattern('/varchar\(36\) NOT NULL/i', $result); } /** @@ -798,6 +814,25 @@ function testVirtualFields() { $this->assertEqual($result['Article']['subquery'], 6); } +/** + * Test that virtual fields work with SQL constants + * + * @return void + */ + function testVirtualFieldAsAConstant() { + $this->loadFixtures('Article', 'Comment'); + $Article =& ClassRegistry::init('Article'); + $Article->virtualFields = array( + 'empty' => "NULL", + 'number' => 43, + 'truth' => 'TRUE' + ); + $result = $Article->find('first'); + $this->assertNull($result['Article']['empty']); + $this->assertTrue($result['Article']['truth']); + $this->assertIdentical('43', $result['Article']['number']); + } + /** * Tests additional order options for postgres * diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php index eb40dc9..21509f3 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs diff --git a/cake/tests/cases/libs/model/datasources/dbo_source.test.php b/cake/tests/cases/libs/model/datasources/dbo_source.test.php index 2c06d70..320d203 100755 --- a/cake/tests/cases/libs/model/datasources/dbo_source.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo_source.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.datasources @@ -1459,8 +1459,10 @@ function testGenerateAssociationQuerySelfJoin() { 'offset' => array(), 'conditions' => array(), 'order' => array(), - 'group' => null + 'group' => null, + 'callbacks' => null ); + $queryData['joins'][0]['table'] = $this->testDb->fullTableName($queryData['joins'][0]['table']); $this->assertEqual($queryData, $expected); $result = $this->testDb->generateAssociationQuery($this->Model, $null, null, null, null, $queryData, false, $null); @@ -2395,6 +2397,12 @@ function testStringConditionsParsing() { $result = $this->testDb->conditions($conditions); $expected = " WHERE `Artist`.`name` = 'JUDY AND MARY'"; $this->assertEqual($result, $expected); + + $conditions = array('Company.name similar to ' => 'a word'); + $result = $this->testDb->conditions($conditions); + $expected = " WHERE `Company`.`name` similar to 'a word'"; + $this->assertEqual($result, $expected); + } /** @@ -2548,11 +2556,11 @@ function testArrayConditionsParsing() { $this->assertEqual($result, $expected); $result = $this->testDb->conditions(array('score BETWEEN ? AND ?' => array(90.1, 95.7))); - $expected = " WHERE `score` BETWEEN 90.100000 AND 95.700000"; + $expected = " WHERE `score` BETWEEN 90.1 AND 95.7"; $this->assertEqual($result, $expected); $result = $this->testDb->conditions(array('Post.title' => 1.1)); - $expected = " WHERE `Post`.`title` = 1.100000"; + $expected = " WHERE `Post`.`title` = 1.1"; $this->assertEqual($result, $expected); $result = $this->testDb->conditions(array('Post.title' => 1.1), true, true, new Post()); @@ -2567,6 +2575,10 @@ function testArrayConditionsParsing() { $expected = " WHERE MAX(`Post`.`rating`) > '50'"; $this->assertEqual($result, $expected); + $result = $this->testDb->conditions(array('lower(Article.title)' => 'secrets')); + $expected = " WHERE lower(`Article`.`title`) = 'secrets'"; + $this->assertEqual($result, $expected); + $result = $this->testDb->conditions(array('title LIKE' => '%hello')); $expected = " WHERE `title` LIKE '%hello'"; $this->assertEqual($result, $expected); @@ -3512,7 +3524,7 @@ function testOrderParsing() { $result = $this->testDb->order(array('Property.sale_price IS NULL')); $expected = ' ORDER BY `Property`.`sale_price` IS NULL ASC'; $this->assertEqual($result, $expected); - + $result = $this->testDb->order(array('Export.column-name' => 'ASC')); $expected = ' ORDER BY `Export`.`column-name` ASC'; $this->assertEqual($result, $expected, 'Columns with -s are not working with order()'); @@ -4166,7 +4178,6 @@ function testLog() { Configure::write('debug', 2); $this->testDb->error = true; - $this->expectError(); ob_start(); $this->testDb->showQuery('Error 2'); $contents = ob_get_clean(); @@ -4239,6 +4250,25 @@ function testFetchAllBooleanReturns() { $this->assertTrue($result, 'Query did not return a boolean. %s'); } +/** + * test that query propery caches/doesn't cache selects + * + * @return void + * @author David Kullmann + */ + function testFetchAllCaching() { + $query = "SELECT NOW() as TIME"; + $result = $this->db->fetchAll($query); + + $this->assertTrue(is_array($this->db->_queryCache[$query])); + $this->assertEqual($this->db->_queryCache[$query][0][0]['TIME'], $result[0][0]['TIME']); + + $query = "DROP TABLE IF EXISTS select_test"; + $result = $this->db->fetchAll($query); + + $this->assertTrue(!isset($this->db->_queryCache[$query])); + } + /** * test ShowQuery generation of regular and error messages * @@ -4468,12 +4498,12 @@ function testVirtualFieldsFetch() { */ function testVirtualFieldsComplexRead() { $this->loadFixtures('DataTest', 'Article', 'Comment'); - + $Article =& ClassRegistry::init('Article'); $commentTable = $this->db->fullTableName('comments'); $Article =& ClassRegistry::init('Article'); $Article->virtualFields = array( - 'comment_count' => 'SELECT COUNT(*) FROM ' . $commentTable . + 'comment_count' => 'SELECT COUNT(*) FROM ' . $commentTable . ' AS Comment WHERE Article.id = Comment.article_id' ); $result = $Article->find('all'); @@ -4578,7 +4608,7 @@ function testFullTablePermutations() { $Article->tablePrefix = 'tbl_'; $result = $this->testDb->fullTableName($Article, false); $this->assertEqual($result, 'tbl_articles'); - + $Article->useTable = $Article->table = 'with spaces'; $Article->tablePrefix = ''; $result = $this->testDb->fullTableName($Article); diff --git a/cake/tests/cases/libs/model/db_acl.test.php b/cake/tests/cases/libs/model/db_acl.test.php index d001fbe..0b3d31c 100755 --- a/cake/tests/cases/libs/model/db_acl.test.php +++ b/cake/tests/cases/libs/model/db_acl.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components.dbacl.models diff --git a/cake/tests/cases/libs/model/model.test.php b/cake/tests/cases/libs/model/model.test.php index c4376b4..79a77fc 100755 --- a/cake/tests/cases/libs/model/model.test.php +++ b/cake/tests/cases/libs/model/model.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -65,7 +65,8 @@ class BaseModelTest extends CakeTestCase { 'core.counter_cache_user_nonstandard_primary_key', 'core.counter_cache_post_nonstandard_primary_key', 'core.uuidportfolio', 'core.uuiditems_uuidportfolio', 'core.uuiditems_uuidportfolio_numericid', 'core.fruit', - 'core.fruits_uuid_tag', 'core.uuid_tag', 'core.product_update_all', 'core.group_update_all' + 'core.fruits_uuid_tag', 'core.uuid_tag', 'core.product_update_all', 'core.group_update_all', + 'core.bidding', 'core.bidding_message' ); /** diff --git a/cake/tests/cases/libs/model/model_behavior.test.php b/cake/tests/cases/libs/model/model_behavior.test.php index b30abc3..2ad1da8 100755 --- a/cake/tests/cases/libs/model/model_behavior.test.php +++ b/cake/tests/cases/libs/model/model_behavior.test.php @@ -7,7 +7,7 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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. diff --git a/cake/tests/cases/libs/model/model_delete.test.php b/cake/tests/cases/libs/model/model_delete.test.php index 7364f55..62cd035 100755 --- a/cake/tests/cases/libs/model/model_delete.test.php +++ b/cake/tests/cases/libs/model/model_delete.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -534,6 +534,86 @@ function testDeleteLinks() { $this->assertTrue($result, 'deleteAll returned false when all no records matched conditions. %s'); } +/** + * testDeleteDependent method + * + * @access public + * @return void + */ + function testDeleteDependent() { + $this->loadFixtures('Bidding', 'BiddingMessage'); + $Bidding = new Bidding(); + $result = $Bidding->find('all'); + $expected = array( + array( + 'Bidding' => array('id' => 1, 'bid' => 'One', 'name' => 'Bid 1'), + 'BiddingMessage' => array('bidding' => 'One', 'name' => 'Message 1'), + ), + array( + 'Bidding' => array('id' => 2, 'bid' => 'Two', 'name' => 'Bid 2'), + 'BiddingMessage' => array('bidding' => 'Two', 'name' => 'Message 2'), + ), + array( + 'Bidding' => array('id' => 3, 'bid' => 'Three', 'name' => 'Bid 3'), + 'BiddingMessage' => array('bidding' => 'Three', 'name' => 'Message 3'), + ), + array( + 'Bidding' => array('id' => 4, 'bid' => 'Five', 'name' => 'Bid 5'), + 'BiddingMessage' => array('bidding' => '', 'name' => ''), + ), + ); + $this->assertEqual($result, $expected); + + $Bidding->delete(4, true); + $result = $Bidding->find('all'); + $expected = array( + array( + 'Bidding' => array('id' => 1, 'bid' => 'One', 'name' => 'Bid 1'), + 'BiddingMessage' => array('bidding' => 'One', 'name' => 'Message 1'), + ), + array( + 'Bidding' => array('id' => 2, 'bid' => 'Two', 'name' => 'Bid 2'), + 'BiddingMessage' => array('bidding' => 'Two', 'name' => 'Message 2'), + ), + array( + 'Bidding' => array('id' => 3, 'bid' => 'Three', 'name' => 'Bid 3'), + 'BiddingMessage' => array('bidding' => 'Three', 'name' => 'Message 3'), + ), + ); + $this->assertEqual($result, $expected); + + $Bidding->delete(2, true); + $result = $Bidding->find('all'); + $expected = array( + array( + 'Bidding' => array('id' => 1, 'bid' => 'One', 'name' => 'Bid 1'), + 'BiddingMessage' => array('bidding' => 'One', 'name' => 'Message 1'), + ), + array( + 'Bidding' => array('id' => 3, 'bid' => 'Three', 'name' => 'Bid 3'), + 'BiddingMessage' => array('bidding' => 'Three', 'name' => 'Message 3'), + ), + ); + $this->assertEqual($result, $expected); + + $result = $Bidding->BiddingMessage->find('all', array('order' => array('BiddingMessage.name' => 'ASC'))); + $expected = array( + array( + 'BiddingMessage' => array('bidding' => 'One', 'name' => 'Message 1'), + 'Bidding' => array('id' => 1, 'bid' => 'One', 'name' => 'Bid 1'), + ), + array( + 'BiddingMessage' => array('bidding' => 'Three', 'name' => 'Message 3'), + 'Bidding' => array('id' => 3, 'bid' => 'Three', 'name' => 'Bid 3'), + ), + array( + 'BiddingMessage' => array('bidding' => 'Four', 'name' => 'Message 4'), + 'Bidding' => array('id' => '', 'bid' => '', 'name' => ''), + ), + ); + $this->assertEqual($result, $expected); + } + /** * test deleteLinks with Multiple habtm associations * diff --git a/cake/tests/cases/libs/model/model_integration.test.php b/cake/tests/cases/libs/model/model_integration.test.php index e5875e8..1fe2dbb 100755 --- a/cake/tests/cases/libs/model/model_integration.test.php +++ b/cake/tests/cases/libs/model/model_integration.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -148,6 +148,44 @@ function testDynamicBehaviorAttachment() { $this->assertFalse(isset($TestModel->Behaviors->Tree)); } +/** + * testFindWithJoinsOption method + * + * @access public + * @return void + */ + function testFindWithJoinsOption() { + $this->loadFixtures('Article', 'User'); + $TestUser =& new User(); + + $options = array ( + 'fields' => array( + 'user', + 'Article.published', + ), + 'joins' => array ( + array ( + 'table' => 'articles', + 'alias' => 'Article', + 'type' => 'LEFT', + 'conditions' => array( + 'User.id = Article.user_id', + ), + ), + ), + 'group' => array('User.user'), + 'recursive' => -1, + ); + $result = $TestUser->find('all', $options); + $expected = array( + array('User' => array('user' => 'garrett'), 'Article' => array('published' => '')), + array('User' => array('user' => 'larry'), 'Article' => array('published' => 'Y')), + array('User' => array('user' => 'mariano'), 'Article' => array('published' => 'Y')), + array('User' => array('user' => 'nate'), 'Article' => array('published' => '')) + ); + $this->assertEqual($result, $expected); + } + /** * Tests cross database joins. Requires $test and $test2 to both be set in DATABASE_CONFIG * NOTE: When testing on MySQL, you must set 'persistent' => false on *both* database connections, diff --git a/cake/tests/cases/libs/model/model_read.test.php b/cake/tests/cases/libs/model/model_read.test.php index 61de310..f2b2657 100755 --- a/cake/tests/cases/libs/model/model_read.test.php +++ b/cake/tests/cases/libs/model/model_read.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -4776,7 +4776,7 @@ function testBindMultipleTimesWithDifferentResetSettings() { * * @return void */ - function bindWithCustomPrimaryKey() { + function testBindWithCustomPrimaryKey() { $this->loadFixtures('Story', 'StoriesTag', 'Tag'); $Model =& ClassRegistry::init('StoriesTag'); $Model->bindModel(array( @@ -4791,7 +4791,7 @@ function bindWithCustomPrimaryKey() { } /** - * test that calling unbindModel() with reset == true multiple times + * test that calling unbindModel() with reset == true multiple times * leaves associations in the correct state. * * @return void @@ -4962,6 +4962,95 @@ function testCallbackDisabling() { $this->assertEqual($result, $expected); } +/** + * testAssociationAfterFindCallbacksDisabled method + * + * @return void + */ + public function testAssociationAfterFindCalbacksDisabled() { + $this->loadFixtures('Post', 'Author', 'Comment'); + $TestModel = new Post(); + $result = $TestModel->find('all', array('callbacks' => false)); + $expected = array( + array( + 'Post' => array( + 'id' => '1', + 'author_id' => '1', + 'title' => 'First Post', + 'body' => 'First Post Body', + 'published' => 'Y', + 'created' => '2007-03-18 10:39:23', + 'updated' => '2007-03-18 10:41:31' + ), + 'Author' => array( + 'id' => '1', + 'user' => 'mariano', + 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', + 'created' => '2007-03-17 01:16:23', + 'updated' => '2007-03-17 01:18:31' + )), + array( + 'Post' => array( + 'id' => '2', + 'author_id' => '3', + 'title' => 'Second Post', + 'body' => 'Second Post Body', + 'published' => 'Y', + 'created' => '2007-03-18 10:41:23', + 'updated' => '2007-03-18 10:43:31' + ), + 'Author' => array( + 'id' => '3', + 'user' => 'larry', + 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', + 'created' => '2007-03-17 01:20:23', + 'updated' => '2007-03-17 01:22:31' + )), + array( + 'Post' => array( + 'id' => '3', + 'author_id' => '1', + 'title' => 'Third Post', + 'body' => 'Third Post Body', + 'published' => 'Y', + 'created' => '2007-03-18 10:43:23', + 'updated' => '2007-03-18 10:45:31' + ), + 'Author' => array( + 'id' => '1', + 'user' => 'mariano', + 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', + 'created' => '2007-03-17 01:16:23', + 'updated' => '2007-03-17 01:18:31' + ))); + $this->assertEqual($expected, $result); + unset($TestModel); + + $Author = new Author(); + $Author->Post->bindModel(array( + 'hasMany' => array( + 'Comment' => array( + 'className' => 'ModifiedComment', + 'foreignKey' => 'article_id', + ) + ))); + $result = $Author->find('all', array( + 'conditions' => array('Author.id' => 1), + 'recursive' => 2, + 'callbacks' => false + )); + $expected = array( + 'id' => 1, + 'article_id' => 1, + 'user_id' => 2, + 'comment' => 'First Comment for First Article', + 'published' => 'Y', + 'created' => '2007-03-18 10:45:23', + 'updated' => '2007-03-18 10:47:31' + ); + $this->assertEqual($result[0]['Post'][0]['Comment'][0], $expected); + } + /** * Tests that the database configuration assigned to the model can be changed using * (before|after)Find callbacks @@ -5158,7 +5247,7 @@ function testHabtmFinderQuery() { 'group' => null, 'joins' => array(array( 'alias' => 'ArticlesTag', - 'table' => $this->db->fullTableName('articles_tags'), + 'table' => 'articles_tags', 'conditions' => array( array("ArticlesTag.article_id" => '{$__cakeID__$}'), array("ArticlesTag.tag_id" => $this->db->identifier('Tag.id')) @@ -7408,6 +7497,19 @@ function testVirtualFields() { $this->assertTrue(isset($result['Author']['full_name'])); } +/** + * Test that virtual fields work with SQL constants + * + * @return void + */ + function testVirtualFieldAsAConstant() { + $this->loadFixtures('Post', 'Author'); + $Post =& ClassRegistry::init('Post'); + $Post->virtualFields = array('empty' => "NULL"); + $result = $Post->find('first'); + $this->assertNull($result['Post']['empty']); + } + /** * test that virtual fields work when they don't contain functions. * @@ -7435,6 +7537,7 @@ function testIsVirtualField() { $this->assertTrue($Post->isVirtualField('other_field')); $this->assertTrue($Post->isVirtualField('Post.other_field')); + $this->assertFalse($Post->isVirtualField('Comment.other_field'), 'Other models should not match.'); $this->assertFalse($Post->isVirtualField('id')); $this->assertFalse($Post->isVirtualField('Post.id')); $this->assertFalse($Post->isVirtualField(array())); diff --git a/cake/tests/cases/libs/model/model_validation.test.php b/cake/tests/cases/libs/model/model_validation.test.php index 6688186..3b4689a 100755 --- a/cake/tests/cases/libs/model/model_validation.test.php +++ b/cake/tests/cases/libs/model/model_validation.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -643,6 +643,48 @@ function testValidatesWithModelsAndSaveAll() { $this->assertEqual($joinRecords, 0, 'Records were saved on the join table. %s'); } +/** + * test that saveAll and with models at initial insert (no id has set yet) + * with validation interact well + * + * @return void + */ + function testValidatesWithModelsAndSaveAllWithoutId() { + $data = array( + 'Article' => array( + 'title' => 'Extra Fields', + 'body' => 'Extra Fields Body', + 'published' => '1' + ), + 'Comment' => array( + array('word' => 'Hello'), + array('word' => 'World'), + ) + ); + $Article =& new Article(); + $Comment =& $Article->Comment; + + $Comment->validate = array('article_id' => array('rule' => 'numeric')); + + $Article->create(); + $result = $Article->saveAll($data, array('validate' => 'only')); + $this->assertTrue($result); + + $Article->create(); + $result = $Article->saveAll($data, array('validate' => 'first')); + $this->assertTrue($result); + $this->assertFalse(is_null($Article->id)); + + $id = $Article->id; + $count = $Article->find('count', array('conditions' => array('Article.id' => $id))); + $this->assertIdentical($count, 1); + + $count = $Comment->find('count', array( + 'conditions' => array('Comment.article_id' => $id) + )); + $this->assertEqual($count, count($data['Comment'])); + } + /** * Test that missing validation methods trigger errors in development mode. * Helps to make developement easier. @@ -670,4 +712,71 @@ function testMissingValidationErrorTriggering() { Configure::write('debug', $restore); } +/** + * Test for 'on' => [create|update] in validation rules. + * + * @return void + */ + function testStateValidation() { + $Article =& new Article(); + + $data = array( + 'Article' => array( + 'title' => '', + 'body' => 'Extra Fields Body', + 'published' => '1' + ) + ); + + $Article->validate = array( + 'title' => array( + 'notempty' => array( + 'rule' => 'notEmpty', + 'on' => 'create' + ) + ), + 'published' => array( + 'notempty' => array( + 'rule' => 'notEmpty', + ) + ) + ); + + $Article->create($data); + $this->assertFalse($Article->validates()); + + $Article->save(null, array('validate' => false)); + $data['Article']['id'] = $Article->id; + $Article->set($data); + $this->assertTrue($Article->validates()); + + $Article->data['Article']['published'] = null; + $this->assertFalse($Article->validates()); + + unset($data['Article']['id']); + $Article->data['Article']['published'] = '1'; + $Article->validate = array( + 'title' => array( + 'notempty' => array( + 'rule' => 'notEmpty', + 'on' => 'update' + ) + ), + 'published' => array( + 'notempty' => array( + 'rule' => 'notEmpty', + ) + ) + ); + + $Article->create($data); + $this->assertTrue($Article->validates()); + + $Article->save(null, array('validate' => false)); + $data['Article']['id'] = $Article->id; + $Article->set($data); + $this->assertFalse($Article->validates()); + + } + } diff --git a/cake/tests/cases/libs/model/model_write.test.php b/cake/tests/cases/libs/model/model_write.test.php index 81473ff..409d627 100755 --- a/cake/tests/cases/libs/model/model_write.test.php +++ b/cake/tests/cases/libs/model/model_write.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -2674,7 +2674,7 @@ function testSaveAllHabtm() { $this->assertEqual(count($result['Tag']), 2); $this->assertEqual($result['Tag'][0]['tag'], 'tag1'); $this->assertEqual(count($result['Comment']), 1); - $this->assertEqual(count($result['Comment'][0]['comment']['Article comment']), 1); + $this->assertEqual(count($result['Comment'][0]['comment']), 1); } /** diff --git a/cake/tests/cases/libs/model/models.php b/cake/tests/cases/libs/model/models.php index 85e2fa5..6318592 100755 --- a/cake/tests/cases/libs/model/models.php +++ b/cake/tests/cases/libs/model/models.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -1104,6 +1104,76 @@ class Bid extends CakeTestModel { var $belongsTo = array('Message'); } +/** + * BiddingMessage class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ +class BiddingMessage extends CakeTestModel { + +/** + * name property + * + * @var string 'BiddingMessage' + * @access public + */ + var $name = 'BiddingMessage'; + +/** + * primaryKey property + * + * @var string 'bidding' + * @access public + */ + var $primaryKey = 'bidding'; + + +/** + * belongsTo property + * + * @var array + * @access public + */ + var $belongsTo = array( + 'Bidding' => array( + 'foreignKey' => false, + 'conditions' => array('BiddingMessage.bidding = Bidding.bid') + ) + ); +} + +/** + * Bidding class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ +class Bidding extends CakeTestModel { + +/** + * name property + * + * @var string 'Bidding' + * @access public + */ + var $name = 'Bidding'; + +/** + * hasOne property + * + * @var array + * @access public + */ + var $hasOne = array( + 'BiddingMessage' => array( + 'foreignKey' => false, + 'conditions' => array('BiddingMessage.bidding = Bidding.bid'), + 'dependent' => true + ) + ); +} + /** * NodeAfterFind class * @@ -3432,6 +3502,14 @@ class TranslatedArticle extends CakeTestModel { * @access public */ var $belongsTo = array('User'); + +/** + * hasMany property + * + * @var array + * @access public + */ + var $hasMany = array('TranslatedItem'); } class CounterCacheUser extends CakeTestModel { diff --git a/cake/tests/cases/libs/multibyte.test.php b/cake/tests/cases/libs/multibyte.test.php index 7dbf875..17649b6 100755 --- a/cake/tests/cases/libs/multibyte.test.php +++ b/cake/tests/cases/libs/multibyte.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/object.test.php b/cake/tests/cases/libs/object.test.php index cc5dc82..43d7c7d 100755 --- a/cake/tests/cases/libs/object.test.php +++ b/cake/tests/cases/libs/object.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/overloadable.test.php b/cake/tests/cases/libs/overloadable.test.php index c558e8c..d1e0b7c 100755 --- a/cake/tests/cases/libs/overloadable.test.php +++ b/cake/tests/cases/libs/overloadable.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/router.test.php b/cake/tests/cases/libs/router.test.php index 8a3046f..50a334e 100755 --- a/cake/tests/cases/libs/router.test.php +++ b/cake/tests/cases/libs/router.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -2534,6 +2534,19 @@ function testMatchWithPatterns() { $this->assertFalse($result); } +/** + * Test protocol relative urls. + * + * @return void + */ + function testProtocolUrls() { + $url = 'svn+ssh://example.com'; + $this->assertEqual($url, Router::url($url)); + + $url = '://example.com'; + $this->assertEqual($url, Router::url($url)); + } + /** * test that patterns work for :action * diff --git a/cake/tests/cases/libs/sanitize.test.php b/cake/tests/cases/libs/sanitize.test.php index c9224b0..1658e3c 100755 --- a/cake/tests/cases/libs/sanitize.test.php +++ b/cake/tests/cases/libs/sanitize.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -261,6 +261,11 @@ function testStripWhitespace() { $expected = "This sentence has lots of whitespace that needs to be trimmed."; $result = Sanitize::stripWhitespace($string); $this->assertEqual($result, $expected); + + $text = 'I love ßá†ö√ letters.'; + $result = Sanitize::stripWhitespace($text); + $expected = 'I love ßá†ö√ letters.'; + $this->assertEqual($result, $expected); } /** diff --git a/cake/tests/cases/libs/security.test.php b/cake/tests/cases/libs/security.test.php index c0beb9a..56f209e 100755 --- a/cake/tests/cases/libs/security.test.php +++ b/cake/tests/cases/libs/security.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/set.test.php b/cake/tests/cases/libs/set.test.php index d6a255e..0f00b91 100755 --- a/cake/tests/cases/libs/set.test.php +++ b/cake/tests/cases/libs/set.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -939,7 +939,7 @@ function testExtract() { $result = Set::extract('/ParentNode/name', $hasMany); $expected = array('Second'); $this->assertEqual($result, $expected); - + $data = array( array( 'Category' => array( @@ -973,6 +973,32 @@ function testExtract() { ); $result = Set::extract('/Category[id=1]/..', $data); $this->assertEqual($result, $expected); + + $data = array( + array( + 'ChildNode' => array('id' => 1), + array('name' => 'Item 1') + ), + array( + 'ChildNode' => array('id' => 2), + array('name' => 'Item 2') + ), + ); + + $expected = array( + 'Item 1', + 'Item 2' + ); + $result = Set::extract('/0/name', $data); + $this->assertEqual($result, $expected); + + $data = array( + array('A1', 'B1'), + array('A2', 'B2') + ); + $expected = array('A1', 'A2'); + $result = Set::extract('/0', $data); + $this->assertEqual($result, $expected); } /** @@ -1180,7 +1206,7 @@ function testExtractWithNonZeroArrays() { $expected = array(1, 2, 3); $r = Set::extract('/User/id', $nonZero); $this->assertEqual($r, $expected); - + $expected = array( array('User' => array('id' => 1, 'name' => 'John')), array('User' => array('id' => 2, 'name' => 'Bob')), @@ -1622,7 +1648,7 @@ function testRemove() { 'files' => array('name' => 'files') ); - $result = Set::remove($a, 'files', array('name' => 'files')); + $result = Set::remove($a, 'files'); $expected = array( 'pages' => array('name' => 'page') ); @@ -1635,7 +1661,7 @@ function testRemove() { ) ); - $result = Set::remove($a, 'pages.1.vars', array('title' => 'page title')); + $result = Set::remove($a, 'pages.1.vars'); $expected = array( 'pages' => array( 0 => array('name' => 'main'), @@ -1644,7 +1670,7 @@ function testRemove() { ); $this->assertIdentical($result, $expected); - $result = Set::remove($a, 'pages.2.vars', array('title' => 'page title')); + $result = Set::remove($a, 'pages.2.vars'); $expected = $a; $this->assertIdentical($result, $expected); } @@ -2229,6 +2255,26 @@ function testFormatting() { $this->assertEqual($result, $expected); } +/** + * testFormattingNullValues method + * + * @return void + */ + public function testFormattingNullValues() { + $data = array( + array('Person' => array('first_name' => 'Nate', 'last_name' => 'Abele', 'city' => 'Boston', 'state' => 'MA', 'something' => '42')), + array('Person' => array('first_name' => 'Larry', 'last_name' => 'Masters', 'city' => 'Boondock', 'state' => 'TN', 'something' => null)), + array('Person' => array('first_name' => 'Garrett', 'last_name' => 'Woodworth', 'city' => 'Venice Beach', 'state' => 'CA', 'something' => null))); + + $result = Set::format($data, '%s', array('{n}.Person.something')); + $expected = array('42', '', ''); + $this->assertEqual($expected, $result); + + $result = Set::format($data, '{0}, {1}', array('{n}.Person.city', '{n}.Person.something')); + $expected = array('Boston, 42', 'Boondock, ', 'Venice Beach, '); + $this->assertEqual($expected, $result); + } + /** * testCountDim method * diff --git a/cake/tests/cases/libs/string.test.php b/cake/tests/cases/libs/string.test.php index a875267..1373b1f 100755 --- a/cake/tests/cases/libs/string.test.php +++ b/cake/tests/cases/libs/string.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/test_manager.test.php b/cake/tests/cases/libs/test_manager.test.php index 1cbe9ee..74619e3 100755 --- a/cake/tests/cases/libs/test_manager.test.php +++ b/cake/tests/cases/libs/test_manager.test.php @@ -5,14 +5,14 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * 1785 E. Sahara Avenue, Suite 490-204 * Las Vegas, Nevada 89104 * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/validation.test.php b/cake/tests/cases/libs/validation.test.php index bd3e4e4..9a7308a 100755 --- a/cake/tests/cases/libs/validation.test.php +++ b/cake/tests/cases/libs/validation.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -1447,6 +1447,7 @@ function testDateMmmmDdyyyy() { $this->assertTrue(Validation::date('Dec 27 2006', array('Mdy'))); $this->assertFalse(Validation::date('27 Dec 2006', array('Mdy'))); $this->assertFalse(Validation::date('2006 December 27', array('Mdy'))); + $this->assertTrue(Validation::date('Sep 12, 2011', array('Mdy'))); } /** @@ -1508,6 +1509,8 @@ function testTime() { $this->assertTrue(Validation::time('12:01am')); $this->assertTrue(Validation::time('12:01pm')); $this->assertTrue(Validation::time('1pm')); + $this->assertTrue(Validation::time('1 pm')); + $this->assertTrue(Validation::time('1 PM')); $this->assertTrue(Validation::time('01:00')); $this->assertFalse(Validation::time('1:00')); $this->assertTrue(Validation::time('1:00pm')); diff --git a/cake/tests/cases/libs/view/helper.test.php b/cake/tests/cases/libs/view/helper.test.php index 702ef0a..e250e82 100755 --- a/cake/tests/cases/libs/view/helper.test.php +++ b/cake/tests/cases/libs/view/helper.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/view/helpers/ajax.test.php b/cake/tests/cases/libs/view/helpers/ajax.test.php index 8dbf3d9..719d237 100755 --- a/cake/tests/cases/libs/view/helpers/ajax.test.php +++ b/cake/tests/cases/libs/view/helpers/ajax.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/helpers/cache.test.php b/cake/tests/cases/libs/view/helpers/cache.test.php index 6cb29f0..ea7d3ae 100755 --- a/cake/tests/cases/libs/view/helpers/cache.test.php +++ b/cake/tests/cases/libs/view/helpers/cache.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -342,6 +342,38 @@ function testCacheViewVars() { @unlink($filename); } + + function testCacheCallbacks() { + $this->Controller->cache_parsing(); + $this->Controller->params = array( + 'controller' => 'cache_test', + 'action' => 'cache_parsing', + 'url' => array(), + 'pass' => array(), + 'named' => array() + ); + $this->Controller->cacheAction = array( + 'cache_parsing' => array( + 'duration' => 21600, + 'callbacks' => true + ) + ); + $this->Controller->here = '/cacheTest/cache_parsing'; + $this->Controller->action = 'cache_parsing'; + + $View = new View($this->Controller); + $result = $View->render('index'); + + $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; + $this->assertTrue(file_exists($filename)); + + $contents = file_get_contents($filename); + + $this->assertPattern('/\$controller->beforeFilter\(\);/', $contents); + $this->assertPattern('/\$this->params = \$controller->params;/', $contents); + + @unlink($filename); + } /** * test cacheAction set to a boolean @@ -529,11 +561,17 @@ function testCacheBaseNameControllerName() { * This test must be uncommented/fixed in next release (1.2+) * * @return void - * @access public - * - function testCacheEmptySections () { + */ + function testCacheEmptySections() { $this->Controller->cache_parsing(); - $this->Controller->cacheAction = array('cacheTest' => 21600); + $this->Controller->params = array( + 'controller' => 'cacheTest', + 'action' => 'cache_empty_sections', + 'url' => array(), + 'pass' => array(), + 'named' => array() + ); + $this->Controller->cacheAction = array('cache_empty_sections' => 21600); $this->Controller->here = '/cacheTest/cache_empty_sections'; $this->Controller->action = 'cache_empty_sections'; $this->Controller->layout = 'cache_empty_sections'; @@ -556,16 +594,15 @@ function testCacheEmptySections () { $this->assertNoPattern('/cake:nocache/', $contents); $this->assertPattern( '@\s*Posts\s*' . - "<\?php \$x = 1; \?>\s*" . + '<\?php \$x \= 1; \?>\s*' . '\s*' . '\s*' . - "<\?php \$x\+\+; \?>\s*" . - "<\?php \$x\+\+; \?>\s*" . + '<\?php \$x\+\+; \?>\s*' . + '<\?php \$x\+\+; \?>\s*' . 'View Content\s*' . - "<\?php \$y = 1; \?>\s*" . - "<\?php echo 'cached count is:' . \$x; \?>\s*" . + '<\?php \$y = 1; \?>\s*' . + '<\?php echo \'cached count is: \' . \$x; \?>\s*' . '@', $contents); @unlink($filename); } -*/ } diff --git a/cake/tests/cases/libs/view/helpers/form.test.php b/cake/tests/cases/libs/view/helpers/form.test.php index 07667e7..826838a 100755 --- a/cake/tests/cases/libs/view/helpers/form.test.php +++ b/cake/tests/cases/libs/view/helpers/form.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -997,6 +997,20 @@ function testFormSecurityMultipleInputFields() { $this->assertTags($result, $expected); } +/** + * Test form security with Model.field.0 style inputs + * + * @return void + */ + function testFormSecurityArrayFields() { + $key = 'testKey'; + + $this->Form->params['_Token']['key'] = $key; + $this->Form->create('Address'); + $this->Form->input('Address.primary.1'); + $this->assertEqual('Address.primary', $this->Form->fields[0]); + } + /** * testFormSecurityMultipleInputDisabledFields method * @@ -1283,6 +1297,7 @@ function testDisableSecurityUsingForm() { ); $this->assertEqual($result, $expected); } + /** * testPasswordValidation method * @@ -1311,6 +1326,62 @@ function testPasswordValidation() { $this->assertTags($result, $expected); } +/** + * testEmptyErrorValidation method + * + * test validation error div when validation message is an empty string + * + * @access public + * @return void + */ + function testEmptyErrorValidation() { + $this->Form->validationErrors['Contact']['password'] = ''; + $result = $this->Form->input('Contact.password'); + $expected = array( + 'div' => array('class' => 'input password error'), + 'label' => array('for' => 'ContactPassword'), + 'Password', + '/label', + 'input' => array( + 'type' => 'password', 'name' => 'data[Contact][password]', + 'id' => 'ContactPassword', 'class' => 'form-error' + ), + array('div' => array('class' => 'error-message')), + array(), + '/div', + '/div' + ); + $this->assertTags($result, $expected); + } + +/** + * testEmptyInputErrorValidation method + * + * test validation error div when validation message is overriden by an empty string when calling input() + * + * @access public + * @return void + */ + function testEmptyInputErrorValidation() { + $this->Form->validationErrors['Contact']['password'] = 'Please provide a password'; + $result = $this->Form->input('Contact.password', array('error' => '')); + $expected = array( + 'div' => array('class' => 'input password error'), + 'label' => array('for' => 'ContactPassword'), + 'Password', + '/label', + 'input' => array( + 'type' => 'password', 'name' => 'data[Contact][password]', + 'id' => 'ContactPassword', 'class' => 'form-error' + ), + array('div' => array('class' => 'error-message')), + array(), + '/div', + '/div' + ); + $this->assertTags($result, $expected); + } + /** * testFormValidationAssociated method * @@ -2880,6 +2951,26 @@ function testRadio() { ); $this->assertTags($result, $expected); + $this->Form->data = array('Model' => array('field' => '')); + $result = $this->Form->radio('Model.field', array('1' => 'Yes', '0' => 'No')); + $expected = array( + 'fieldset' => array(), + 'legend' => array(), + 'Field', + '/legend', + 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '', 'id' => 'ModelField_'), + array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1')), + array('label' => array('for' => 'ModelField1')), + 'Yes', + '/label', + array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0')), + array('label' => array('for' => 'ModelField0')), + 'No', + '/label', + '/fieldset' + ); + $this->assertTags($result, $expected); + $result = $this->Form->input('Newsletter.subscribe', array('legend' => 'Legend title', 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe'))); $expected = array( 'div' => array('class' => 'input radio'), @@ -4443,13 +4534,14 @@ function testDateTime() { ); $this->assertTags($result, $expected); - $selected = strtotime('2008-10-26 10:33:00'); + $selected = strtotime('2008-10-26 12:33:00'); $result = $this->Form->dateTime('Model.field', 'DMY', '12', $selected); $this->assertPattern('/]+value="2008"[^<>]+selected="selected"[^>]*>2008<\/option>/', $result); - $this->assertPattern('/]+value="10"[^<>]+selected="selected"[^>]*>10<\/option>/', $result); + $this->assertPattern('/]+value="10"[^<>]+selected="selected"[^>]*>October<\/option>/', $result); $this->assertPattern('/]+value="26"[^<>]+selected="selected"[^>]*>26<\/option>/', $result); - $this->assertPattern('/]+value="10"[^<>]+selected="selected"[^>]*>10<\/option>/', $result); + $this->assertPattern('/]+value="12"[^<>]+selected="selected"[^>]*>12<\/option>/', $result); $this->assertPattern('/]+value="33"[^<>]+selected="selected"[^>]*>33<\/option>/', $result); + $this->assertPattern('/]+value="pm"[^<>]+selected="selected"[^>]*>pm<\/option>/', $result); $this->Form->create('Contact'); $result = $this->Form->input('published'); @@ -5581,6 +5673,23 @@ function testSubmitImage() { $this->assertTags($result, $expected); } +/** + * Test submit image with timestamps. + * + * @return void + */ + function testSubmitImageTimestamp() { + Configure::write('Asset.timestamp', 'force'); + + $result = $this->Form->submit('cake.power.gif'); + $expected = array( + 'div' => array('class' => 'submit'), + 'input' => array('type' => 'image', 'src' => 'preg:/img\/cake\.power\.gif\?\d*/'), + '/div' + ); + $this->assertTags($result, $expected); + } + /** * test the create() method * @@ -5754,6 +5863,51 @@ function testCreate() { '/div' ); $this->assertTags($result, $expected); + + } + +/** + * Test the onsubmit option for create() + * + * @return void + */ + public function testCreateOnSubmit() { + $this->Form->data = array(); + $this->Form->params['controller'] = 'contacts'; + $this->Form->params['models'] = array('Contact'); + $result = $this->Form->create(array('url' => array('action' => 'index', 'param'), 'default' => false)); + $expected = array( + 'form' => array( + 'id' => 'ContactAddForm', 'method' => 'post', 'onsubmit' => 'event.returnValue = false; return false;', 'action' => '/contacts/index/param', + 'accept-charset' => 'utf-8' + ), + 'div' => array('style' => 'display:none;'), + 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), + '/div' + ); + $this->assertTags($result, $expected); + + $this->Form->data = array(); + $this->Form->params['controller'] = 'contacts'; + $this->Form->params['models'] = array('Contact'); + $result = $this->Form->create(array( + 'url' => array('action' => 'index', 'param'), + 'default' => false, + 'onsubmit' => 'someFunction();' + )); + + $expected = array( + 'form' => array( + 'id' => 'ContactAddForm', 'method' => 'post', + 'onsubmit' => 'someFunction();event.returnValue = false; return false;', + 'action' => '/contacts/index/param', + 'accept-charset' => 'utf-8' + ), + 'div' => array('style' => 'display:none;'), + 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), + '/div' + ); + $this->assertTags($result, $expected); } /** diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/cake/tests/cases/libs/view/helpers/html.test.php index 2a95427..8c608b7 100755 --- a/cake/tests/cases/libs/view/helpers/html.test.php +++ b/cake/tests/cases/libs/view/helpers/html.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -464,6 +464,10 @@ function testCssLink() { $expected['link']['href'] = 'preg:/.*ccss\/cake\.generic\.css/'; $this->assertTags($result, $expected); + $result = $this->Html->css('//example.com/css/cake.generic.css'); + $expected['link']['href'] = 'preg:/.*example\.com\/css\/cake\.generic\.css/'; + $this->assertTags($result, $expected); + Configure::write('Asset.filter.css', false); $result = explode("\n", trim($this->Html->css(array('cake.generic', 'vendor.generic')))); @@ -594,7 +598,7 @@ function testScript() { $result = $this->Html->script('http://example.com/test.json'); $expected = array( - 'script' => array('type' => 'text/javascript', 'src' => 'http://example.com/test.json.js') + 'script' => array('type' => 'text/javascript', 'src' => 'http://example.com/test.json') ); $this->assertTags($result, $expected); @@ -632,6 +636,27 @@ function testScript() { $this->assertNull($result); } +/** + * Test that Asset.filter.js works. + * + * @return void + */ + function testScriptAssetFilter() { + Configure::write('Asset.filter.js', 'js.php'); + + $result = $this->Html->script('jquery-1.3'); + $expected = array( + 'script' => array('type' => 'text/javascript', 'src' => 'cjs/jquery-1.3.js') + ); + $this->assertTags($result, $expected); + + $result = $this->Html->script('//example.com/js/jquery-1.3.js'); + $expected = array( + 'script' => array('type' => 'text/javascript', 'src' => '//example.com/js/jquery-1.3.js') + ); + $this->assertTags($result, $expected); + } + /** * test a script file in the webroot/theme dir. * diff --git a/cake/tests/cases/libs/view/helpers/javascript.test.php b/cake/tests/cases/libs/view/helpers/javascript.test.php index f38750a..7f01bcc 100755 --- a/cake/tests/cases/libs/view/helpers/javascript.test.php +++ b/cake/tests/cases/libs/view/helpers/javascript.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/helpers/jquery_engine.test.php b/cake/tests/cases/libs/view/helpers/jquery_engine.test.php index 4659208..61ab6fd 100755 --- a/cake/tests/cases/libs/view/helpers/jquery_engine.test.php +++ b/cake/tests/cases/libs/view/helpers/jquery_engine.test.php @@ -5,14 +5,14 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * 1785 E. Sahara Avenue, Suite 490-204 * Las Vegas, Nevada 89104 * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake.tests * @subpackage cake.tests.cases.views.helpers diff --git a/cake/tests/cases/libs/view/helpers/js.test.php b/cake/tests/cases/libs/view/helpers/js.test.php index 9b07142..dcc0b92 100755 --- a/cake/tests/cases/libs/view/helpers/js.test.php +++ b/cake/tests/cases/libs/view/helpers/js.test.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/helpers/mootools_engine.test.php b/cake/tests/cases/libs/view/helpers/mootools_engine.test.php index 3e8129e..02adc68 100755 --- a/cake/tests/cases/libs/view/helpers/mootools_engine.test.php +++ b/cake/tests/cases/libs/view/helpers/mootools_engine.test.php @@ -7,14 +7,14 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * 1785 E. Sahara Avenue, Suite 490-204 * Las Vegas, Nevada 89104 * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake.tests * @subpackage cake.tests.cases.views.helpers diff --git a/cake/tests/cases/libs/view/helpers/number.test.php b/cake/tests/cases/libs/view/helpers/number.test.php index d5cdc16..9fc5cb0 100755 --- a/cake/tests/cases/libs/view/helpers/number.test.php +++ b/cake/tests/cases/libs/view/helpers/number.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -151,6 +151,11 @@ function testCurrencyAddFormat() { $result = $this->Number->currency(-10, 'Other'); $expected = '($$ 10.00)'; $this->assertEqual($expected,$result); + + $this->Number->addFormat('Other2', array('before' => '$ ')); + $result = $this->Number->currency(0.22, 'Other2'); + $expected = '$ 0.22'; + $this->assertEqual($expected,$result); } /** diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/cake/tests/cases/libs/view/helpers/paginator.test.php index 9cd7499..592e189 100755 --- a/cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/cake/tests/cases/libs/view/helpers/paginator.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/helpers/prototype_engine.test.php b/cake/tests/cases/libs/view/helpers/prototype_engine.test.php index 0042bc0..3d5f6ed 100755 --- a/cake/tests/cases/libs/view/helpers/prototype_engine.test.php +++ b/cake/tests/cases/libs/view/helpers/prototype_engine.test.php @@ -5,14 +5,14 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * 1785 E. Sahara Avenue, Suite 490-204 * Las Vegas, Nevada 89104 * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake.tests * @subpackage cake.tests.cases.views.helpers diff --git a/cake/tests/cases/libs/view/helpers/rss.test.php b/cake/tests/cases/libs/view/helpers/rss.test.php index bd40611..347e684 100755 --- a/cake/tests/cases/libs/view/helpers/rss.test.php +++ b/cake/tests/cases/libs/view/helpers/rss.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/helpers/session.test.php b/cake/tests/cases/libs/view/helpers/session.test.php index a42468d..cc1ea24 100755 --- a/cake/tests/cases/libs/view/helpers/session.test.php +++ b/cake/tests/cases/libs/view/helpers/session.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/helpers/text.test.php b/cake/tests/cases/libs/view/helpers/text.test.php index 479bded..14da3d3 100755 --- a/cake/tests/cases/libs/view/helpers/text.test.php +++ b/cake/tests/cases/libs/view/helpers/text.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -114,6 +114,11 @@ function testHighlight() { $result = $this->Text->highlight($text, $phrases, array('format' => '\1')); $this->assertEqual($result, $text); + $text = 'This is a (test) text'; + $phrases = '(test'; + $result = $this->Text->highlight($text, $phrases, array('format' => '\1')); + $this->assertEqual('This is a (test) text', $result); + $text = 'Ich saß in einem Café am Übergang'; $expected = 'Ich saß in einem Café am Übergang'; $phrases = array('saß', 'café', 'übergang'); @@ -357,7 +362,7 @@ function testHighlightCaseInsensitivity() { function testExcerpt() { $text = 'This is a phrase with test text to play with'; - $expected = '...with test text...'; + $expected = '...ase with test text to ...'; $result = $this->Text->excerpt($text, 'test', 9, '...'); $this->assertEqual($expected, $result); @@ -373,18 +378,19 @@ function testExcerpt() { $result = $this->Text->excerpt($text, null, 200, '...'); $this->assertEqual($expected, $result); - $expected = '...phrase...'; + $expected = '...a phrase w...'; $result = $this->Text->excerpt($text, 'phrase', 2, '...'); $this->assertEqual($expected, $result); - $phrase = 'This is a phrase with test'; + $phrase = 'This is a phrase with test text'; $expected = $text; - $result = $this->Text->excerpt($text, $phrase, strlen($phrase) + 3, '...'); + $result = $this->Text->excerpt($text, $phrase, 13, '...'); $this->assertEqual($expected, $result); - - $phrase = 'This is a phrase with text'; - $expected = $text; - $result = $this->Text->excerpt($text, $phrase, 10, '...'); + + $text = 'aaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaa'; + $phrase = 'bbbbbbbb'; + $result = $this->Text->excerpt($text, $phrase, 10); + $expected = '...aaaaaaaaaabbbbbbbbaaaaaaaaaa...'; $this->assertEqual($expected, $result); } @@ -397,7 +403,7 @@ function testExcerpt() { function testExcerptCaseInsensitivity() { $text = 'This is a phrase with test text to play with'; - $expected = '...with test text...'; + $expected = '...ase with test text to ...'; $result = $this->Text->excerpt($text, 'TEST', 9, '...'); $this->assertEqual($expected, $result); diff --git a/cake/tests/cases/libs/view/helpers/time.test.php b/cake/tests/cases/libs/view/helpers/time.test.php index daa77f6..7f4d867 100755 --- a/cake/tests/cases/libs/view/helpers/time.test.php +++ b/cake/tests/cases/libs/view/helpers/time.test.php @@ -5,21 +5,18 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ -if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { - define('CAKEPHP_UNIT_TEST_EXECUTION', 1); -} App::import('Helper', 'Time'); /** @@ -409,6 +406,16 @@ function testToAtom() { */ function testToRss() { $this->assertEqual(date('r'), $this->Time->toRss(time())); + + if (!$this->skipIf(!class_exists('DateTimeZone'), '%s DateTimeZone class not available.')) { + $timezones = array('Europe/London', 'Europe/Brussels', 'UTC', 'America/Denver', 'America/Caracas', 'Asia/Kathmandu'); + foreach($timezones as $timezone) { + $yourTimezone = new DateTimeZone($timezone); + $yourTime = new DateTime('now', $yourTimezone); + $userOffset = $yourTimezone->getOffset($yourTime) / HOUR; + $this->assertEqual($yourTime->format('r'), $this->Time->toRss(time(), $userOffset)); + } + } } /** @@ -770,6 +777,7 @@ function testI18nFormat() { 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS) ), true); Configure::write('Config.language', 'time_test'); + $time = strtotime('Thu Jan 14 13:59:28 2010'); $result = $this->Time->i18nFormat($time); @@ -784,6 +792,20 @@ function testI18nFormat() { $expected = 'Time is 01:59:28 PM, and date is 14/01/10'; $this->assertEqual($result, $expected); + $time = strtotime('Wed Jan 13 13:59:28 2010'); + + $result = $this->Time->i18nFormat($time); + $expected = '13/01/10'; + $this->assertEqual($result, $expected); + + $result = $this->Time->i18nFormat($time, '%c'); + $expected = 'mié 13 ene 2010 13:59:28 ' . strftime('%Z', $time); + $this->assertEqual($result, $expected); + + $result = $this->Time->i18nFormat($time, 'Time is %r, and date is %x'); + $expected = 'Time is 01:59:28 PM, and date is 13/01/10'; + $this->assertEqual($result, $expected); + $result = $this->Time->i18nFormat('invalid date', '%x', 'Date invalid'); $expected = 'Date invalid'; $this->assertEqual($result, $expected); diff --git a/cake/tests/cases/libs/view/helpers/xml.test.php b/cake/tests/cases/libs/view/helpers/xml.test.php index d89cc98..be2df89 100755 --- a/cake/tests/cases/libs/view/helpers/xml.test.php +++ b/cake/tests/cases/libs/view/helpers/xml.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/media.test.php b/cake/tests/cases/libs/view/media.test.php index b1f81b9..ed72419 100755 --- a/cake/tests/cases/libs/view/media.test.php +++ b/cake/tests/cases/libs/view/media.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/view/theme.test.php b/cake/tests/cases/libs/view/theme.test.php index f2a4df9..15d2d5d 100755 --- a/cake/tests/cases/libs/view/theme.test.php +++ b/cake/tests/cases/libs/view/theme.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/view/view.test.php b/cake/tests/cases/libs/view/view.test.php index d82a405..3746d88 100755 --- a/cake/tests/cases/libs/view/view.test.php +++ b/cake/tests/cases/libs/view/view.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -474,10 +474,10 @@ function testAddInlineScripts() { function testElement() { $result = $this->View->element('test_element'); $this->assertEqual($result, 'this is the test element'); - + $result = $this->View->element('plugin_element', array('plugin' => 'test_plugin')); $this->assertEqual($result, 'this is the plugin element using params[plugin]'); - + $this->View->plugin = 'test_plugin'; $result = $this->View->element('test_plugin_element'); $this->assertEqual($result, 'this is the test set using View::$plugin plugin element'); @@ -487,6 +487,17 @@ function testElement() { $this->assertPattern('/non_existant_element/', $result); } +/** + * Test that alternate extensions work with duplicated elements. + * + * @return void + */ + function testElementExtensions() { + $this->View->ext = '.xml'; + $result = $this->View->element('test_element'); + $this->assertEqual(trim($result), '

test element

'); + } + /** * test that additional element viewVars don't get overwritten with helpers. * @@ -546,6 +557,14 @@ function testElementCache() { } $this->assertTrue($cached); + $cached = false; + $result = $View->element($element, array('cache' => true, 'param' => 'val')); + if (file_exists(CACHE . 'views' . DS . 'element_cache_param_'.$element)) { + $cached = true; + unlink(CACHE . 'views' . DS . 'element_cache_param_'.$element); + } + $this->assertTrue($cached); + $cached = false; $result = $View->element($element, array('cache'=>'+1 second', 'other_param'=> true, 'anotherParam'=> true)); if (file_exists(CACHE . 'views' . DS . 'element_cache_other_param_anotherParam_'.$element)) { @@ -751,13 +770,12 @@ function testRenderLayoutWithMockCacheHelper() { Configure::write('Cache.check', true); $Controller =& new ViewPostsController(); - $Controller->cacheAction = '1 day'; + $Controller->cacheAction = '+1 day'; $View =& new View($Controller); $View->loaded['cache'] = new ViewTestMockCacheHelper(); $View->loaded['cache']->expectCallCount('cache', 2); - $result = $View->render('index'); - $this->assertPattern('/posts index/', $result); + $View->render('index'); Configure::write('Cache.check', $_check); } @@ -937,7 +955,7 @@ function testSet() { $View->set(array('key3' => 'value3')); $this->assertIdentical($View->getVar('key3'), 'value3'); - + $View->viewVars = array(); $View->set(array(3 => 'three', 4 => 'four')); $View->set(array(1 => 'one', 2 => 'two')); @@ -960,7 +978,7 @@ function testEntityReference() { $View->association = 'Comment'; $View->field = 'user_id'; $this->assertEqual($View->entity(), array('Comment', 'user_id')); - + $View->model = 0; $View->association = null; $View->field = 'Node'; @@ -968,7 +986,7 @@ function testEntityReference() { $View->entityPath = '0.Node.title'; $expected = array(0, 'Node', 'title'); $this->assertEqual($View->entity(), $expected); - + $View->model = 'HelperTestTag'; $View->field = 'HelperTestTag'; $View->modelId = null; diff --git a/cake/tests/cases/libs/xml.test.php b/cake/tests/cases/libs/xml.test.php index a928592..baa007b 100755 --- a/cake/tests/cases/libs/xml.test.php +++ b/cake/tests/cases/libs/xml.test.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/fixtures/account_fixture.php b/cake/tests/fixtures/account_fixture.php index a60c0ab..4a67e7e 100755 --- a/cake/tests/fixtures/account_fixture.php +++ b/cake/tests/fixtures/account_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/aco_action_fixture.php b/cake/tests/fixtures/aco_action_fixture.php index 6d2cfb6..6c41ada 100755 --- a/cake/tests/fixtures/aco_action_fixture.php +++ b/cake/tests/fixtures/aco_action_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/aco_fixture.php b/cake/tests/fixtures/aco_fixture.php index dd50624..0cb61c0 100755 --- a/cake/tests/fixtures/aco_fixture.php +++ b/cake/tests/fixtures/aco_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/aco_two_fixture.php b/cake/tests/fixtures/aco_two_fixture.php index f06679b..30018ca 100755 --- a/cake/tests/fixtures/aco_two_fixture.php +++ b/cake/tests/fixtures/aco_two_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/advertisement_fixture.php b/cake/tests/fixtures/advertisement_fixture.php index d750712..8349158 100755 --- a/cake/tests/fixtures/advertisement_fixture.php +++ b/cake/tests/fixtures/advertisement_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/another_article_fixture.php b/cake/tests/fixtures/another_article_fixture.php index e68bb5a..d8973a7 100755 --- a/cake/tests/fixtures/another_article_fixture.php +++ b/cake/tests/fixtures/another_article_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/apple_fixture.php b/cake/tests/fixtures/apple_fixture.php index 8accc22..e5df731 100755 --- a/cake/tests/fixtures/apple_fixture.php +++ b/cake/tests/fixtures/apple_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/aro_fixture.php b/cake/tests/fixtures/aro_fixture.php index 2c82fb2..453254c 100755 --- a/cake/tests/fixtures/aro_fixture.php +++ b/cake/tests/fixtures/aro_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/aro_two_fixture.php b/cake/tests/fixtures/aro_two_fixture.php index bedabb1..54a992b 100755 --- a/cake/tests/fixtures/aro_two_fixture.php +++ b/cake/tests/fixtures/aro_two_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/aros_aco_fixture.php b/cake/tests/fixtures/aros_aco_fixture.php index 3d3bf84..2b61260 100755 --- a/cake/tests/fixtures/aros_aco_fixture.php +++ b/cake/tests/fixtures/aros_aco_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/aros_aco_two_fixture.php b/cake/tests/fixtures/aros_aco_two_fixture.php index da36208..142b211 100755 --- a/cake/tests/fixtures/aros_aco_two_fixture.php +++ b/cake/tests/fixtures/aros_aco_two_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/article_featured_fixture.php b/cake/tests/fixtures/article_featured_fixture.php index b8e6845..342e6a6 100755 --- a/cake/tests/fixtures/article_featured_fixture.php +++ b/cake/tests/fixtures/article_featured_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/article_featureds_tags_fixture.php b/cake/tests/fixtures/article_featureds_tags_fixture.php index 03838b4..7f6ac71 100755 --- a/cake/tests/fixtures/article_featureds_tags_fixture.php +++ b/cake/tests/fixtures/article_featureds_tags_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/article_fixture.php b/cake/tests/fixtures/article_fixture.php index 7991aff..da8c973 100755 --- a/cake/tests/fixtures/article_fixture.php +++ b/cake/tests/fixtures/article_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/articles_tag_fixture.php b/cake/tests/fixtures/articles_tag_fixture.php index 91548f3..febe1c6 100755 --- a/cake/tests/fixtures/articles_tag_fixture.php +++ b/cake/tests/fixtures/articles_tag_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/attachment_fixture.php b/cake/tests/fixtures/attachment_fixture.php index ea23e32..1453b4c 100755 --- a/cake/tests/fixtures/attachment_fixture.php +++ b/cake/tests/fixtures/attachment_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/auth_user_custom_field_fixture.php b/cake/tests/fixtures/auth_user_custom_field_fixture.php index 5b3fa78..1afa3de 100755 --- a/cake/tests/fixtures/auth_user_custom_field_fixture.php +++ b/cake/tests/fixtures/auth_user_custom_field_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/auth_user_fixture.php b/cake/tests/fixtures/auth_user_fixture.php index b3b55d5..95733da 100755 --- a/cake/tests/fixtures/auth_user_fixture.php +++ b/cake/tests/fixtures/auth_user_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/author_fixture.php b/cake/tests/fixtures/author_fixture.php index 12c16c0..38f15f5 100755 --- a/cake/tests/fixtures/author_fixture.php +++ b/cake/tests/fixtures/author_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/basket_fixture.php b/cake/tests/fixtures/basket_fixture.php index 30eaedf..2515489 100755 --- a/cake/tests/fixtures/basket_fixture.php +++ b/cake/tests/fixtures/basket_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/bid_fixture.php b/cake/tests/fixtures/bid_fixture.php index 9861de3..edccaa4 100755 --- a/cake/tests/fixtures/bid_fixture.php +++ b/cake/tests/fixtures/bid_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/bidding_fixture.php b/cake/tests/fixtures/bidding_fixture.php new file mode 100644 index 0000000..41d5e1a --- /dev/null +++ b/cake/tests/fixtures/bidding_fixture.php @@ -0,0 +1,61 @@ + + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.fixtures + * @since CakePHP(tm) v 1.3.14 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + +/** + * Short description for class. + * + * @package cake + * @subpackage cake.tests.fixtures + */ +class BiddingFixture extends CakeTestFixture { + +/** + * name property + * + * @var string 'Bidding' + * @access public + */ + var $name = 'Bidding'; + +/** + * fields property + * + * @var array + * @access public + */ + var $fields = array( + 'id' => array('type' => 'integer', 'key' => 'primary'), + 'bid' => array('type' => 'string', 'null' => false), + 'name' => array('type' => 'string', 'null' => false) + ); + +/** + * records property + * + * @var array + * @access public + */ + var $records = array( + array('bid' => 'One', 'name' => 'Bid 1'), + array('bid' => 'Two', 'name' => 'Bid 2'), + array('bid' => 'Three', 'name' => 'Bid 3'), + array('bid' => 'Five', 'name' => 'Bid 5') + ); +} diff --git a/cake/tests/fixtures/bidding_message_fixture.php b/cake/tests/fixtures/bidding_message_fixture.php new file mode 100644 index 0000000..e867a68 --- /dev/null +++ b/cake/tests/fixtures/bidding_message_fixture.php @@ -0,0 +1,60 @@ + + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.fixtures + * @since CakePHP(tm) v 1.3.14 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + +/** + * Short description for class. + * + * @package cake + * @subpackage cake.tests.fixtures + */ +class BiddingMessageFixture extends CakeTestFixture { + +/** + * name property + * + * @var string 'BiddingMessage' + * @access public + */ + var $name = 'BiddingMessage'; + +/** + * fields property + * + * @var array + * @access public + */ + var $fields = array( + 'bidding' => array('type' => 'string', 'null' => false, 'key' => 'primary'), + 'name' => array('type' => 'string', 'null' => false) + ); + +/** + * records property + * + * @var array + * @access public + */ + var $records = array( + array('bidding' => 'One', 'name' => 'Message 1'), + array('bidding' => 'Two', 'name' => 'Message 2'), + array('bidding' => 'Three', 'name' => 'Message 3'), + array('bidding' => 'Four', 'name' => 'Message 4') + ); +} diff --git a/cake/tests/fixtures/binary_test_fixture.php b/cake/tests/fixtures/binary_test_fixture.php index ec7f5a6..08f158e 100755 --- a/cake/tests/fixtures/binary_test_fixture.php +++ b/cake/tests/fixtures/binary_test_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/book_fixture.php b/cake/tests/fixtures/book_fixture.php index 213a472..d5aba5e 100755 --- a/cake/tests/fixtures/book_fixture.php +++ b/cake/tests/fixtures/book_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/cache_test_model_fixture.php b/cake/tests/fixtures/cache_test_model_fixture.php index 2da56a0..144363d 100755 --- a/cake/tests/fixtures/cache_test_model_fixture.php +++ b/cake/tests/fixtures/cache_test_model_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/callback_fixture.php b/cake/tests/fixtures/callback_fixture.php index 9ebb99c..003b668 100755 --- a/cake/tests/fixtures/callback_fixture.php +++ b/cake/tests/fixtures/callback_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/category_fixture.php b/cake/tests/fixtures/category_fixture.php index a579478..536a93f 100755 --- a/cake/tests/fixtures/category_fixture.php +++ b/cake/tests/fixtures/category_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/category_thread_fixture.php b/cake/tests/fixtures/category_thread_fixture.php index b9fc5af..f00de13 100755 --- a/cake/tests/fixtures/category_thread_fixture.php +++ b/cake/tests/fixtures/category_thread_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/cd_fixture.php b/cake/tests/fixtures/cd_fixture.php index d471efc..6973e95 100755 --- a/cake/tests/fixtures/cd_fixture.php +++ b/cake/tests/fixtures/cd_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/comment_fixture.php b/cake/tests/fixtures/comment_fixture.php index bc2fdaf..525325c 100755 --- a/cake/tests/fixtures/comment_fixture.php +++ b/cake/tests/fixtures/comment_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/content_account_fixture.php b/cake/tests/fixtures/content_account_fixture.php index 3187ee4..b2b3d23 100755 --- a/cake/tests/fixtures/content_account_fixture.php +++ b/cake/tests/fixtures/content_account_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/content_fixture.php b/cake/tests/fixtures/content_fixture.php index 1f17932..6a05670 100755 --- a/cake/tests/fixtures/content_fixture.php +++ b/cake/tests/fixtures/content_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/counter_cache_post_fixture.php b/cake/tests/fixtures/counter_cache_post_fixture.php index 86191af..9d3dc92 100755 --- a/cake/tests/fixtures/counter_cache_post_fixture.php +++ b/cake/tests/fixtures/counter_cache_post_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php b/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php index 421ace4..26a0edc 100755 --- a/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php +++ b/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/counter_cache_user_fixture.php b/cake/tests/fixtures/counter_cache_user_fixture.php index 542b975..b8bf7f7 100755 --- a/cake/tests/fixtures/counter_cache_user_fixture.php +++ b/cake/tests/fixtures/counter_cache_user_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php b/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php index c25ef2b..3055f45 100755 --- a/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php +++ b/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/data_test_fixture.php b/cake/tests/fixtures/data_test_fixture.php index 0a81403..5426a43 100755 --- a/cake/tests/fixtures/data_test_fixture.php +++ b/cake/tests/fixtures/data_test_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/datatype_fixture.php b/cake/tests/fixtures/datatype_fixture.php index f027769..6feb94d 100755 --- a/cake/tests/fixtures/datatype_fixture.php +++ b/cake/tests/fixtures/datatype_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/dependency_fixture.php b/cake/tests/fixtures/dependency_fixture.php index 4872e5a..848d788 100755 --- a/cake/tests/fixtures/dependency_fixture.php +++ b/cake/tests/fixtures/dependency_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/device_fixture.php b/cake/tests/fixtures/device_fixture.php index 5b255fe..f80914a 100755 --- a/cake/tests/fixtures/device_fixture.php +++ b/cake/tests/fixtures/device_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/device_type_category_fixture.php b/cake/tests/fixtures/device_type_category_fixture.php index 5c81334..9b51f4f 100755 --- a/cake/tests/fixtures/device_type_category_fixture.php +++ b/cake/tests/fixtures/device_type_category_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/device_type_fixture.php b/cake/tests/fixtures/device_type_fixture.php index 501b4f7..ad0fde8 100755 --- a/cake/tests/fixtures/device_type_fixture.php +++ b/cake/tests/fixtures/device_type_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/document_directory_fixture.php b/cake/tests/fixtures/document_directory_fixture.php index cdff1f5..bfb4fe6 100755 --- a/cake/tests/fixtures/document_directory_fixture.php +++ b/cake/tests/fixtures/document_directory_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/document_fixture.php b/cake/tests/fixtures/document_fixture.php index 172ec68..74e189e 100755 --- a/cake/tests/fixtures/document_fixture.php +++ b/cake/tests/fixtures/document_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/exterior_type_category_fixture.php b/cake/tests/fixtures/exterior_type_category_fixture.php index 07a7150..51826d6 100755 --- a/cake/tests/fixtures/exterior_type_category_fixture.php +++ b/cake/tests/fixtures/exterior_type_category_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/feature_set_fixture.php b/cake/tests/fixtures/feature_set_fixture.php index 49e6ea5..59dabf3 100755 --- a/cake/tests/fixtures/feature_set_fixture.php +++ b/cake/tests/fixtures/feature_set_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/featured_fixture.php b/cake/tests/fixtures/featured_fixture.php index 40376a2..cbd7f63 100755 --- a/cake/tests/fixtures/featured_fixture.php +++ b/cake/tests/fixtures/featured_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/film_file_fixture.php b/cake/tests/fixtures/film_file_fixture.php index f428145..dd11c3b 100755 --- a/cake/tests/fixtures/film_file_fixture.php +++ b/cake/tests/fixtures/film_file_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/flag_tree_fixture.php b/cake/tests/fixtures/flag_tree_fixture.php index dfd2157..633b608 100755 --- a/cake/tests/fixtures/flag_tree_fixture.php +++ b/cake/tests/fixtures/flag_tree_fixture.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/fruit_fixture.php b/cake/tests/fixtures/fruit_fixture.php index fe27e3f..7b66cf3 100755 --- a/cake/tests/fixtures/fruit_fixture.php +++ b/cake/tests/fixtures/fruit_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/fruits_uuid_tag_fixture.php b/cake/tests/fixtures/fruits_uuid_tag_fixture.php index a8bf42d..869d5d2 100755 --- a/cake/tests/fixtures/fruits_uuid_tag_fixture.php +++ b/cake/tests/fixtures/fruits_uuid_tag_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/group_update_all_fixture.php b/cake/tests/fixtures/group_update_all_fixture.php index f0b1925..a075aab 100755 --- a/cake/tests/fixtures/group_update_all_fixture.php +++ b/cake/tests/fixtures/group_update_all_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/home_fixture.php b/cake/tests/fixtures/home_fixture.php index be9b1d4..9f6778e 100755 --- a/cake/tests/fixtures/home_fixture.php +++ b/cake/tests/fixtures/home_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/image_fixture.php b/cake/tests/fixtures/image_fixture.php index 3bfa2f7..ed70210 100755 --- a/cake/tests/fixtures/image_fixture.php +++ b/cake/tests/fixtures/image_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/item_fixture.php b/cake/tests/fixtures/item_fixture.php index 3473bc2..9575625 100755 --- a/cake/tests/fixtures/item_fixture.php +++ b/cake/tests/fixtures/item_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/items_portfolio_fixture.php b/cake/tests/fixtures/items_portfolio_fixture.php index 8162daa..428e01a 100755 --- a/cake/tests/fixtures/items_portfolio_fixture.php +++ b/cake/tests/fixtures/items_portfolio_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/join_a_b_fixture.php b/cake/tests/fixtures/join_a_b_fixture.php index 0ff5cfc..2425059 100755 --- a/cake/tests/fixtures/join_a_b_fixture.php +++ b/cake/tests/fixtures/join_a_b_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/join_a_c_fixture.php b/cake/tests/fixtures/join_a_c_fixture.php index 9ff5fdf..b222076 100755 --- a/cake/tests/fixtures/join_a_c_fixture.php +++ b/cake/tests/fixtures/join_a_c_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/join_a_fixture.php b/cake/tests/fixtures/join_a_fixture.php index fcd3d01..eee58cc 100755 --- a/cake/tests/fixtures/join_a_fixture.php +++ b/cake/tests/fixtures/join_a_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/join_b_fixture.php b/cake/tests/fixtures/join_b_fixture.php index 2d5472b..6749662 100755 --- a/cake/tests/fixtures/join_b_fixture.php +++ b/cake/tests/fixtures/join_b_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/join_c_fixture.php b/cake/tests/fixtures/join_c_fixture.php index dba3efe..92c922c 100755 --- a/cake/tests/fixtures/join_c_fixture.php +++ b/cake/tests/fixtures/join_c_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/join_thing_fixture.php b/cake/tests/fixtures/join_thing_fixture.php index 98402c6..81c3612 100755 --- a/cake/tests/fixtures/join_thing_fixture.php +++ b/cake/tests/fixtures/join_thing_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/message_fixture.php b/cake/tests/fixtures/message_fixture.php index a553783..5989d25 100755 --- a/cake/tests/fixtures/message_fixture.php +++ b/cake/tests/fixtures/message_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/my_categories_my_products_fixture.php b/cake/tests/fixtures/my_categories_my_products_fixture.php index 9685e23..ce301bb 100755 --- a/cake/tests/fixtures/my_categories_my_products_fixture.php +++ b/cake/tests/fixtures/my_categories_my_products_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/my_categories_my_users_fixture.php b/cake/tests/fixtures/my_categories_my_users_fixture.php index 7c72b2e..525edf5 100755 --- a/cake/tests/fixtures/my_categories_my_users_fixture.php +++ b/cake/tests/fixtures/my_categories_my_users_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/my_category_fixture.php b/cake/tests/fixtures/my_category_fixture.php index 9796e3a..2e4e8f2 100755 --- a/cake/tests/fixtures/my_category_fixture.php +++ b/cake/tests/fixtures/my_category_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/my_product_fixture.php b/cake/tests/fixtures/my_product_fixture.php index 0bf7b84..8f8d3a0 100755 --- a/cake/tests/fixtures/my_product_fixture.php +++ b/cake/tests/fixtures/my_product_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/my_user_fixture.php b/cake/tests/fixtures/my_user_fixture.php index 85fdebf..1e6f97c 100755 --- a/cake/tests/fixtures/my_user_fixture.php +++ b/cake/tests/fixtures/my_user_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/node_fixture.php b/cake/tests/fixtures/node_fixture.php index 98de4d0..dde2b3c 100755 --- a/cake/tests/fixtures/node_fixture.php +++ b/cake/tests/fixtures/node_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/number_tree_fixture.php b/cake/tests/fixtures/number_tree_fixture.php index 89d171a..dc645d1 100755 --- a/cake/tests/fixtures/number_tree_fixture.php +++ b/cake/tests/fixtures/number_tree_fixture.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/number_tree_two_fixture.php b/cake/tests/fixtures/number_tree_two_fixture.php index e8e8ab8..d11104d 100755 --- a/cake/tests/fixtures/number_tree_two_fixture.php +++ b/cake/tests/fixtures/number_tree_two_fixture.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/numeric_article_fixture.php b/cake/tests/fixtures/numeric_article_fixture.php index 7b18f16..91f525c 100755 --- a/cake/tests/fixtures/numeric_article_fixture.php +++ b/cake/tests/fixtures/numeric_article_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/overall_favorite_fixture.php b/cake/tests/fixtures/overall_favorite_fixture.php index 0b4a364..426df72 100755 --- a/cake/tests/fixtures/overall_favorite_fixture.php +++ b/cake/tests/fixtures/overall_favorite_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/person_fixture.php b/cake/tests/fixtures/person_fixture.php index 7dc151d..c47043b 100755 --- a/cake/tests/fixtures/person_fixture.php +++ b/cake/tests/fixtures/person_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/portfolio_fixture.php b/cake/tests/fixtures/portfolio_fixture.php index 5fcbf16..31b9ea7 100755 --- a/cake/tests/fixtures/portfolio_fixture.php +++ b/cake/tests/fixtures/portfolio_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/post_fixture.php b/cake/tests/fixtures/post_fixture.php index d1e36fa..4e39638 100755 --- a/cake/tests/fixtures/post_fixture.php +++ b/cake/tests/fixtures/post_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/posts_tag_fixture.php b/cake/tests/fixtures/posts_tag_fixture.php index 1266e1a..424f31b 100755 --- a/cake/tests/fixtures/posts_tag_fixture.php +++ b/cake/tests/fixtures/posts_tag_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/prefix_test_fixture.php b/cake/tests/fixtures/prefix_test_fixture.php index c980be8..ae70182 100755 --- a/cake/tests/fixtures/prefix_test_fixture.php +++ b/cake/tests/fixtures/prefix_test_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/primary_model_fixture.php b/cake/tests/fixtures/primary_model_fixture.php index 4b3ffa7..dce6917 100755 --- a/cake/tests/fixtures/primary_model_fixture.php +++ b/cake/tests/fixtures/primary_model_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/product_fixture.php b/cake/tests/fixtures/product_fixture.php index 017d267..f919f8c 100755 --- a/cake/tests/fixtures/product_fixture.php +++ b/cake/tests/fixtures/product_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/product_update_all_fixture.php b/cake/tests/fixtures/product_update_all_fixture.php index 9c47ce5..7437523 100755 --- a/cake/tests/fixtures/product_update_all_fixture.php +++ b/cake/tests/fixtures/product_update_all_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/project_fixture.php b/cake/tests/fixtures/project_fixture.php index 7a912cd..3813b81 100755 --- a/cake/tests/fixtures/project_fixture.php +++ b/cake/tests/fixtures/project_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/sample_fixture.php b/cake/tests/fixtures/sample_fixture.php index 451053d..576c036 100755 --- a/cake/tests/fixtures/sample_fixture.php +++ b/cake/tests/fixtures/sample_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/secondary_model_fixture.php b/cake/tests/fixtures/secondary_model_fixture.php index 9cb7961..fff6ab2 100755 --- a/cake/tests/fixtures/secondary_model_fixture.php +++ b/cake/tests/fixtures/secondary_model_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/session_fixture.php b/cake/tests/fixtures/session_fixture.php index 669107e..ea0cae0 100755 --- a/cake/tests/fixtures/session_fixture.php +++ b/cake/tests/fixtures/session_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/something_else_fixture.php b/cake/tests/fixtures/something_else_fixture.php index f18d591..82f86c3 100755 --- a/cake/tests/fixtures/something_else_fixture.php +++ b/cake/tests/fixtures/something_else_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/something_fixture.php b/cake/tests/fixtures/something_fixture.php index 584ffbd..853adf5 100755 --- a/cake/tests/fixtures/something_fixture.php +++ b/cake/tests/fixtures/something_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/stories_tag_fixture.php b/cake/tests/fixtures/stories_tag_fixture.php index e245b2f..3a1a5f3 100755 --- a/cake/tests/fixtures/stories_tag_fixture.php +++ b/cake/tests/fixtures/stories_tag_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/story_fixture.php b/cake/tests/fixtures/story_fixture.php index 1b38135..0d48ca4 100755 --- a/cake/tests/fixtures/story_fixture.php +++ b/cake/tests/fixtures/story_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/syfile_fixture.php b/cake/tests/fixtures/syfile_fixture.php index cbdbeb1..36471d7 100755 --- a/cake/tests/fixtures/syfile_fixture.php +++ b/cake/tests/fixtures/syfile_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/tag_fixture.php b/cake/tests/fixtures/tag_fixture.php index 4714c52..de5aa8f 100755 --- a/cake/tests/fixtures/tag_fixture.php +++ b/cake/tests/fixtures/tag_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/test_plugin_article_fixture.php b/cake/tests/fixtures/test_plugin_article_fixture.php index 242f455..75f4bc5 100755 --- a/cake/tests/fixtures/test_plugin_article_fixture.php +++ b/cake/tests/fixtures/test_plugin_article_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/test_plugin_comment_fixture.php b/cake/tests/fixtures/test_plugin_comment_fixture.php index 0dc8fba..ccb35ea 100755 --- a/cake/tests/fixtures/test_plugin_comment_fixture.php +++ b/cake/tests/fixtures/test_plugin_comment_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/the_paper_monkies_fixture.php b/cake/tests/fixtures/the_paper_monkies_fixture.php index 026e30b..1701ac9 100755 --- a/cake/tests/fixtures/the_paper_monkies_fixture.php +++ b/cake/tests/fixtures/the_paper_monkies_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/thread_fixture.php b/cake/tests/fixtures/thread_fixture.php index 12d13f9..4959a5b 100755 --- a/cake/tests/fixtures/thread_fixture.php +++ b/cake/tests/fixtures/thread_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/translate_article_fixture.php b/cake/tests/fixtures/translate_article_fixture.php index ee4de78..3e51b2c 100755 --- a/cake/tests/fixtures/translate_article_fixture.php +++ b/cake/tests/fixtures/translate_article_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/translate_fixture.php b/cake/tests/fixtures/translate_fixture.php index 0b6924f..6d76417 100755 --- a/cake/tests/fixtures/translate_fixture.php +++ b/cake/tests/fixtures/translate_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/translate_table_fixture.php b/cake/tests/fixtures/translate_table_fixture.php index e8d7264..201391a 100755 --- a/cake/tests/fixtures/translate_table_fixture.php +++ b/cake/tests/fixtures/translate_table_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/translate_with_prefix_fixture.php b/cake/tests/fixtures/translate_with_prefix_fixture.php index 4474c37..fe4e196 100755 --- a/cake/tests/fixtures/translate_with_prefix_fixture.php +++ b/cake/tests/fixtures/translate_with_prefix_fixture.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/translated_article_fixture.php b/cake/tests/fixtures/translated_article_fixture.php index faee47e..7980023 100755 --- a/cake/tests/fixtures/translated_article_fixture.php +++ b/cake/tests/fixtures/translated_article_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/translated_item_fixture.php b/cake/tests/fixtures/translated_item_fixture.php index 2508d88..74ce3cb 100755 --- a/cake/tests/fixtures/translated_item_fixture.php +++ b/cake/tests/fixtures/translated_item_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures @@ -42,6 +42,7 @@ class TranslatedItemFixture extends CakeTestFixture { */ var $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), + 'translated_article_id' => array('type' => 'integer'), 'slug' => array('type' => 'string', 'null' => false) ); @@ -52,8 +53,8 @@ class TranslatedItemFixture extends CakeTestFixture { * @access public */ var $records = array( - array('slug' => 'first_translated'), - array('slug' => 'second_translated'), - array('slug' => 'third_translated') + array('translated_article_id' => 1, 'slug' => 'first_translated'), + array('translated_article_id' => 1, 'slug' => 'second_translated'), + array('translated_article_id' => 1, 'slug' => 'third_translated') ); } diff --git a/cake/tests/fixtures/unconventional_tree_fixture.php b/cake/tests/fixtures/unconventional_tree_fixture.php index 179430c..89f9bd4 100755 --- a/cake/tests/fixtures/unconventional_tree_fixture.php +++ b/cake/tests/fixtures/unconventional_tree_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/underscore_field_fixture.php b/cake/tests/fixtures/underscore_field_fixture.php index 559ed7d..ab98edf 100755 --- a/cake/tests/fixtures/underscore_field_fixture.php +++ b/cake/tests/fixtures/underscore_field_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/user_fixture.php b/cake/tests/fixtures/user_fixture.php index 2a1e853..841bc57 100755 --- a/cake/tests/fixtures/user_fixture.php +++ b/cake/tests/fixtures/user_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/uuid_fixture.php b/cake/tests/fixtures/uuid_fixture.php index 683c714..3a9ad2e 100755 --- a/cake/tests/fixtures/uuid_fixture.php +++ b/cake/tests/fixtures/uuid_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/uuid_tag_fixture.php b/cake/tests/fixtures/uuid_tag_fixture.php index 3b16fad..c60ba1d 100755 --- a/cake/tests/fixtures/uuid_tag_fixture.php +++ b/cake/tests/fixtures/uuid_tag_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/uuid_tree_fixture.php b/cake/tests/fixtures/uuid_tree_fixture.php index 894a50b..07d977c 100755 --- a/cake/tests/fixtures/uuid_tree_fixture.php +++ b/cake/tests/fixtures/uuid_tree_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/uuiditem_fixture.php b/cake/tests/fixtures/uuiditem_fixture.php index de0b568..bfbc9c7 100755 --- a/cake/tests/fixtures/uuiditem_fixture.php +++ b/cake/tests/fixtures/uuiditem_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php b/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php index 2eeb05d..18cebf0 100755 --- a/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php +++ b/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php b/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php index bde4903..6520197 100755 --- a/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php +++ b/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/fixtures/uuidportfolio_fixture.php b/cake/tests/fixtures/uuidportfolio_fixture.php index 9d38cb4..a542d38 100755 --- a/cake/tests/fixtures/uuidportfolio_fixture.php +++ b/cake/tests/fixtures/uuidportfolio_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures diff --git a/cake/tests/groups/acl.group.php b/cake/tests/groups/acl.group.php index 790d228..3312212 100755 --- a/cake/tests/groups/acl.group.php +++ b/cake/tests/groups/acl.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/bake.group.php b/cake/tests/groups/bake.group.php index b9a7406..dc3e8aa 100755 --- a/cake/tests/groups/bake.group.php +++ b/cake/tests/groups/bake.group.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/behaviors.group.php b/cake/tests/groups/behaviors.group.php index fbd5fb4..cff928d 100755 --- a/cake/tests/groups/behaviors.group.php +++ b/cake/tests/groups/behaviors.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/cache.group.php b/cake/tests/groups/cache.group.php index aaf8a1c..cbfb99b 100755 --- a/cake/tests/groups/cache.group.php +++ b/cake/tests/groups/cache.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/components.group.php b/cake/tests/groups/components.group.php index 56f446a..4e3ee4d 100755 --- a/cake/tests/groups/components.group.php +++ b/cake/tests/groups/components.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/configure.group.php b/cake/tests/groups/configure.group.php index d8cfda5..be1ef8f 100755 --- a/cake/tests/groups/configure.group.php +++ b/cake/tests/groups/configure.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/console.group.php b/cake/tests/groups/console.group.php index 0dd0020..b3677e6 100755 --- a/cake/tests/groups/console.group.php +++ b/cake/tests/groups/console.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/controller.group.php b/cake/tests/groups/controller.group.php index 1e0fb4a..38c5912 100755 --- a/cake/tests/groups/controller.group.php +++ b/cake/tests/groups/controller.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/database.group.php b/cake/tests/groups/database.group.php index f9a848a..1bb2a67 100755 --- a/cake/tests/groups/database.group.php +++ b/cake/tests/groups/database.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/helpers.group.php b/cake/tests/groups/helpers.group.php index 66a6152..8b1d495 100755 --- a/cake/tests/groups/helpers.group.php +++ b/cake/tests/groups/helpers.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/i18n.group.php b/cake/tests/groups/i18n.group.php index 6a48089..5fe3c82 100755 --- a/cake/tests/groups/i18n.group.php +++ b/cake/tests/groups/i18n.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/javascript.group.php b/cake/tests/groups/javascript.group.php index eb76f64..6b11f9a 100755 --- a/cake/tests/groups/javascript.group.php +++ b/cake/tests/groups/javascript.group.php @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/lib.group.php b/cake/tests/groups/lib.group.php index e025508..553d718 100755 --- a/cake/tests/groups/lib.group.php +++ b/cake/tests/groups/lib.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/model.group.php b/cake/tests/groups/model.group.php index b1d26c8..06d4fe3 100755 --- a/cake/tests/groups/model.group.php +++ b/cake/tests/groups/model.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/no_cross_contamination.group.php b/cake/tests/groups/no_cross_contamination.group.php index a82a7a1..97e31f9 100755 --- a/cake/tests/groups/no_cross_contamination.group.php +++ b/cake/tests/groups/no_cross_contamination.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/routing_system.group.php b/cake/tests/groups/routing_system.group.php index 48465f6..7c9dd33 100755 --- a/cake/tests/groups/routing_system.group.php +++ b/cake/tests/groups/routing_system.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/socket.group.php b/cake/tests/groups/socket.group.php index 2a83832..ba94695 100755 --- a/cake/tests/groups/socket.group.php +++ b/cake/tests/groups/socket.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake.tests * @subpackage cake.tests.groups diff --git a/cake/tests/groups/test_suite.group.php b/cake/tests/groups/test_suite.group.php index 281acb6..6619a42 100755 --- a/cake/tests/groups/test_suite.group.php +++ b/cake/tests/groups/test_suite.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/view.group.php b/cake/tests/groups/view.group.php index 31ade6e..745c45d 100755 --- a/cake/tests/groups/view.group.php +++ b/cake/tests/groups/view.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/xml.group.php b/cake/tests/groups/xml.group.php index 0b7c693..412a100 100755 --- a/cake/tests/groups/xml.group.php +++ b/cake/tests/groups/xml.group.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index 42931e9..28588cc 100755 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/tests/lib/cake_test_fixture.php b/cake/tests/lib/cake_test_fixture.php index 1dd2e58..9e0f007 100755 --- a/cake/tests/lib/cake_test_fixture.php +++ b/cake/tests/lib/cake_test_fixture.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/tests/lib/cake_test_model.php b/cake/tests/lib/cake_test_model.php index 3b7cf61..4861ef3 100755 --- a/cake/tests/lib/cake_test_model.php +++ b/cake/tests/lib/cake_test_model.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/tests/lib/cake_test_suite_dispatcher.php b/cake/tests/lib/cake_test_suite_dispatcher.php index 734b600..a3995b6 100755 --- a/cake/tests/lib/cake_test_suite_dispatcher.php +++ b/cake/tests/lib/cake_test_suite_dispatcher.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.tests.lib @@ -184,10 +184,10 @@ function &getReporter() { $appClass = $this->params['output'] . 'Reporter'; $appFile = APPLIBS . 'test_suite' . DS . 'reporter' . DS . $type . '_reporter.php'; - if (include_once $coreFile) { - $Reporter =& new $coreClass(null, $this->params); - } elseif (include_once $appFile) { + if (file_exists($appFile) && include_once $appFile) { $Reporter =& new $appClass(null, $this->params); + } elseif (include_once $coreFile) { + $Reporter =& new $coreClass(null, $this->params); } } return $Reporter; diff --git a/cake/tests/lib/cake_web_test_case.php b/cake/tests/lib/cake_web_test_case.php index 80c93e0..e4f947f 100755 --- a/cake/tests/lib/cake_web_test_case.php +++ b/cake/tests/lib/cake_web_test_case.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib diff --git a/cake/tests/lib/code_coverage_manager.php b/cake/tests/lib/code_coverage_manager.php index fbffd04..9e000a3 100755 --- a/cake/tests/lib/code_coverage_manager.php +++ b/cake/tests/lib/code_coverage_manager.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib diff --git a/cake/tests/lib/reporter/cake_base_reporter.php b/cake/tests/lib/reporter/cake_base_reporter.php index 10a005f..62ce0dd 100755 --- a/cake/tests/lib/reporter/cake_base_reporter.php +++ b/cake/tests/lib/reporter/cake_base_reporter.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.libs.reporter diff --git a/cake/tests/lib/reporter/cake_cli_reporter.php b/cake/tests/lib/reporter/cake_cli_reporter.php index 87155b7..dd21e41 100755 --- a/cake/tests/lib/reporter/cake_cli_reporter.php +++ b/cake/tests/lib/reporter/cake_cli_reporter.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/tests/lib/reporter/cake_html_reporter.php b/cake/tests/lib/reporter/cake_html_reporter.php index 00f24cf..10f9c0b 100755 --- a/cake/tests/lib/reporter/cake_html_reporter.php +++ b/cake/tests/lib/reporter/cake_html_reporter.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.libs.reporter diff --git a/cake/tests/lib/reporter/cake_text_reporter.php b/cake/tests/lib/reporter/cake_text_reporter.php index fca3611..707bb6b 100755 --- a/cake/tests/lib/reporter/cake_text_reporter.php +++ b/cake/tests/lib/reporter/cake_text_reporter.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.libs.reporter diff --git a/cake/tests/lib/templates/footer.php b/cake/tests/lib/templates/footer.php index fb7918c..6a64d7e 100755 --- a/cake/tests/lib/templates/footer.php +++ b/cake/tests/lib/templates/footer.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib diff --git a/cake/tests/lib/templates/header.php b/cake/tests/lib/templates/header.php index 060d4d0..68ad14e 100755 --- a/cake/tests/lib/templates/header.php +++ b/cake/tests/lib/templates/header.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib diff --git a/cake/tests/lib/templates/menu.php b/cake/tests/lib/templates/menu.php index 2ef5da7..8be7d65 100755 --- a/cake/tests/lib/templates/menu.php +++ b/cake/tests/lib/templates/menu.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib diff --git a/cake/tests/lib/templates/simpletest.php b/cake/tests/lib/templates/simpletest.php index c7a9f8e..db81e37 100755 --- a/cake/tests/lib/templates/simpletest.php +++ b/cake/tests/lib/templates/simpletest.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/tests/lib/templates/xdebug.php b/cake/tests/lib/templates/xdebug.php index 0b89d73..3f84f4e 100755 --- a/cake/tests/lib/templates/xdebug.php +++ b/cake/tests/lib/templates/xdebug.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/tests/lib/test_manager.php b/cake/tests/lib/test_manager.php index 99523e5..68882a8 100755 --- a/cake/tests/lib/test_manager.php +++ b/cake/tests/lib/test_manager.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib diff --git a/cake/tests/test_app/config/acl.ini.php b/cake/tests/test_app/config/acl.ini.php index 9300f44..f69b4fc 100755 --- a/cake/tests/test_app/config/acl.ini.php +++ b/cake/tests/test_app/config/acl.ini.php @@ -7,12 +7,12 @@ ; * PHP versions 4 and 5 ; * ; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) -; * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) ; * @link http://cakephp.org CakePHP(tm) Project ; * @package cake ; * @subpackage cake.app.config diff --git a/cake/tests/test_app/controllers/tests_apps_controller.php b/cake/tests/test_app/controllers/tests_apps_controller.php index 9f4555d..8fc2784 100755 --- a/cake/tests/test_app/controllers/tests_apps_controller.php +++ b/cake/tests/test_app/controllers/tests_apps_controller.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/controllers/tests_apps_posts_controller.php b/cake/tests/test_app/controllers/tests_apps_posts_controller.php index 305c24c..84e8a16 100755 --- a/cake/tests/test_app/controllers/tests_apps_posts_controller.php +++ b/cake/tests/test_app/controllers/tests_apps_posts_controller.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/libs/cache/test_app_cache.php b/cake/tests/test_app/libs/cache/test_app_cache.php index 799dc29..c14bd90 100755 --- a/cake/tests/test_app/libs/cache/test_app_cache.php +++ b/cake/tests/test_app/libs/cache/test_app_cache.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/libs/library.php b/cake/tests/test_app/libs/library.php index df9ab03..a620b53 100755 --- a/cake/tests/test_app/libs/library.php +++ b/cake/tests/test_app/libs/library.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/libs/log/test_app_log.php b/cake/tests/test_app/libs/log/test_app_log.php index bd075ff..f5755cb 100755 --- a/cake/tests/test_app/libs/log/test_app_log.php +++ b/cake/tests/test_app/libs/log/test_app_log.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/models/behaviors/persister_one_behavior.php b/cake/tests/test_app/models/behaviors/persister_one_behavior.php index d376e68..982a2ee 100755 --- a/cake/tests/test_app/models/behaviors/persister_one_behavior.php +++ b/cake/tests/test_app/models/behaviors/persister_one_behavior.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.test_app.models diff --git a/cake/tests/test_app/models/behaviors/persister_two_behavior.php b/cake/tests/test_app/models/behaviors/persister_two_behavior.php index fdab2c3..4d27600 100755 --- a/cake/tests/test_app/models/behaviors/persister_two_behavior.php +++ b/cake/tests/test_app/models/behaviors/persister_two_behavior.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.test_app.models diff --git a/cake/tests/test_app/models/comment.php b/cake/tests/test_app/models/comment.php index 3b245dd..db45c39 100755 --- a/cake/tests/test_app/models/comment.php +++ b/cake/tests/test_app/models/comment.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs. diff --git a/cake/tests/test_app/models/persister_one.php b/cake/tests/test_app/models/persister_one.php index 5dfc554..da22fb6 100755 --- a/cake/tests/test_app/models/persister_one.php +++ b/cake/tests/test_app/models/persister_one.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.test_app.models diff --git a/cake/tests/test_app/models/persister_two.php b/cake/tests/test_app/models/persister_two.php index ad4e6bf..2225f55 100755 --- a/cake/tests/test_app/models/persister_two.php +++ b/cake/tests/test_app/models/persister_two.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.test_app.models diff --git a/cake/tests/test_app/models/post.php b/cake/tests/test_app/models/post.php index ad12da5..3ea3d20 100755 --- a/cake/tests/test_app/models/post.php +++ b/cake/tests/test_app/models/post.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs. diff --git a/cake/tests/test_app/plugins/test_plugin/config/load.php b/cake/tests/test_app/plugins/test_plugin/config/load.php index ceb1bce..18c31ce 100755 --- a/cake/tests/test_app/plugins/test_plugin/config/load.php +++ b/cake/tests/test_app/plugins/test_plugin/config/load.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app diff --git a/cake/tests/test_app/plugins/test_plugin/config/more.load.php b/cake/tests/test_app/plugins/test_plugin/config/more.load.php index 2ca99fd..45505d9 100755 --- a/cake/tests/test_app/plugins/test_plugin/config/more.load.php +++ b/cake/tests/test_app/plugins/test_plugin/config/more.load.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app diff --git a/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php b/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php index 717d63c..dd63182 100755 --- a/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php +++ b/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php index 5130e98..0027974 100755 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php index 5cdd01d..78884e1 100755 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php index efaba4b..7c46003 100755 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php index d60f16b..39be197 100755 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php b/cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php index d025ff8..27ba60b 100755 --- a/cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php b/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php index 6074db8..cbbe95a 100755 --- a/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php b/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php index 4a66c5d..2e99157 100755 --- a/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php +++ b/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php b/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php index 33298ec..0b883ad 100755 --- a/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php +++ b/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php b/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php index c713e73..2b33422 100755 --- a/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php +++ b/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php b/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php index e12aeb8..a1ef841 100755 --- a/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php +++ b/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.test_app.models diff --git a/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php b/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php index 2648a8a..01d577a 100755 --- a/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php +++ b/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.test_app.models diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php index 1bc4c67..6a0a9a1 100755 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.tests.test_app.plugins.test_plugin diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php index d3b0437..2c80d52 100755 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakefoundation.org/projects/info/cakephp CakePHP Project * @package cake * @subpackage cake.cake.libs. diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php index 512bcab..a853e2f 100755 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php @@ -8,12 +8,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakefoundation.org/projects/info/cakephp CakePHP Project * @package cake * @subpackage cake.cake.libs. diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php index f69c413..bf5024b 100755 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php @@ -7,12 +7,12 @@ * PHP versions 4 and 5 * * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.tests.test_app.plugins.test_plugin diff --git a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php index 9433e78..59e306f 100755 --- a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php +++ b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php index 352c0c8..34d4a49 100755 --- a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php +++ b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php b/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php index fbeecd4..f2ef590 100755 --- a/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php +++ b/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.vendors.sample diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php b/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php index 6059489..5b114c7 100755 --- a/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php +++ b/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.vendors.shells diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php b/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php index 89b58bb..917b310 100755 --- a/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php +++ b/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.vendors diff --git a/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php b/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php index 4024a0d..ab50670 100755 --- a/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php +++ b/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php b/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php index b907e8e..160030a 100755 --- a/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php +++ b/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers diff --git a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php index 97d2af7..4250be9 100755 --- a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php +++ b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin_two.vendors.shells diff --git a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php index 280bd16..1ecdcd9 100755 --- a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php +++ b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin_two.vendors.shells diff --git a/cake/tests/test_app/vendors/Test/MyTest.php b/cake/tests/test_app/vendors/Test/MyTest.php index b6fdce3..776ccbc 100755 --- a/cake/tests/test_app/vendors/Test/MyTest.php +++ b/cake/tests/test_app/vendors/Test/MyTest.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.somename diff --git a/cake/tests/test_app/vendors/Test/hello.php b/cake/tests/test_app/vendors/Test/hello.php index af09f2f..d858b80 100755 --- a/cake/tests/test_app/vendors/Test/hello.php +++ b/cake/tests/test_app/vendors/Test/hello.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.Test diff --git a/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php b/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php index 6e0b0b6..6fe0eff 100755 --- a/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php +++ b/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.sample diff --git a/cake/tests/test_app/vendors/shells/sample.php b/cake/tests/test_app/vendors/shells/sample.php index 451676d..5d4b87b 100755 --- a/cake/tests/test_app/vendors/shells/sample.php +++ b/cake/tests/test_app/vendors/shells/sample.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.shells diff --git a/cake/tests/test_app/vendors/somename/some.name.php b/cake/tests/test_app/vendors/somename/some.name.php index b946257..ae8d33a 100755 --- a/cake/tests/test_app/vendors/somename/some.name.php +++ b/cake/tests/test_app/vendors/somename/some.name.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.somename diff --git a/cake/tests/test_app/vendors/welcome.php b/cake/tests/test_app/vendors/welcome.php index 80829df..6b49bc6 100755 --- a/cake/tests/test_app/vendors/welcome.php +++ b/cake/tests/test_app/vendors/welcome.php @@ -5,12 +5,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors diff --git a/cake/tests/test_app/views/elements/email/html/custom.ctp b/cake/tests/test_app/views/elements/email/html/custom.ctp index 45d9384..c94799c 100755 --- a/cake/tests/test_app/views/elements/email/html/custom.ctp +++ b/cake/tests/test_app/views/elements/email/html/custom.ctp @@ -6,13 +6,13 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @filesource - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.html diff --git a/cake/tests/test_app/views/elements/email/html/default.ctp b/cake/tests/test_app/views/elements/email/html/default.ctp index c09408c..7de3855 100755 --- a/cake/tests/test_app/views/elements/email/html/default.ctp +++ b/cake/tests/test_app/views/elements/email/html/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.html diff --git a/cake/tests/test_app/views/elements/email/text/custom.ctp b/cake/tests/test_app/views/elements/email/text/custom.ctp index 2ad7b14..c1c993d 100755 --- a/cake/tests/test_app/views/elements/email/text/custom.ctp +++ b/cake/tests/test_app/views/elements/email/text/custom.ctp @@ -6,13 +6,13 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2012, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @filesource - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://www.cakefoundation.org) * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text diff --git a/cake/tests/test_app/views/elements/email/text/default.ctp b/cake/tests/test_app/views/elements/email/text/default.ctp index 60d71c3..c1ed92d 100755 --- a/cake/tests/test_app/views/elements/email/text/default.ctp +++ b/cake/tests/test_app/views/elements/email/text/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text diff --git a/cake/tests/test_app/views/elements/email/text/wide.ctp b/cake/tests/test_app/views/elements/email/text/wide.ctp index ebc1439..3017818 100755 --- a/cake/tests/test_app/views/elements/email/text/wide.ctp +++ b/cake/tests/test_app/views/elements/email/text/wide.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text diff --git a/cake/tests/test_app/views/elements/test_element.xml b/cake/tests/test_app/views/elements/test_element.xml new file mode 100644 index 0000000..f7f3cbe --- /dev/null +++ b/cake/tests/test_app/views/elements/test_element.xml @@ -0,0 +1 @@ +

test element

diff --git a/cake/tests/test_app/views/helpers/banana.php b/cake/tests/test_app/views/helpers/banana.php index 080c1cc..e231d57 100755 --- a/cake/tests/test_app/views/helpers/banana.php +++ b/cake/tests/test_app/views/helpers/banana.php @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/tests/test_app/views/layouts/ajax.ctp b/cake/tests/test_app/views/layouts/ajax.ctp index 718f8a5..6d3693d 100755 --- a/cake/tests/test_app/views/layouts/ajax.ctp +++ b/cake/tests/test_app/views/layouts/ajax.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/tests/test_app/views/layouts/ajax2.ctp b/cake/tests/test_app/views/layouts/ajax2.ctp index c8d9400..e3e293c 100755 --- a/cake/tests/test_app/views/layouts/ajax2.ctp +++ b/cake/tests/test_app/views/layouts/ajax2.ctp @@ -6,12 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/tests/test_app/views/layouts/cache_layout.ctp b/cake/tests/test_app/views/layouts/cache_layout.ctp index ca395ac..d707f8b 100755 --- a/cake/tests/test_app/views/layouts/cache_layout.ctp +++ b/cake/tests/test_app/views/layouts/cache_layout.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/tests/test_app/views/layouts/default.ctp b/cake/tests/test_app/views/layouts/default.ctp index 1d4dbb0..b0a555f 100755 --- a/cake/tests/test_app/views/layouts/default.ctp +++ b/cake/tests/test_app/views/layouts/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages diff --git a/cake/tests/test_app/views/layouts/email/html/default.ctp b/cake/tests/test_app/views/layouts/email/html/default.ctp index f463a33..f39c4fd 100755 --- a/cake/tests/test_app/views/layouts/email/html/default.ctp +++ b/cake/tests/test_app/views/layouts/email/html/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html diff --git a/cake/tests/test_app/views/layouts/email/html/thin.ctp b/cake/tests/test_app/views/layouts/email/html/thin.ctp index 0afe6da..346008d 100755 --- a/cake/tests/test_app/views/layouts/email/html/thin.ctp +++ b/cake/tests/test_app/views/layouts/email/html/thin.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html diff --git a/cake/tests/test_app/views/layouts/email/text/default.ctp b/cake/tests/test_app/views/layouts/email/text/default.ctp index b2db4b4..27c57fd 100755 --- a/cake/tests/test_app/views/layouts/email/text/default.ctp +++ b/cake/tests/test_app/views/layouts/email/text/default.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.text diff --git a/cake/tests/test_app/views/layouts/flash.ctp b/cake/tests/test_app/views/layouts/flash.ctp index 45e8be2..5299651 100755 --- a/cake/tests/test_app/views/layouts/flash.ctp +++ b/cake/tests/test_app/views/layouts/flash.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/tests/test_app/views/layouts/multi_cache.ctp b/cake/tests/test_app/views/layouts/multi_cache.ctp index fb4e0b5..1ce65fd 100755 --- a/cake/tests/test_app/views/layouts/multi_cache.ctp +++ b/cake/tests/test_app/views/layouts/multi_cache.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts diff --git a/cake/tests/test_app/views/pages/extract.ctp b/cake/tests/test_app/views/pages/extract.ctp index e3eede1..4eed4a6 100755 --- a/cake/tests/test_app/views/pages/extract.ctp +++ b/cake/tests/test_app/views/pages/extract.ctp @@ -11,4 +11,16 @@ __dn('domain', 'You have %d new message (domain).', 'You have %d new messages (d __dn('domain', 'You deleted %d message (domain).', 'You deleted %d messages (domain).', $messages['count']); // Duplicated Message -__('Editing this Page'); \ No newline at end of file +__('Editing this Page'); + +// Multiline with comments +__('Hot features!' + . "\n - No Configuration:" // Comments will be stripped + . ' Set-up the database and let the magic begin' + . "\n - Extremely Simple:" // Comments will be stripped + . ' Just look at the name...It\'s Cake' + . "\n - Active, Friendly Community:" // Comments will be stripped + . ' Join us #cakephp on IRC. We\'d love to help you get started'); + +// This throws an error and is not parsed +__('Found ' . $count . ' new messages'); \ No newline at end of file diff --git a/cake/tests/test_app/views/posts/sequencial_nocache.ctp b/cake/tests/test_app/views/posts/sequencial_nocache.ctp index ae2c388..3c590c7 100755 --- a/cake/tests/test_app/views/posts/sequencial_nocache.ctp +++ b/cake/tests/test_app/views/posts/sequencial_nocache.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages diff --git a/cake/tests/test_app/views/posts/test_nocache_tags.ctp b/cake/tests/test_app/views/posts/test_nocache_tags.ctp index 3972bcc..78dffdb 100755 --- a/cake/tests/test_app/views/posts/test_nocache_tags.ctp +++ b/cake/tests/test_app/views/posts/test_nocache_tags.ctp @@ -4,12 +4,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages diff --git a/vendors/.DS_Store b/vendors/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/vendors/.DS_Store and /dev/null differ