mark_story
cd58fa0b61
Backport changes from #5635 to 2.x
...
In case the path passed to the File class doesn't exists, this will
cause File::$path to be set to a partial path, that is the filename
of the passed path with a slash prepended, ex with
$file = new File('/non/existent/file');
calling $file->pwd() will return/set /file, possibly causing that
file in the root to be accessed.
2015-01-11 15:20:34 -05:00
Anthony GRASSIOT
aa42b80a4d
a
/ an
typo fixes fot API
2014-07-30 22:11:03 +02:00
euromark
974ca851c2
Correct doc blocks according to cs guidelines.
...
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
ADmad
7a4244d0a6
More docblock CS fixes.
2014-05-28 22:09:54 +05:30
mark_story
2c5d96e916
Merge branch 'master' into 2.5
...
Conflicts:
lib/Cake/Model/Datasource/DboSource.php
2014-02-16 14:24:19 -05:00
mark_story
a5d50da040
Remove dead and unused code.
2014-02-11 16:38:24 -05:00
ADmad
dda6080579
Merge branch 'master' into 2.5
2013-11-19 00:27:12 +05:30
Marc Würth
7cfa0116f4
Removed "PHP 5" from file header DocBlocks
...
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
Kim Egede Jakobsen
18e0dc95dd
Remove @return from docblock (for __construct && __destruct methods)
2013-11-11 14:54:48 +01:00
Phally
9260a78ea3
Fixes last items for #1665 .
...
- Changes double quotes to single quotes.
- Documents and tests array-based string replace.
- Rewrites test case.
Rewrites the test case because the tests didn't work as well as
they should be. The test file copied itself to the tmp directory,
did some string replace stuff on it and then loaded the data to
test its contents. However in those contents were also the
expectations, so assertContains() would always see the string in
the file... even if the replacing didn't work.
Closes #1665 .
2013-10-26 14:50:42 +02:00
rooseveltrp
98e11cea5d
Adds File::replaceText().
...
Added File::replace()
Searches for a given text and replaces the text if found
Renamed File::replace() to File::replaceText()
Updated the replaceText() method to utilize File Locking
Updated File::replaceText()
1. Method now checks if the lock is not identical to null
2. Since the method uses File::read() to get the contents of the file,
there is no need for a temporary file. Removed the temporary file
creation
File::replaceText() update
Opening file with r+ mode
2013-10-26 14:05:12 +02:00
Bryan Crowe
8895405577
Rrue to True, simple typo
2013-10-04 02:06:32 -04:00
Bryan Crowe
c729b56b23
Additional grammatical corrections to File utility
2013-10-04 02:03:53 -04:00
Bryan Crowe
79c3336b7e
Updated returns in docblocks in File utility
2013-10-03 20:40:00 -04:00
mark_story
0f2d59d987
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Network/CakeResponse.php
lib/Cake/TestSuite/CakeTestCase.php
2013-08-18 23:10:08 -04:00
euromark
6cf147e8c8
unify null checks - avoid method call in favor of strict check
2013-08-16 20:12:49 +02:00
euromark
e1365336e2
avoid notice in mime()
2013-08-07 23:35:19 +02:00
ADmad
3303a2cda1
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
lib/Cake/Console/Templates/skel/Config/acl.ini.php
lib/Cake/Console/Templates/skel/Config/acl.php
lib/Cake/Console/Templates/skel/Config/bootstrap.php
lib/Cake/Console/Templates/skel/Config/core.php
lib/Cake/Console/Templates/skel/Config/database.php.default
lib/Cake/Console/Templates/skel/Config/email.php.default
lib/Cake/Console/Templates/skel/Config/routes.php
lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
lib/Cake/Console/Templates/skel/Console/cake.bat
lib/Cake/Console/Templates/skel/Console/cake.php
lib/Cake/Console/Templates/skel/Controller/AppController.php
lib/Cake/Console/Templates/skel/Controller/PagesController.php
lib/Cake/Console/Templates/skel/Model/AppModel.php
lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
lib/Cake/Console/Templates/skel/View/Pages/home.ctp
lib/Cake/Console/Templates/skel/index.php
lib/Cake/Console/Templates/skel/webroot/index.php
lib/Cake/Console/Templates/skel/webroot/test.php
2013-06-02 18:03:59 +05:30
Marc Würth
4c9f0414cb
Improved the DocBlocks and other code cleanup
...
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
mark_story
aee8b50507
Merge branch 'master' into 2.4
2013-04-15 21:48:26 -04:00
mark_story
247d836174
Remove useless reference operator.
2013-04-14 21:29:04 -04:00
ADmad
79ad8ab95a
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Utility/File.php
2013-04-14 00:05:18 +05:30
ADmad
ba56fb7064
Fixed issue where incorrect cached filesize was reported when appending to file.
2013-04-13 19:45:20 +05:30
dogmatic69
7b0e5d9375
Moved stat cache clearing into a method for consitent usage.
...
Fixes issue where incorrect cached filesize was reported when appending to file.
Thanks dogmatic69 for the patch.
2013-04-11 11:16:10 +05:30
euromark
111366d5c8
== to === and != to !== where applicable
2013-02-12 03:38:08 +01:00
Graham Weldon
66d856d883
Added extra line for referencing license file for copyright
2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4
This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
...
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
euromark
b811afbc44
double spaces to single ones
2012-12-22 23:48:15 +01:00
dogmatic69
cf8fccae96
converting $foo == null / $foo == false to !$foo
2012-09-14 18:26:30 +01:00
euromark
3945c0e6a8
rtim files
2012-07-18 03:55:29 +02:00
Jelle Henkens
f7ce5262b7
Updating mixed @param documentation to seperate list of accepted types
2012-05-21 21:55:10 +01:00
Jelle Henkens
97ebbc8e23
Fixing coding conventions
2012-05-19 16:08:40 +01:00
Rachman Chavik
74830b9b93
File::create() does not need to change umask
...
umask(0) causes all files to be created with 666 permission.
After input from jrbasso and AD7six, this was found to be an
additional code to support caching using file engine.
FileEngine has since moved to SplFile since 2.x and thus umask
juggling is not required anymore.
Refs: f9f1c4df5
2012-04-24 23:17:28 +07:00
Juan Basso
c754fb2dcb
Updated copyright to 2012.
2012-03-12 22:46:46 -04:00
mark_story
9d325fe46e
Fixing most coding standard issues in Utility/
2012-03-03 17:31:47 -05:00
euromark
e94d307ee1
code conventions
2012-02-25 19:46:05 -05:00
ADmad
389072708a
Merge branch '2.0' into 2.1
...
Conflicts:
lib/Cake/Test/Case/Model/ModelReadTest.php
lib/Cake/Utility/Debugger.php
2011-12-22 03:15:04 +05:30
mark_story
2d68e7da1e
Fix failing tests.
...
You can't use finfo on files that don't exist.
2011-12-18 23:26:57 -05:00
mark_story
f959fcefc4
Add File::mime()
...
Fixes #1051
2011-12-18 23:02:05 -05:00
Kyle Robinson Young
51f9837db4
Code standards formatting
2011-12-15 22:52:07 -08:00
mark_story
2e8498e166
Merge branch '2.0' into 2.1
...
Conflicts:
lib/Cake/Model/Datasource/Database/Postgres.php
lib/Cake/Test/Case/Console/TaskCollectionTest.php
lib/Cake/Test/Case/Model/ModelIntegrationTest.php
lib/Cake/Test/Case/Utility/ClassRegistryTest.php
lib/Cake/Utility/ClassRegistry.php
2011-12-11 22:51:40 -05:00
Kyle Robinson Young
c836ba08a3
Add/move docblocks to make text available in the API docs
2011-12-08 07:35:02 -08:00
mark_story
21cd3f00ac
Merge branch '2.0' into 2.1
...
Conflicts:
lib/Cake/Test/Case/BasicsTest.php
2011-11-19 20:40:07 -05:00
Kyle Robinson Young
53f7a716ec
Add @link to File/Folder properties
2011-11-18 11:05:30 -08:00
mark_story
fb7d931bef
Merge branch '2.0' into 2.1
...
Conflicts:
lib/Cake/Config/config.php
lib/Cake/VERSION.txt
2011-11-15 23:10:34 -05:00
Kyle Robinson Young
3248e34819
Add @link to File and Folder utilities
2011-11-14 22:40:02 -08:00
Daniel Pakuschewski
318ea27c8d
File::info() return the file size.
2011-10-22 11:01:22 -04:00
Majna
a5220fa7bb
Fixed doc block comments.
2011-10-11 00:22:23 +02:00
mark_story
efbeab6199
Merge branch '1.3' into merger
...
Conflicts:
cake/libs/controller/components/email.php
cake/tests/cases/console/libs/tasks/fixture.test.php
lib/Cake/Console/Command/Task/DbConfigTask.php
2011-09-03 00:48:09 +01:00
Juan Basso
895c10af7b
Adjusted some types in @param, @return and @var.
2011-07-31 22:57:17 -04:00