Permalink
Browse files

Merge branch 'master' of git://github.com/yiisoft/yii into user_host_…

…address
  • Loading branch information...
janisto committed Jan 28, 2014
2 parents cee55e8 + 81dea0e commit ca25bc19b8da7ede726a2c22f04d23d715d64a2b
Showing with 13,194 additions and 5,752 deletions.
  1. +1 −0 .travis.yml
  2. +74 −4 CHANGELOG
  3. +11 −1 UPGRADE
  4. +1 −1 build/commands/api/ApiModel.php
  5. +12 −13 demos/blog/protected/models/Comment.php
  6. +11 −13 demos/blog/protected/models/Lookup.php
  7. +12 −13 demos/blog/protected/models/Post.php
  8. +7 −9 demos/blog/protected/models/Tag.php
  9. +9 −10 demos/blog/protected/models/User.php
  10. +10 −8 docs/blog/ja/prototype.auth.txt
  11. +1 −1 docs/blog/ru/comment.admin.txt
  12. +1 −1 docs/blog/ru/final.future.txt
  13. +3 −3 docs/blog/ru/post.admin.txt
  14. +6 −8 docs/blog/ru/prototype.auth.txt
  15. +1 −1 docs/blog/uk/post.admin.txt
  16. +5 −8 docs/blog/uk/prototype.auth.txt
  17. +1 −1 docs/blog/uk/prototype.database.txt
  18. +1 −1 docs/blog/uk/prototype.scaffold.txt
  19. +2 −2 docs/blog/uk/start.testdrive.txt
  20. +1 −1 docs/css/main.css
  21. +1 −1 docs/guide/basics.application.txt
  22. +6 −6 docs/guide/caching.data.txt
  23. +1 −1 docs/guide/caching.overview.txt
  24. +5 −0 docs/guide/changes.txt
  25. +1 −0 docs/guide/database.ar.txt
  26. +141 −2 docs/guide/database.arr.txt
  27. +1 −1 docs/guide/database.dao.txt
  28. +3 −2 docs/guide/database.migration.txt
  29. +1 −1 docs/guide/de/quickstart.apache-nginx-config.txt
  30. +38 −0 docs/guide/extension.integration.txt
  31. +31 −38 docs/guide/fr/basics.application.txt
  32. +20 −20 docs/guide/fr/basics.best-practices.txt
  33. +46 −43 docs/guide/fr/basics.component.txt
  34. +71 −71 docs/guide/fr/basics.controller.txt
  35. +13 −17 docs/guide/fr/basics.convention.txt
  36. +4 −4 docs/guide/fr/basics.model.txt
  37. +25 −25 docs/guide/fr/basics.module.txt
  38. +26 −31 docs/guide/fr/basics.mvc.txt
  39. +7 −6 docs/guide/fr/basics.namespace.txt
  40. +29 −29 docs/guide/fr/basics.view.txt
  41. +30 −44 docs/guide/fr/caching.overview.txt
  42. +13 −14 docs/guide/fr/caching.page.txt
  43. +57 −58 docs/guide/fr/database.ar.txt
  44. +50 −50 docs/guide/fr/database.dao.txt
  45. +1 −1 docs/guide/fr/database.overview.txt
  46. +21 −20 docs/guide/fr/form.action.txt
  47. +76 −75 docs/guide/fr/form.model.txt
  48. +12 −12 docs/guide/fr/form.table.txt
  49. +14 −17 docs/guide/fr/form.view.txt
  50. +2 −2 docs/guide/fr/index.txt
  51. +219 −248 docs/guide/fr/quickstart.first-app.txt
  52. +3 −3 docs/guide/fr/quickstart.installation.txt
  53. +8 −10 docs/guide/fr/quickstart.what-is-yii.txt
  54. +1 −1 docs/guide/ja/basics.application.txt
  55. +6 −8 docs/guide/ja/caching.data.txt
  56. +6 −6 docs/guide/ja/caching.overview.txt
  57. +1 −0 docs/guide/ja/database.ar.txt
  58. +1 −1 docs/guide/ja/database.dao.txt
  59. +4 −1 docs/guide/ja/database.migration.txt
  60. +37 −0 docs/guide/ja/extension.integration.txt
  61. +7 −10 docs/guide/ja/topics.auth.txt
  62. +2 −2 docs/guide/ja/topics.i18n.txt
  63. +1 −1 docs/guide/quickstart.what-is-yii.txt
  64. +3 −2 docs/guide/ru/basics.application.txt
  65. +1 −1 docs/guide/ru/basics.workflow.txt
  66. +2 −2 docs/guide/ru/caching.data.txt
  67. +1 −0 docs/guide/ru/database.ar.txt
  68. +1 −1 docs/guide/ru/database.dao.txt
  69. +3 −2 docs/guide/ru/database.migration.txt
  70. +1 −1 docs/guide/ru/database.overview.txt
  71. +1 −1 docs/guide/ru/database.query-builder.txt
  72. +43 −0 docs/guide/ru/extension.integration.txt
  73. +1 −1 docs/guide/ru/test.fixture.txt
  74. +5 −7 docs/guide/ru/topics.auth.txt
  75. +2 −2 docs/guide/ru/topics.i18n.txt
  76. +1 −1 docs/guide/test.fixture.txt
  77. +2 −8 docs/guide/topics.auth.txt
  78. +2 −2 docs/guide/topics.i18n.txt
  79. +1 −1 docs/guide/uk/basics.application.txt
  80. +1 −1 docs/guide/uk/basics.convention.txt
  81. +2 −2 docs/guide/uk/caching.overview.txt
  82. +1 −0 docs/guide/uk/database.ar.txt
  83. +1 −1 docs/guide/uk/database.arr.txt
  84. +1 −1 docs/guide/uk/database.dao.txt
  85. +76 −29 docs/guide/uk/database.migration.txt
  86. +71 −10 docs/guide/uk/extension.integration.txt
  87. +2 −2 docs/guide/uk/form.model.txt
  88. +1 −1 docs/guide/uk/quickstart.first-app-yiic.txt
  89. +1 −1 docs/guide/uk/quickstart.first-app.txt
  90. +35 −11 docs/guide/uk/test.functional.txt
  91. +93 −36 docs/guide/uk/topics.auth.txt
  92. +2 −2 docs/guide/uk/topics.i18n.txt
  93. +3 −3 docs/guide/zh_cn/basics.component.txt
  94. +16 −5 framework/YiiBase.php
  95. +2 −2 framework/base/CApplication.php
  96. +2 −2 framework/base/CComponent.php
  97. +54 −22 framework/base/CErrorHandler.php
  98. +1 −1 framework/base/CModel.php
  99. +11 −1 framework/base/CSecurityManager.php
  100. +1 −1 framework/base/interfaces.php
  101. +3 −0 framework/caching/CApcCache.php
  102. +24 −3 framework/caching/CFileCache.php
  103. +9 −2 framework/caching/CRedisCache.php
  104. +2 −2 framework/cli/commands/MigrateCommand.php
  105. +25 −5 framework/cli/commands/ShellCommand.php
  106. +1 −1 framework/cli/views/webapp/protected/controllers/SiteController.php
  107. +2 −2 framework/console/CConsoleCommand.php
  108. +58 −29 framework/db/CDbCommand.php
  109. +4 −4 framework/db/CDbConnection.php
  110. +29 −10 framework/db/CDbMigration.php
  111. +32 −9 framework/db/ar/CActiveFinder.php
  112. +43 −22 framework/db/ar/CActiveRecord.php
  113. +1 −1 framework/db/ar/CActiveRecordBehavior.php
  114. +3 −3 framework/db/schema/CDbCommandBuilder.php
  115. +8 −8 framework/db/schema/CDbCriteria.php
  116. +25 −21 framework/db/schema/CDbSchema.php
  117. +2 −2 framework/db/schema/mssql/CMssqlCommandBuilder.php
  118. +2 −0 framework/db/schema/mssql/CMssqlSchema.php
  119. +15 −0 framework/db/schema/mysql/CMysqlCommandBuilder.php
  120. +2 −0 framework/db/schema/mysql/CMysqlSchema.php
  121. +0 −1 framework/db/schema/oci/COciCommandBuilder.php
  122. +2 −0 framework/db/schema/oci/COciSchema.php
  123. +2 −2 framework/db/schema/pgsql/CPgsqlColumnSchema.php
  124. +39 −1 framework/db/schema/pgsql/CPgsqlSchema.php
  125. +2 −0 framework/db/schema/sqlite/CSqliteSchema.php
  126. +1 −1 framework/gii/components/Pear/Text/Diff.php
  127. +1 −1 framework/gii/components/Pear/Text/Diff/Mapped.php
  128. +3 −2 framework/gii/generators/model/ModelCode.php
  129. +1 −1 framework/gii/generators/model/templates/default/model.php
  130. +1 −1 framework/i18n/CGettextMessageSource.php
  131. +7 −7 framework/i18n/CLocale.php
  132. +1 −1 framework/logging/CEmailLogRoute.php
  133. +1 −1 framework/messages/config.php
  134. +282 −0 framework/messages/da/yii.php
  135. +41 −0 framework/messages/da/zii.php
  136. +23 −21 framework/messages/de/yii.php
  137. +3 −3 framework/messages/de/zii.php
  138. +151 −135 framework/messages/es/yii.php
  139. +12 −12 framework/messages/es/zii.php
  140. +11 −14 framework/messages/fi/yii.php
  141. +1 −2 framework/messages/fi/zii.php
  142. +42 −42 framework/messages/fr/yii.php
  143. +2 −2 framework/messages/hu/zii.php
  144. +2 −5 framework/messages/ja/yii.php
  145. +1 −1 framework/messages/lv/yii.php
  146. +9 −7 framework/messages/nl/yii.php
  147. +2 −2 framework/messages/nl/zii.php
  148. +36 −0 framework/messages/no/zii.php
  149. +6 −5 framework/messages/ru/yii.php
  150. +22 −14 framework/utils/CFileHelper.php
  151. +4 −1 framework/utils/CFormatter.php
  152. +1 −1 framework/utils/CLocalizedFormatter.php
  153. +3 −3 framework/utils/CPasswordHelper.php
  154. +24 −16 framework/validators/CFileValidator.php
  155. +1 −1 framework/validators/CValidator.php
  156. +1 −1 framework/vendors/README.html
  157. +7,917 −3,671 framework/vendors/htmlpurifier/HTMLPurifier.standalone.php
  158. +8 −3 framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Interchange.php
  159. +68 −22 framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/InterchangeBuilder.php
  160. +66 −24 framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Validator.php
  161. +86 −22 framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/ValidatorAtom.php
  162. BIN framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema.ser
  163. +16 −0 ...vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt
  164. +4 −2 ...k/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt
  165. +1 −1 framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt
  166. +41 −49 framework/vendors/htmlpurifier/standalone/HTMLPurifier/Language/messages/en.php
  167. +88 −46 framework/vendors/htmlpurifier/standalone/HTMLPurifier/Printer.php
  168. +9 −3 framework/vendors/htmlpurifier/standalone/HTMLPurifier/Printer/CSSDefinition.php
  169. +168 −89 framework/vendors/htmlpurifier/standalone/HTMLPurifier/Printer/ConfigForm.php
  170. +133 −81 framework/vendors/htmlpurifier/standalone/HTMLPurifier/Printer/HTMLDefinition.php
  171. +37 −0 framework/views/da/error.php
  172. +33 −0 framework/views/da/error400.php
  173. +32 −0 framework/views/da/error403.php
  174. +33 −0 framework/views/da/error404.php
  175. +35 −0 framework/views/da/error500.php
  176. +31 −0 framework/views/da/error503.php
  177. +242 −0 framework/views/da/exception.php
  178. +23 −0 framework/views/da/log-firebug.php
  179. +40 −0 framework/views/da/log.php
  180. +19 −0 framework/views/da/profile-callstack-firebug.php
  181. +30 −0 framework/views/da/profile-callstack.php
  182. +22 −0 framework/views/da/profile-summary-firebug.php
  183. +41 −0 framework/views/da/profile-summary.php
  184. +5 −5 framework/web/CAssetManager.php
  185. +10 −2 framework/web/CBaseController.php
  186. +11 −10 framework/web/CClientScript.php
  187. +68 −10 framework/web/CHttpRequest.php
  188. +3 −3 framework/web/CSort.php
  189. +1 −0 framework/web/CUrlManager.php
  190. +1 −1 framework/web/CWebApplication.php
  191. +1 −1 framework/web/actions/CViewAction.php
  192. +21 −0 framework/web/form/CFormElement.php
  193. +16 −4 framework/web/form/CFormInputElement.php
  194. +201 −4 framework/web/helpers/CHtml.php
  195. +9 −1 framework/web/helpers/CJSON.php
  196. +1 −1 framework/web/helpers/CJavaScript.php
  197. +3 −3 framework/web/services/CWsdlGenerator.php
  198. +72 −8 framework/web/widgets/CActiveForm.php
  199. +1 −1 framework/web/widgets/CHtmlPurifier.php
  200. +6 −6 framework/web/widgets/captcha/CCaptchaAction.php
  201. +11 −8 framework/yiilite.php
  202. +4 −0 framework/zii/widgets/CBaseListView.php
  203. +4 −2 framework/zii/widgets/CDetailView.php
  204. +1 −1 framework/zii/widgets/CListView.php
  205. +6 −3 framework/zii/widgets/CMenu.php
  206. +8 −0 framework/zii/widgets/assets/gridview/jquery.yiigridview.js
  207. +1 −1 framework/zii/widgets/assets/listview/jquery.yiilistview.js
  208. +7 −5 framework/zii/widgets/grid/CButtonColumn.php
  209. +15 −19 framework/zii/widgets/grid/CCheckBoxColumn.php
  210. +22 −17 framework/zii/widgets/grid/CDataColumn.php
  211. +60 −11 framework/zii/widgets/grid/CGridColumn.php
  212. +9 −3 framework/zii/widgets/grid/CGridView.php
  213. +5 −3 framework/zii/widgets/grid/CLinkColumn.php
  214. +1 −1 framework/zii/widgets/jui/CJuiTabs.php
  215. +6 −0 requirements/index.php
  216. +1 −1 requirements/messages/config.php
  217. +61 −0 requirements/messages/da/yii.php
  218. +24 −7 requirements/messages/es/yii.php
  219. +2 −0 requirements/messages/ja/yii.php
  220. +77 −0 requirements/views/da/index.php
  221. +93 −4 tests/framework/caching/CFileCacheTest.php
  222. +39 −0 tests/framework/caching/CRedisCacheTest.php
  223. +10 −0 tests/framework/db/CDbCommand2Test.php
  224. +77 −0 tests/framework/db/ar/CActiveRecordTest.php
  225. +7 −0 tests/framework/db/data/models-namespaced.php
  226. +53 −0 tests/framework/db/data/models.php
  227. +4 −3 tests/framework/db/data/sqlite.sql
  228. +13 −1 tests/framework/db/schema/CMysql2Test.php
  229. +34 −1 tests/framework/db/schema/CPostgres2Test.php
  230. +1 −1 tests/framework/db/schema/CSqliteTest.php
  231. +30 −8 tests/framework/i18n/CLocaleTest.php
  232. +33 −0 tests/framework/utils/CFileHelperTest.php
  233. +17 −0 tests/framework/validators/CFileValidatorTest.php
  234. +1 −0 tests/framework/validators/CStringValidatorTest.php
  235. +4 −0 tests/framework/validators/ValidatorTestModel.php
  236. +62 −0 tests/framework/web/CClientScriptTest.php
  237. +27 −1 tests/framework/web/CSortTest.php
  238. +21 −0 tests/framework/web/helpers/CJSONTest.php
View
@@ -8,6 +8,7 @@ php:
services:
- redis-server
+ - memcached
before_script:
- ./tests/travis/mysql-setup.sh
View
@@ -1,10 +1,78 @@
Yii Framework Change Log
========================
+Work in progress
+----------------
-Version 1.1.14
---------------
+Version 1.1.15 under development
+--------------------------------
+- Bug #268: Fixed Active Record count error when some field name starting from 'count' (nineinchnick)
+- Bug #788: createIndex is not using the recommended way to create unique indexes on Postgres (nineinchnick)
+- Bug #2235: CPgsqlColumnSchema can't parse default value for numeric field (cebe, pavimus)
+- Bug #2378: CActiveRecord::tableName() in namespaced model returned fully qualified class name (velosipedist, cebe)
+- Bug #2654: Allow CDbCommand to compose queries without 'from' clause (klimov-paul)
+- Bug #2658: CBaseListView, CGridView, CListView: added note about $itemsCssClass and $pagerCssClass properties, they must not contain empty string, null or false values (resurtm)
+- Bug #2969: CPgsqlSchema::addColumn() converts column type twice (cebe, klimov-paul)
+- Bug #2753: Fixed CErrorHandler::errorAction ignored if error occurs while AJAX request (klimov-paul)
+- Bug #2756: Fixed applying condition twice during Active Record relation lazy loading (klimov-paul)
+- Bug #2770: Fixed CClientScript renders scripts with different HTML options inside same tag (klimov-paul)
+- Bug #2778: Fixed throwing unnecessary exception in CFileValidator when validating MIME types for a file upload that failed (Rupert-RR)
+- Bug #2785: Use table name with schema in composeMultipleInsertCommand (nineinchnick)
+- Bug #2836: Fixed rendering when try-catching widget Exception while 'captureOutput' is set to true (darkheir)
+- Bug #2855: Fixed issue with Component::__call() and normal properties holding a Closure (cebe)
+- Bug #2862: Fixed array_merge caused renumbering of $data indexes in CHtml::radioButtonList() (ligser)
+- Bug #2864: Fixed CGridView ajax calls failing CSRF validation when ajaxType is set to POST (nineinchnick)
+- Bug #2874: Fixed duplicate columns selection for HAS_MANY relation with composite primary key (borro)
+- Bug #2876: Fixed single quotes in comments column causes syntax error in model code generated by Gii(klimov-paul)
+- Bug #2884: Fixed problem with table alias in CActiveRecord that has been introduced in 1.1.14 (cebe)
+- Bug #2887: Fixed CFormElement is missing __isset() (bijibox)
+- Bug #2912: Add options parameter to CListView beforeAjaxUpdate (spikyjt)
+- Bug #2944: Fixed CDbCriteria fails to merge limit when it is 0 (softark)
+- Bug #2959: Fixed CFileValidator to encode file name, while composing error messages (klimov-paul)
+- Bug #2963: CAssetManager::generatePath no longer uses basename for hasing (eirikhm)
+- Bug #2970: Fixed Active Record may join same relation twice on eager loading. (klimov-paul)
+- Bug #3010: Problem with callables given as values to CDetailView. CDetailView now only allows annonymous functions to be called, all other values will be taken as value (cebe)
+- Bug #3064: Fixed problem with array to string converion in CDbMigration methods that accept array parameters (cebe)
+- Bug #3113: Fixed problems with realpath(false) which can occur in combination with Yii::getPathOfAlias() when alias does not exist (cebe)
+- Bug #3134: Fixed the issue that query cache returns the same data for the same SQL but different query methods (qiangxue)
+- Bug #3144: It wasn't possible to use attributes with spaces in validation rules (samdark)
+- Bug: Fixed the bug that backslashes are not escaped by CDbCommandBuilder::buildSearchCondition() (qiangxue)
+- Bug: Fixed URL parsing so it's now properly giving 404 for URLs like "http://example.com//////site/about/////" (samdark)
+- Bug: Fixed an issue with CFilehelper and not accessable directories which resulted in endless loop (cebe)
+- Enh: Public method CFileHelper::createDirectory() has been added (klimov-paul)
+- Enh #106: Added getters to CGridColumn to allow getting cell contents for extended use cases of CGridView (cebe)
+- Enh #182: CSort: allow arrays in asc/desc keys of virtual attributes (nineinchnick)
+- Enh #640: Introduce bigpk and bigint column types in each class extending CDbSchema (nineinchnick)
+- Enh #873: CStatRelation (CActiveRecord::STAT) now supports scopes (resurtm, klimov-paul)
+- Enh #1515: Post-JOIN operations (use|force|ignore index()) support in relational queries (KonovalovMaxim, resurtm)
+- Enh #1593: Allow access to exception currently processed by CErrorHandler (klimov-paul)
+- Enh #2540: Enable CJSON to use JsonSerializable interface when serializing objects (sammousa)
+- Enh #2664: Added support for HTTP PATCH requests to CHttpRequest (cebe)
+- Enh #2688: CHtml::beginForm() now supports additional HTTP methods, via a hidden `_method` field. (phpnode)
+- Enh #2722: CFileHelper::findFiles() accepts absolutePaths in $options and returns absolute paths if true or relative ones otherwise (defaults to true) (pavel-voronin)
+- Enh #2737: CFileCache: added cachePathMode and cacheFileMode options to set modes used by chmod() for cache directory and files (ujovlado)
+- Enh #2758: Updated phpdoc in blog demo to match current IDE supported syntax (samdark)
+- Enh #2777: Allow Yii::import() and Yii::createComponent() to import classes that are loaded by other autoloaders e.g. composer (cebe)
+- Enh #2791: requirements/index.php: added CRYPT_BLOWFISH check for CPasswordHelper (tom--)
+- Enh #2799: Add HTML5 input support for color, datetime, datetime-local, week and search to CHtml and CActiveForm (phpnode)
+- Enh #2817: Allow specifying $colums and $refColumns arguments as array in various CDbSchema methods (mynameiszanders, samdark)
+- Enh #2852: Refactored ShellCommand to be easier to extend (samdark, mindplay-dk)
+- Enh #2908: Add insertMultiple to Migrations (luislobo)
+- Enh #3014: Allow changing the database used by ActiveRecord in beforeCount() like it is possible in beforeFind() already (cebe)
+- Enh #3023: Added support for formatting DateTime instances to CFormatter (cebe, nitso)
+- Enh #3027: Added custom encodeLabel attributes of the CMenu items (hugeval)
+- Enh #3048: CApcCache is now compatible with APCu (iobotis, samdark)
+- Enh #3068: Added CDbCommand::naturalLeftJoin() and CDbCommand::naturalRightJoin() (bunchachis)
+- Enh #3115: Updated phpdoc for better code completion in modern IDEs (samdark)
+- Enh #3147: Updated Request::getIsSecureConnection() to work with lower and uppercase config values (cebe)
+- Enh #3182: Added namespace support for controllers in subdirectories (Ekstazi, samdark)
+- Chg #3137: Upgraded HTMLPurifier to 4.6.0 (samdark)
+- New #2955: Added official support for MariaDB (cebe, DaSourcerer)
+
+Version 1.1.14 August 11, 2013
+------------------------------
- Bug: There was unnecessary echo in CRUD views generated by Gii (samdark)
- Bug: CJavaScript::encode was formatting floats in a wrong way during encoding (samdark)
+- Bug: Fixed minLength and maxLength range check in CCaptchaAction::generateVerifyCode so values are now always stay in bounds (samdark)
- Bug #101: CActiveFinder::buildJoinTree() no longer uses 'false' for 'select' value (klimov-paul)
- Bug #135: Fixed wrong CActiveRecord rows count with having (klimov-paul)
- Bug #139: Fixed Active Record lazy load through relation with condition (klimov-paul)
@@ -83,8 +151,9 @@ Version 1.1.14
- Bug #2565: CCaptchaAction in ImageMagick mode used to issue an exception in case $backColor or $foreColor have had leading zeros (resurtm)
- Bug #2581: Fixed the bug with empty ajaxVar in jquery.yiilistview.js and jquery.yiigridview.js (seregagl)
- Bug #2602: CUrlValidator and CEmailValidator now works correctly with display_errors = on and validateIDN = true (creocoder)
+- Bug #2662: CLocale::getTerritory() used to return null value even for proper input values, bug fix #1622 made in 1.1.13 has been reverted (resurtm)
- Bug #2632: Fixed inability import non-build aliases by config on some case (Yiivgeny)
-- Bug #2651: CHttpSession wasn't using GC probability/divisor from php.ini (marcovtwout, cebe, samdark)
+- Bug #2651: CHttpSession was using hardcoded GC probability/divisor values (marcovtwout, cebe, samdark)
- Enh: Better CFileLogRoute performance (Qiang, samdark)
- Enh: Refactored CHttpRequest::getDelete and CHttpRequest::getPut not to use _restParams directly (samdark)
- Enh #100: CLogFilter::$logVars can now be array of arrays intended for designating particular items of the $GLOBALS (resurtm, tomtomsen)
@@ -131,6 +200,7 @@ Version 1.1.14
- Enh #2494: Allow to configure CBaseListView emptyText container tag name (ifdattic)
- Enh #2529: Silenced all chmod calls to prevent "chmod() operation not allowed" error on NTFS (samdark)
- Enh #2602: CEmailValidator and CUrlValidator now uses native PHP `idn` extension in case it is available (`idn_to_ascii` and `idn_ to_ utf8` functions) and Net_IDNA2 otherwise (resurtm, creocoder)
+- Enh #2642: Support third party autoloaders when importing classes via Yii::import() (phpnode)
- Chg: Upgraded HTMLPurifier to v4.5.0 (samdark)
- Chg #645: CDbConnection now throws CDbException when failed to open DB connection instead of failing with a warning (kidol, eirikhm, samdark, cebe)
- Chg #895: Add second argument $params to client validation function (slavcodev)
@@ -140,7 +210,7 @@ Version 1.1.14
- Chg #2187: Vendors: punycode.js updated from 1.1.1 (June 27, 2012) to 1.2.0 (October 10, 2012) (resurtm)
- Chg #2461: Upgraded jquery star rating to 4.11 (samdark)
- Chg #2531: Upgraded jquery masked input to 1.3.1 (samdark)
-- New: Added CRedisCache which uses redis key value store as cache backend (cebe)
+- New: Added CRedisCache which uses redis key value store as cache backend (cebe, maxlun86)
- New #575: Yii registering at Packagist, added composer info file (schmunk42)
- New #1785: Added CPasswordHelper (tom--)
- New #2178: Added Catalan Translation (ArnauAregall)
View
12 UPGRADE
@@ -1,4 +1,4 @@
- Upgrading Instructions for Yii Framework v1.1.14
+ Upgrading Instructions for Yii Framework v1.1.15
================================================
!!!IMPORTANT!!!
@@ -17,6 +17,16 @@ General upgrade instructions
- Check if everything is OK, if not — revert from backup and post
issues to Yii issue tracker.
+Upgrading from v1.1.14
+----------------------
+
+- CErrorHandler now runs errorAction for errors, which appear via AJAX request.
+ If you use CErrorHandler::errorAction, make sure it handles AJAX request properly.
+
+- The possibility to use callables for values of CDetailView introduced a problem with string beeing interpreted as
+ PHP functions. CDetailView now only allows anonymous functions to be called, all other values will be taken as value.
+
+
Upgrading from v1.1.13
----------------------
@@ -202,7 +202,7 @@ protected function processLink($matches)
if(($text=trim($matches[2]))==='')
$text=$url;
- if(preg_match('/^(http|ftp):\/\//i',$url)) // an external URL
+ if(preg_match('/^(http|https|ftp):\/\//i',$url)) // an external URL
return "<a href=\"$url\">$text</a>";
$url=$this->resolveInternalUrl($url);
return $url===''?$text:'{{'.$url.'|'.$text.'}}';
@@ -1,24 +1,23 @@
<?php
-
+/**
+ * The followings are the available columns in table 'tbl_comment':
+ * @property integer $id
+ * @property string $content
+ * @property integer $status
+ * @property integer $create_time
+ * @property string $author
+ * @property string $email
+ * @property string $url
+ * @property integer $post_id
+ */
class Comment extends CActiveRecord
{
- /**
- * The followings are the available columns in table 'tbl_comment':
- * @var integer $id
- * @var string $content
- * @var integer $status
- * @var integer $create_time
- * @var string $author
- * @var string $email
- * @var string $url
- * @var integer $post_id
- */
const STATUS_PENDING=1;
const STATUS_APPROVED=2;
/**
* Returns the static model of the specified AR class.
- * @return CActiveRecord the static model class
+ * @return static the static model class
*/
public static function model($className=__CLASS__)
{
@@ -1,23 +1,21 @@
<?php
-
+/**
+ * The followings are the available columns in table 'tbl_lookup':
+ * @property integer $id
+ * @property string $object_type
+ * @property integer $code
+ * @property string $name_en
+ * @property string $name_fr
+ * @property integer $sequence
+ * @property integer $status
+ */
class Lookup extends CActiveRecord
{
- /**
- * The followings are the available columns in table 'tbl_lookup':
- * @var integer $id
- * @var string $object_type
- * @var integer $code
- * @var string $name_en
- * @var string $name_fr
- * @var integer $sequence
- * @var integer $status
- */
-
private static $_items=array();
/**
* Returns the static model of the specified AR class.
- * @return CActiveRecord the static model class
+ * @return static the static model class
*/
public static function model($className=__CLASS__)
{
@@ -1,18 +1,17 @@
<?php
-
+/**
+ * The followings are the available columns in table 'tbl_post':
+ * @property integer $id
+ * @property string $title
+ * @property string $content
+ * @property string $tags
+ * @property integer $status
+ * @property integer $create_time
+ * @property integer $update_time
+ * @property integer $author_id
+ */
class Post extends CActiveRecord
{
- /**
- * The followings are the available columns in table 'tbl_post':
- * @var integer $id
- * @var string $title
- * @var string $content
- * @var string $tags
- * @var integer $status
- * @var integer $create_time
- * @var integer $update_time
- * @var integer $author_id
- */
const STATUS_DRAFT=1;
const STATUS_PUBLISHED=2;
const STATUS_ARCHIVED=3;
@@ -21,7 +20,7 @@ class Post extends CActiveRecord
/**
* Returns the static model of the specified AR class.
- * @return CActiveRecord the static model class
+ * @return static the static model class
*/
public static function model($className=__CLASS__)
{
@@ -1,17 +1,15 @@
<?php
-
+/**
+ * The followings are the available columns in table 'tbl_tag':
+ * @property integer $id
+ * @property string $name
+ * @property integer $frequency
+ */
class Tag extends CActiveRecord
{
- /**
- * The followings are the available columns in table 'tbl_tag':
- * @var integer $id
- * @var string $name
- * @var integer $frequency
- */
-
/**
* Returns the static model of the specified AR class.
- * @return CActiveRecord the static model class
+ * @return static the static model class
*/
public static function model($className=__CLASS__)
{
@@ -1,19 +1,18 @@
<?php
+/**
+ * The followings are the available columns in table 'tbl_user':
+ * @property integer $id
+ * @property string $username
+ * @property string $password
+ * @property string $email
+ * @property string $profile
+ */
class User extends CActiveRecord
{
- /**
- * The followings are the available columns in table 'tbl_user':
- * @var integer $id
- * @var string $username
- * @var string $password
- * @var string $email
- * @var string $profile
- */
-
/**
* Returns the static model of the specified AR class.
- * @return CActiveRecord the static model class
+ * @return static the static model class
*/
public static function model($className=__CLASS__)
{
@@ -44,15 +44,17 @@ class UserIdentity extends CUserIdentity
}
~~~
-この `authenticate()` メソッドにおいては、`User` クラスを用いて、`tbl_user` テーブルの中から、`username` カラムが与えられた `username` と同じである行を探し出しています(大文字と小文字は区別しません)。`User` クラスは前のセクションで `gii` ツールによって作られたものであることを思い出してください。`User` クラスは [CActiveRecord] を継承しているため、 [アクティブレコードの機能](http://www.yiiframework.com/doc/guide/ja/database.ar) を利用して、オブジェクト指向(OOP)の流儀で `tbl_user` テーブルにアクセスすることが出来ます。
+この `authenticate()` メソッドにおいては、`User` クラスを用いて、`tbl_user` テーブルの中から、
+`username` カラムが与えられた `username` と同じである行を探し出しています(大文字と小文字は区別しません)。
+`User` クラスは前のセクションで `gii` ツールによって作られたものであることを思い出してください。
+`User` クラスは [CActiveRecord] を継承しているため、 [アクティブレコードの機能](http://www.yiiframework.com/doc/guide/ja/database.ar) を利用して、
+オブジェクト指向(OOP)の流儀で `tbl_user` テーブルにアクセスすることが出来ます。
ユーザが正当なパスワードを入力したかどうかをチェックするため、`User` クラスの `validatePassword` メソッドを呼び出しています。
`/wwwroot/blog/protected/models/User.php` を以下の様に修正する必要があります。
-平文のパスワードをデータベースに保存するのではなく、パスワードとランダムに発生させたソルトキーのハッシュを保存することに注意してください。
-ユーザが入力したパスワードを検証する際は、パスワードではなくハッシュの結果を比較することになります。
-パスワードのハッシュと検証には、PHP の組み込み関数である `crypt()` を使います。
-詳細な解説としては、Wiki 記事 [Use crypt() for password storage](http://www.yiiframework.com/wiki/425) を参照して下さい。
-
+平文のパスワードをデータベースに保存するのではなく、パスワードのハッシュを保存することに注意してください。
+ユーザが入力したパスワードを検証する際は、パスワードではなくハッシュの結果を比較しなければなりません。
+パスワードのハッシュと検証には、Yii に組み込まれている [CPasswordHelper] クラスを使います。
~~~
[php]
@@ -61,12 +63,12 @@ class User extends CActiveRecord
......
public function validatePassword($password)
{
- return crypt($password,$this->password)===$this->password;
+ return CPasswordHelper::verifyPassword($password,$this->password);
}
public function hashPassword($password)
{
- return crypt($password, $this->generateSalt());
+ return CPasswordHelper::hashPassword($password);
}
}
~~~
@@ -49,7 +49,7 @@ public function approve()
}
~~~
-Здесь мы просто выставляем свойство `status` комментария в `approved` согласно значению соответсвующей константы класса `Comment`:
+Здесь мы просто выставляем свойство `status` комментария в `approved` согласно значению соответствующей константы класса `Comment`:
~~~
[php]
@@ -48,7 +48,7 @@ return array(
------------------------------------------------
Хотя сам Yii [довольно быстр](http://www.yiiframework.com/performance/), не обязательно,
-что приложение, написанное с использованием Yii, будет работать также эффективно. Есть
+что приложение, написанное с использованием Yii, будет работать так же эффективно. Есть
несколько мест в приложении, где мы можем улучшить работу. Например,
портлет облака тэгов может быть одним из узких мест в работе, потому что он
использует сложный запрос к базе данных и логику PHP.
Oops, something went wrong.

0 comments on commit ca25bc1

Please sign in to comment.