Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Dev Updated to Yii Framework 1.1.14

  • Loading branch information...
commit 77f2eea86f1279d9e7900410b5072c0c0d2319dc 1 parent b60b74b
Carsten Schmitz c-schmitz authored
Showing with 2,781 additions and 998 deletions.
  1. +412 −2 framework/CHANGELOG
  2. +1 −1  framework/LICENSE
  3. +212 −73 framework/UPGRADE
  4. +17 −4 framework/YiiBase.php
  5. +14 −2 framework/base/CApplication.php
  6. +2 −2 framework/base/CApplicationComponent.php
  7. +1 −1  framework/base/CBehavior.php
  8. +7 −1 framework/base/CComponent.php
  9. +1 −1  framework/base/CErrorEvent.php
  10. +1 −1  framework/base/CErrorHandler.php
  11. +1 −1  framework/base/CException.php
  12. +1 −1  framework/base/CExceptionEvent.php
  13. +1 −1  framework/base/CHttpException.php
  14. +2 −1  framework/base/CModel.php
  15. +1 −1  framework/base/CModelBehavior.php
  16. +1 −1  framework/base/CModelEvent.php
  17. +1 −1  framework/base/CModule.php
  18. +182 −18 framework/base/CSecurityManager.php
  19. +1 −1  framework/base/CStatePersister.php
  20. +1 −1  framework/base/interfaces.php
  21. +2 −2 framework/caching/CApcCache.php
  22. +2 −2 framework/caching/CCache.php
  23. +2 −2 framework/caching/CDbCache.php
  24. +1 −1  framework/caching/CDummyCache.php
  25. +2 −2 framework/caching/CEAcceleratorCache.php
  26. +30 −8 framework/caching/CFileCache.php
  27. +2 −2 framework/caching/CMemCache.php
  28. +257 −0 framework/caching/CRedisCache.php
  29. +2 −2 framework/caching/CWinCache.php
  30. +2 −2 framework/caching/CXCache.php
  31. +2 −2 framework/caching/CZendDataCache.php
  32. +14 −9 framework/caching/dependencies/CCacheDependency.php
  33. +2 −2 framework/caching/dependencies/CChainedCacheDependency.php
  34. +2 −1  framework/caching/dependencies/CDbCacheDependency.php
  35. +3 −1 framework/caching/dependencies/CDirectoryCacheDependency.php
  36. +7 −2 framework/caching/dependencies/CExpressionDependency.php
  37. +2 −1  framework/caching/dependencies/CFileCacheDependency.php
  38. +2 −1  framework/caching/dependencies/CGlobalStateCacheDependency.php
  39. +5 −5 framework/cli/commands/MessageCommand.php
  40. +2 −2 framework/cli/commands/MigrateCommand.php
  41. +1 −1  framework/cli/commands/ShellCommand.php
  42. +1 −1  framework/cli/commands/WebAppCommand.php
  43. +2 −2 framework/cli/commands/shell/ControllerCommand.php
  44. +2 −2 framework/cli/commands/shell/CrudCommand.php
  45. +2 −2 framework/cli/commands/shell/FormCommand.php
  46. +2 −2 framework/cli/commands/shell/HelpCommand.php
  47. +12 −11 framework/cli/commands/shell/ModelCommand.php
  48. +2 −2 framework/cli/commands/shell/ModuleCommand.php
  49. 0  framework/cli/runtime/.yii
  50. +1 −1  framework/cli/views/shell/crud/admin.php
  51. +16 −9 framework/cli/views/shell/model/model.php
  52. 0  framework/cli/views/shell/module/components/.yii
  53. 0  framework/cli/views/shell/module/messages/.yii
  54. 0  framework/cli/views/shell/module/models/.yii
  55. 0  framework/cli/views/shell/module/views/layouts/.yii
  56. 0  framework/cli/views/webapp/assets/.yii
  57. +1 −1  framework/cli/views/webapp/css/form.css
  58. +3 −3 framework/cli/views/webapp/hg-hgignore
  59. 0  framework/cli/views/webapp/images/.yii
  60. 0  framework/cli/views/webapp/protected/commands/shell/.yii
  61. +1 −1  framework/cli/views/webapp/protected/controllers/SiteController.php
  62. 0  framework/cli/views/webapp/protected/extensions/.yii
  63. 0  framework/cli/views/webapp/protected/messages/.yii
  64. 0  framework/cli/views/webapp/protected/migrations/.yii
  65. 0  framework/cli/views/webapp/protected/runtime/.yii
  66. 0  framework/cli/views/webapp/protected/tests/fixtures/.yii
  67. 0  framework/cli/views/webapp/protected/tests/report/.yii
  68. 0  framework/cli/views/webapp/protected/tests/unit/.yii
  69. 0  ...enerators/module/templates/default/views/layouts/.yii → cli/views/webapp/protected/vendor/git-gitkeep}
  70. 0  ...rk/{gii/generators/module/templates/default/models/.yii → cli/views/webapp/protected/vendor/hg-hgkeep}
  71. 0  framework/cli/views/webapp/themes/classic/views/layouts/.yii
  72. 0  framework/cli/views/webapp/themes/classic/views/site/.yii
  73. 0  framework/cli/views/webapp/themes/classic/views/system/.yii
  74. +6 −6 framework/collections/CAttributeCollection.php
  75. +1 −1  framework/collections/CConfiguration.php
  76. +1 −1  framework/collections/CList.php
  77. +2 −2 framework/collections/CListIterator.php
  78. +4 −4 framework/collections/CMap.php
  79. +2 −2 framework/collections/CMapIterator.php
  80. +2 −2 framework/collections/CQueue.php
  81. +2 −2 framework/collections/CQueueIterator.php
  82. +1 −1  framework/collections/CStack.php
  83. +2 −2 framework/collections/CStackIterator.php
  84. +1 −1  framework/collections/CTypedList.php
  85. +1 −1  framework/collections/CTypedMap.php
  86. +23 −1 framework/console/CConsoleApplication.php
  87. +12 −4 framework/console/CConsoleCommand.php
  88. +3 −3 framework/console/CConsoleCommandBehavior.php
  89. +1 −1  framework/console/CConsoleCommandEvent.php
  90. +27 −2 framework/console/CConsoleCommandRunner.php
  91. +1 −1  framework/console/CHelpCommand.php
  92. +11 −7 framework/db/CDbCommand.php
  93. +18 −6 framework/db/CDbConnection.php
  94. +2 −2 framework/db/CDbDataReader.php
  95. +1 −1  framework/db/CDbException.php
  96. +13 −8 framework/db/CDbMigration.php
  97. +1 −1  framework/db/CDbTransaction.php
  98. +97 −44 framework/db/ar/CActiveFinder.php
  99. +98 −46 framework/db/ar/CActiveRecord.php
  100. +13 −1 framework/db/ar/CActiveRecordBehavior.php
  101. +1 −1  framework/db/schema/CDbColumnSchema.php
  102. +121 −4 framework/db/schema/CDbCommandBuilder.php
  103. +10 −4 framework/db/schema/CDbCriteria.php
  104. +1 −1  framework/db/schema/CDbExpression.php
  105. +10 −10 framework/db/schema/CDbSchema.php
  106. +1 −1  framework/db/schema/CDbTableSchema.php
  107. +15 −15 framework/db/schema/mssql/CMssqlColumnSchema.php
  108. +2 −1  framework/db/schema/mssql/CMssqlCommandBuilder.php
  109. +2 −2 framework/db/schema/mssql/CMssqlPdoAdapter.php
  110. +49 −37 framework/db/schema/mssql/CMssqlSchema.php
  111. +2 −2 framework/db/schema/mssql/CMssqlSqlsrvPdoAdapter.php
  112. +1 −1  framework/db/schema/mssql/CMssqlTableSchema.php
  113. +9 −6 framework/db/schema/mysql/CMysqlColumnSchema.php
  114. +8 −2 framework/db/schema/mysql/CMysqlCommandBuilder.php
  115. +38 −11 framework/db/schema/mysql/CMysqlSchema.php
  116. +1 −1  framework/db/schema/mysql/CMysqlTableSchema.php
  117. +1 −1  framework/db/schema/oci/COciColumnSchema.php
  118. +24 −1 framework/db/schema/oci/COciCommandBuilder.php
  119. +80 −48 framework/db/schema/oci/COciSchema.php
  120. +1 −1  framework/db/schema/oci/COciTableSchema.php
  121. +1 −1  framework/db/schema/pgsql/CPgsqlColumnSchema.php
  122. +30 −0 framework/db/schema/pgsql/CPgsqlCommandBuilder.php
  123. +42 −30 framework/db/schema/pgsql/CPgsqlSchema.php
  124. +1 −1  framework/db/schema/pgsql/CPgsqlTableSchema.php
  125. +5 −2 framework/db/schema/sqlite/CSqliteColumnSchema.php
  126. +25 −1 framework/db/schema/sqlite/CSqliteCommandBuilder.php
  127. +26 −22 framework/db/schema/sqlite/CSqliteSchema.php
  128. +1 −1  framework/gii/CCodeFile.php
  129. +1 −1  framework/gii/CCodeForm.php
  130. +1 −1  framework/gii/CCodeGenerator.php
  131. +5 −2 framework/gii/CCodeModel.php
  132. +3 −1 framework/gii/GiiModule.php
  133. +0 −11 framework/gii/assets/js/jquery.tooltip-1.2.6.min.js
  134. +1 −1  framework/gii/assets/js/main.js
  135. +0 −192 framework/gii/assets/js/tools.tooltip-1.2.5.min.js
  136. +364 −0 framework/gii/assets/js/tooltip.js
  137. +1 −1  framework/gii/components/UserIdentity.php
  138. +2 −2 framework/gii/controllers/DefaultController.php
  139. +1 −1  framework/gii/generators/controller/ControllerCode.php
  140. +1 −0  framework/gii/generators/controller/views/index.php
  141. +1 −1  framework/gii/generators/crud/CrudCode.php
  142. +4 −0 framework/gii/generators/crud/templates/default/_form.php
  143. +1 −1  framework/gii/generators/crud/templates/default/create.php
  144. +1 −1  framework/gii/generators/crud/templates/default/update.php
  145. +4 −0 framework/gii/generators/form/templates/default/form.php
  146. +26 −10 framework/gii/generators/model/ModelCode.php
  147. +33 −25 framework/gii/generators/model/templates/default/model.php
  148. +14 −3 framework/gii/generators/model/views/index.php
  149. 0  framework/gii/generators/module/templates/default/components/.yii
  150. 0  framework/gii/generators/module/templates/default/messages/.yii
  151. +1 −1  framework/gii/views/default/index.php
  152. +1 −1  framework/gii/views/layouts/generator.php
  153. +3 −3 framework/gii/views/layouts/main.php
  154. +10 −8 framework/i18n/CChoiceFormat.php
  155. +28 −9 framework/i18n/CDateFormatter.php
  156. +2 −1  framework/i18n/CDbMessageSource.php
  157. +2 −2 framework/i18n/CGettextMessageSource.php
  158. +10 −8 framework/i18n/CLocale.php
  159. +1 −1  framework/i18n/CMessageSource.php
  160. +16 −7 framework/i18n/CNumberFormatter.php
  161. +1 −1  framework/i18n/CPhpMessageSource.php
  162. +1 −1  framework/i18n/data/aa.php
  163. +1 −1  framework/i18n/data/aa_dj.php
  164. +1 −1  framework/i18n/data/aa_er.php
  165. +1 −1  framework/i18n/data/aa_et.php
  166. +1 −1  framework/i18n/data/af.php
  167. +1 −1  framework/i18n/data/af_na.php
  168. +1 −1  framework/i18n/data/af_za.php
  169. +1 −1  framework/i18n/data/agq.php
  170. +1 −1  framework/i18n/data/agq_cm.php
  171. +1 −1  framework/i18n/data/ak.php
  172. +1 −1  framework/i18n/data/ak_gh.php
  173. +1 −1  framework/i18n/data/am.php
  174. +1 −1  framework/i18n/data/am_et.php
  175. +1 −1  framework/i18n/data/ar.php
  176. +1 −1  framework/i18n/data/ar_001.php
  177. +1 −1  framework/i18n/data/ar_ae.php
  178. +1 −1  framework/i18n/data/ar_bh.php
  179. +1 −1  framework/i18n/data/ar_dz.php
  180. +1 −1  framework/i18n/data/ar_eg.php
  181. +1 −1  framework/i18n/data/ar_iq.php
  182. +1 −1  framework/i18n/data/ar_jo.php
  183. +1 −1  framework/i18n/data/ar_kw.php
  184. +1 −1  framework/i18n/data/ar_lb.php
  185. +1 −1  framework/i18n/data/ar_ly.php
  186. +1 −1  framework/i18n/data/ar_ma.php
  187. +1 −1  framework/i18n/data/ar_om.php
  188. +1 −1  framework/i18n/data/ar_qa.php
  189. +1 −1  framework/i18n/data/ar_sa.php
  190. +1 −1  framework/i18n/data/ar_sd.php
  191. +1 −1  framework/i18n/data/ar_sy.php
  192. +1 −1  framework/i18n/data/ar_tn.php
  193. +1 −1  framework/i18n/data/ar_ye.php
  194. +1 −1  framework/i18n/data/as.php
  195. +1 −1  framework/i18n/data/as_in.php
  196. +1 −1  framework/i18n/data/asa.php
  197. +1 −1  framework/i18n/data/asa_tz.php
  198. +1 −1  framework/i18n/data/az.php
  199. +1 −1  framework/i18n/data/az_arab.php
  200. +1 −1  framework/i18n/data/az_arab_ir.php
  201. +1 −1  framework/i18n/data/az_az.php
  202. +1 −1  framework/i18n/data/az_cyrl.php
  203. +1 −1  framework/i18n/data/az_cyrl_az.php
  204. +1 −1  framework/i18n/data/az_ir.php
  205. +1 −1  framework/i18n/data/az_latn.php
  206. +1 −1  framework/i18n/data/az_latn_az.php
  207. +1 −1  framework/i18n/data/bas.php
  208. +1 −1  framework/i18n/data/bas_cm.php
  209. +1 −1  framework/i18n/data/be.php
  210. +1 −1  framework/i18n/data/be_by.php
  211. +1 −1  framework/i18n/data/bem.php
  212. +1 −1  framework/i18n/data/bem_zm.php
  213. +1 −1  framework/i18n/data/bez.php
  214. +1 −1  framework/i18n/data/bez_tz.php
  215. +1 −1  framework/i18n/data/bg.php
  216. +1 −1  framework/i18n/data/bg_bg.php
  217. +1 −1  framework/i18n/data/bm.php
  218. +1 −1  framework/i18n/data/bm_ml.php
  219. +1 −1  framework/i18n/data/bn.php
  220. +1 −1  framework/i18n/data/bn_bd.php
  221. +1 −1  framework/i18n/data/bn_in.php
  222. +1 −1  framework/i18n/data/bo.php
  223. +1 −1  framework/i18n/data/bo_cn.php
  224. +1 −1  framework/i18n/data/bo_in.php
  225. +1 −1  framework/i18n/data/br.php
  226. +1 −1  framework/i18n/data/br_fr.php
  227. +1 −1  framework/i18n/data/brx.php
  228. +1 −1  framework/i18n/data/brx_in.php
  229. +1 −1  framework/i18n/data/bs.php
  230. +1 −1  framework/i18n/data/bs_ba.php
  231. +1 −1  framework/i18n/data/byn.php
  232. +1 −1  framework/i18n/data/byn_er.php
  233. +1 −1  framework/i18n/data/ca.php
  234. +1 −1  framework/i18n/data/ca_es.php
  235. +1 −1  framework/i18n/data/cch.php
  236. +1 −1  framework/i18n/data/cch_ng.php
  237. +1 −1  framework/i18n/data/cgg.php
  238. +1 −1  framework/i18n/data/cgg_ug.php
  239. +1 −1  framework/i18n/data/chr.php
  240. +1 −1  framework/i18n/data/chr_us.php
  241. +1 −1  framework/i18n/data/cs.php
  242. +1 −1  framework/i18n/data/cs_cz.php
  243. +1 −1  framework/i18n/data/cy.php
  244. +1 −1  framework/i18n/data/cy_gb.php
  245. +1 −1  framework/i18n/data/da.php
  246. +1 −1  framework/i18n/data/da_dk.php
  247. +1 −1  framework/i18n/data/dav.php
  248. +1 −1  framework/i18n/data/dav_ke.php
  249. +1 −1  framework/i18n/data/de.php
  250. +1 −1  framework/i18n/data/de_at.php
  251. +1 −1  framework/i18n/data/de_be.php
  252. +1 −1  framework/i18n/data/de_ch.php
  253. +1 −1  framework/i18n/data/de_de.php
  254. +1 −1  framework/i18n/data/de_li.php
  255. +1 −1  framework/i18n/data/de_lu.php
  256. +1 −1  framework/i18n/data/dje.php
  257. +1 −1  framework/i18n/data/dje_ne.php
  258. +1 −1  framework/i18n/data/dua.php
  259. +1 −1  framework/i18n/data/dua_cm.php
  260. +1 −1  framework/i18n/data/dv.php
  261. +1 −1  framework/i18n/data/dv_mv.php
  262. +1 −1  framework/i18n/data/dyo.php
  263. +1 −1  framework/i18n/data/dyo_sn.php
  264. +1 −1  framework/i18n/data/dz.php
  265. +1 −1  framework/i18n/data/dz_bt.php
  266. +1 −1  framework/i18n/data/ebu.php
  267. +1 −1  framework/i18n/data/ebu_ke.php
  268. +1 −1  framework/i18n/data/ee.php
  269. +1 −1  framework/i18n/data/ee_gh.php
  270. +1 −1  framework/i18n/data/ee_tg.php
  271. +1 −1  framework/i18n/data/el.php
  272. +1 −1  framework/i18n/data/el_cy.php
  273. +1 −1  framework/i18n/data/el_gr.php
  274. +1 −1  framework/i18n/data/el_polyton.php
  275. +1 −1  framework/i18n/data/en.php
  276. +1 −1  framework/i18n/data/en_as.php
  277. +1 −1  framework/i18n/data/en_au.php
  278. +1 −1  framework/i18n/data/en_bb.php
  279. +1 −1  framework/i18n/data/en_be.php
  280. +1 −1  framework/i18n/data/en_bm.php
  281. +1 −1  framework/i18n/data/en_bw.php
  282. +1 −1  framework/i18n/data/en_bz.php
  283. +1 −1  framework/i18n/data/en_ca.php
  284. +1 −1  framework/i18n/data/en_dsrt.php
  285. +1 −1  framework/i18n/data/en_dsrt_us.php
  286. +1 −1  framework/i18n/data/en_gb.php
  287. +1 −1  framework/i18n/data/en_gu.php
  288. +1 −1  framework/i18n/data/en_gy.php
  289. +1 −1  framework/i18n/data/en_hk.php
  290. +1 −1  framework/i18n/data/en_ie.php
  291. +1 −1  framework/i18n/data/en_in.php
  292. +1 −1  framework/i18n/data/en_jm.php
  293. +1 −1  framework/i18n/data/en_mh.php
  294. +1 −1  framework/i18n/data/en_mp.php
  295. +1 −1  framework/i18n/data/en_mt.php
  296. +1 −1  framework/i18n/data/en_mu.php
  297. +1 −1  framework/i18n/data/en_na.php
  298. +1 −1  framework/i18n/data/en_nz.php
  299. +1 −1  framework/i18n/data/en_ph.php
  300. +1 −1  framework/i18n/data/en_pk.php
Sorry, we could not display the entire diff because too many files (1,094) changed.
414 framework/CHANGELOG
View
@@ -1,7 +1,416 @@
-
Yii Framework Change Log
========================
+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)
+- Bug #150: Fixed CWidget was not switching between view paths when using themes (antoncpu)
+- Bug #159: CUploadedFile::getInstancesByName() has been fixed allowing correct fetching files, which name is a part of other file name (klimov-paul)
+- Bug #196: CActiveForm: models list whose errors should be displayed in error summary is now customizable when using AJAX validation (resurtm)
+- Bug #662: Fixed incorrect Active Record lazy loading of relation through BELONGS_TO relation (klimov-paul)
+- Bug #1464: Fixed transparent background for ImageMagick in CCaptchaAction (manuel-84, cebe)
+- Bug #1669: CNumberValidator used to add wrong error messages in case non-numeric values being validated (resurtm)
+- Bug #1692: CWebUser::renewCookie() and CWebUser::restoreFromCookie() now make use of the identityCookie options (f10i)
+- Bug #1693: Fixed log file will rotate twice when high performance (monque)
+- Bug #1724: Allow CClientScript registering scripts and script files with the HTML options (klimov-paul)
+- Bug #1732: CWebLogRoute and CProfileLogRoute with enabled $showInFireBug: fixed bug related to JS `console` object in MSIE 8 and 9 (resurtm)
+- Bug #1763: CSqlDataProvider was appending another ORDER BY string to an existing ORDER BY statement when using fieldname with dot (szako)
+- Bug #1827: Gii wasn't properly handling table name with the schema part for PostgreSQL (resurtm)
+- Bug #1895: Fixed erroneous language attributes in french views (located at `framework\views\fr`) (Ragazzo)
+- Bug #1909: CGridView::$filterSelector now prevents default action after event has completed by returning false result in event handler function (matih)
+- Bug #1911: MigrateCommand does not rely on cached value about migration table existance anymore as this info could be outdated in testing enviroment (cebe)
+- Bug #1915: CDataProviderIterator: fixed init in case of disabled pagination (antoncpu)
+- Bug #1916: CMssqlSchema::findColumns() issues an "invalid object name" error (resurtm)
+- Bug #1924: CLogFilter::$dumper added: this property can be used to get around circular reference issue when using standard `var_export` dumper by changing it to `print_r` (resurtm)
+- Bug #1933: fixed using "multiple" parameter with a value of false in CHtml::activeDropDownList, CHtml::ListBox and CHtml::DropDownList (adminnu)
+- Bug #1941: yiiactiveform.js form reset now uses CHtml::errorCss instead of a hardcoded value (mdomba)
+- Bug #1942: CActiveForm client/ajax validation will now remove error class from server side validation (mdomba)
+- Bug #1945: Reference to undefined variable $column in CDbMigration::dropPrimaryKey (paystey)
+- Bug #1955: Some validators used to cause warnings or errors in case non-scalar array typed values being checked (resurtm)
+- Bug #1957: Add primary key support for MySQL schema (paystey)
+- Bug #1984: CDbMigration: fix of undeclared variable usage in debug information in dropPrimaryKey (papulovskiy)
+- Bug #1990: CDateFormatter::formatWeekInMonth(): incorrect result for a week which was last in a previous year and first in a next year simultaneously (resurtm)
+- Bug #1996: Using yiic help for commands with parameters with array as default value resulted in PHP error with latest PHP versions (dInGd0nG, samdark)
+- Bug #1997: Cache key in CGettextMessageSource::loadMessages wasn't specific enough (odevyatkov)
+- Bug #2023: CHttpRequest::stripSlashes() now modifies array keys as well (etienneq)
+- Bug #2030: Fixed problem with MySQL 4.x: Undefined Index: Comment in CMysqlSchema (cebe)
+- Bug #2048: AR now uses alias from CActiveRecord::getTableAlias instead of always using default "t" (s-larionov)
+- Bug #2049: CStatElement relation with join option throw exception when key-field present on joined table (Yiivgeny)
+- Bug #2078: Fixed problem with "undefined" parameter in query string when using CListView or CGridView with enableHistory (Parpaing)
+- Bug #2086: Fixed .hgignore rule for assets folder (GeXu3, Koduc)
+- Bug #2087: CLocale: getLocaleDisplayName() was only returning the language display name, not the full locale display name (brandonkelly)
+- Bug #2112: Fixed broken yiic shell CRUD command (mbischof)
+- Bug #2121: CMssqlSchema::resetSequence() incorrectly resets sequence (resurtm, joewoodhouse)
+- Bug #2122: CActiveRecord, lazy load: 'params' from relations used in 'through' option were not applied to the final SQL statement (resurtm)
+- Bug #2123: Fixed error in plural rules handling if locale has no plural rules defined (cebe, stepanselyuk)
+- Bug #2146: CEmailValidator fix when fsockopen() can output uncatched error 'Connection refused (61)' (armab)
+- Bug #2159: Fixed SQL syntax for delete command with join in MySQL (serebrov)
+- Bug #2184: CDbHttpSession now supports MS SQL Server BLOB data type (cheuschober, resurtm)
+- Bug #2201: Cannot use "having" with bound params in CActiveRecord::count() (ivokund)
+- Bug #2216: CDbCommandBuilder::createInCondition() has been updated, allowing to pass array of values with mixed keys for the single type column (klimov-paul)
+- Bug #2223: CActiveForm::error does not respect CHtml::$errorMessageCss (ivokund)
+- Bug #2239: Fixed CHtml::refresh() method to use proper syntax (mdomba)
+- Bug #2241: COciSchema::resetSequence() now works the same way as the same methods for the other RDMBSes. PHPDocs of the CMssqlSchema::resetSequence(), CMysqlSchema::resetSequence(), CPgsqlSchema::resetSequence(), COciSchema::resetSequence() and CSqliteSchema::resetSequence() methods have been adjusted to fit their real functionality (resurtm)
+- Bug #2244: MessageCommand has been updated, allowing to merge string with value '0' correctly (klimov-paul)
+- Bug #2258: CJuiSliderInput didn't support string typed 'range' option (bookin)
+- Bug #2283: Gii Model Generator's tooltips are not working and always invisible (resurtm)
+- Bug #2289: CDbCacheDependency with reuseDependentData did not invalidate cache when getting cache across different requests (marcovtwout)
+- Bug #2299: CMssqlSchema: findTableNames(), getTables() and getTableNames() methods used to prepend schema prefix to the table names twice (resurtm)
+- Bug #2311: Fixed SQlite default value for timestamp CURRENT_TIMESTAMP (zeeke)
+- Bug #2321: CGettextPoFile is now able to parse multiline msgid and msgstr declarations (resurtm)
+- Bug #2325: Fixed UTF-8 troubles in CDateTimeParser (error in parsing chinese and thai dates) (s-larionov)
+- Bug #2336: PostgreSQL: CDbCommandBuilder used `NULL` instead of `DEFAULT` as default value for the primary keys of serial type (resurtm)
+- Bug #2368: Reset error CSS for ':input', which includes SELECT elements (blueyed)
+- Bug #2398: Fixed 'Undefined variable: results' E_NOTICE at CProfileLogRoute (klimov-paul)
+- Bug #2402: Fixed clientValidation incorrectly rendered as HTML attribute, when used in CActiveForm::error() (mdomba)
+- Bug #2406: CUrlManager::$urlRuleClass now supports path alias value (as it was described in its PHPDoc before this fix) (resurtm)
+- Bug #2423: Fixed CHtml::button() enforces "value" attribute for the image buttons (klimov-paul)
+- Bug #2426: CDbCriteria::__wakeup() used to issue an error in case SQL containing fields were arrays and criteria parameters were specified (resurtm)
+- Bug #2438: CViewAction now checks if requested view is a string to not fail when array was given (cebe)
+- Bug #2449: CSqlDataProvider causes an error when CDbCommand with enabled PDO::FETCH_OBJ mode used as SQL source (resurtm)
+- Bug #2454: Fix CMysqlColumnSchema::extractLimit for ENUM values containing comma (blueyed)
+- Bug #2491: Prevent SQL exception being thrown when inserting a row into the session table whilst regenerating the session ID (mynameiszanders)
+- Bug #2502: Fix match controller in access rule, match uniqueId instead id (slavcodev)
+- Bug #2508: Fix CHtml::activeLabel() to resolve attribute input name for tabular input with custom 'for' (klimov-paul)
+- Bug #2516: Fixed the bug that some $.fn.yiiGridView methods were not working always if a custom CGridView::template was used (buakos)
+- Bug #2524: Fixed incorrect HTTPS detection (resurtm)
+- Bug #2551: CWebUser::loginRequired() AJAX response now properly sends 403 (creocoder)
+- Bug #2554: Fixed CRangeValidator when allowEmpty is false (samdark, creocoder)
+- 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 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)
+- Enh #129: Proper support of namespaced models in forms (LastDragon-ru, Ekstazi, pgaultier)
+- Enh #169: Allow to set AJAX request type for CListView and CGridView (klimov-paul)
+- Enh #289: Gii module could be submodule of an another module (resurtm)
+- Enh #315: COciSchema::checkIntegrity() method added: allows to toggle integrity check (resurtm)
+- Enh #755: Allow to get currently running command from CConsoleApplication (klimov-paul)
+- Enh #1065: CJuiSliderInput now supports ranged slider when using it without model (resurtm)
+- Enh #1142: CSecurityManager::computeHMAC() has been made public (resurtm)
+- Enh #1353: Added onBeforeCount event to CActiveRecord (jakob-stoeck)
+- Enh #1391: CDetailView: callables (including anonymous functions for PHP 5.3+) could be used as value generators of the attributes (resurtm)
+- Enh #1447: CSqliteSchema: added enabling/disabling integrity check for sqlite (gleb-sternharz, resurtm)
+- Enh #1589: Added HTTP range responses support to CHttpRequest::sendFile (Ragazzo, samdark)
+- Enh #1604: Added method CDbCommandBuilder::createMultipleInsertCommand() to support multiple insertion (klimov-paul)
+- Enh #1725: Added CFileHelper::removeDirectory() static method (resurtm)
+- Enh #1743: Added CActiveForm::searchField() and CHtml::activeSearchField() to create HTML input field of type SEARCH (njasm)
+- Enh #1794: Added ability to change widget ID via $htmlOptions['id'] array item in: CTabView, CBaseListView, CListView, CGridView, CDetailView, CMenu, and CPortlet (umrs)
+- Enh #1796: Separate count criteria has been added to the CActiveDataProvider, it's useful for the counting queries simplification (resurtm)
+- Enh #1818: Created a CLocalizedFormatter application component that allows formatting values according to current locale (cebe)
+- Enh #1842: Added support for MySQL BIT(M) data type default values (migelsabre, cebe)
+- Enh #1847: Added COutputCache::varyByLanguage to generate separate cache for different languages (Obramko)
+- Enh #1863: Added CActiveFinder::getModel, added CActiveRecord::getActiveFinder, CExistValidator::getModel, CUniqueValidator::getModel, CActiveDataProvider::getModel, CSort::getModel (denisarius, samdark)
+- Enh #1928: Gii is now able to use table columns' comments as the attribute labels of a new generated model (resurtm, tlikai)
+- Enh #1948: Tidy up and improve html5 input support in CHtml and CActiveForm (phpnode)
+- Enh #1977: CFormatter::normalizeDateValue() now is protected instead of private to enable child classes to override it (etienneq)
+- Enh #2003: Gii now allows namespaced base classes to be defined in generators (etienneq)
+- Enh #2038: CFormatter::formatNtext() method can replace newlines with `<p></p>` not just with `<br />` as it was before (resurtm)
+- Enh #2053: CPasswordHelper has been refactored, CSecurityManager has been enhanced and is now able to generate cryptographically strong random bytes and strings (resurtm, tom--, ekerazha, samdark)
+- Enh #2062: CWsdlGenerator now supports soap indicators (sequence, choice), injecting of custom WSDL string block and generation of human-friendly documentation for complex types. Added unit test. (lubosdz)
+- Enh #2090: Allow passing array of columns to CDbSchema::addPrimaryKey() (paystey)
+- Enh #2096: CAPTCHA: non-free Duality.ttf font replaced by open/free SpicyRice.ttf (licensed under SIL OFL v1.1) (resurtm)
+- Enh #2131: Added Accept header parsing to CHttpRequest to give an array of accepted types in order of preference (Rupert-RR)
+- Enh #2135: MessageCommand can now handles Yii::t() messages with files in subfolders (firsyura)
+- Enh #2205: CActiveForm::error() now depends on CHtml::$errorContainerTag (malyshev)
+- Enh #2213: Added comment with hint on ajax validaton which may lead to duplicate entries in the database to gii form template (elmig, cebe)
+- Enh #2217: Support of the empty option for CHtml::radioButtonList() has been introduced (resurtm)
+- Enh #2254: CForm::$showErrors property has been added, it controls whether error elements of the form attributes should be rendered (resurtm)
+- Enh #2275: Added primary log rotation by copy and truncate to CFileLogRoute (bdstevens)
+- Enh #2415: Cancel current ajax request before create a new one in CGridView and CListView (gusnips)
+- Enh #2416: Avoid instantiating HTMLPurifier on each CHtmlPurifier::purify() call. Allow to pass array as argument of CHtmlPurifier::purify() (twisted1919)
+- Enh #2435: CFileCache entry expiration time could now be embedded into the cache file instead of changing file's modification time to be in future (resurtm)
+- Enh #2459: Absolute session timeout in CWebUser (ivokund)
+- 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)
+- Chg #1891: Changed order of methods in models generated by Gii and yiic, added better description of search method (hijarian, samdark)
+- Chg #2069: Upgraded jQuery BBQ Plugin to 1.4pre to fix jQuery compatibility problems (samdark)
+- Chg #2183: Vendors: phlymail's Net_IDNA was replaced by PEAR Net_IDNA2 (resurtm, DaSourcerer)
+- 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, maxlun86)
+- New #575: Yii registering at Packagist, added composer info file (schmunk42)
+- New #1785: Added CPasswordHelper (tom--)
+- New #2178: Added Catalan Translation (ArnauAregall)
+- New #2370: New template placeholders for CHtml::radioButtonList() and CHtml::checkBoxList() (creocoder)
+- New #2530: Added 'through' option to CActiveRecord::BELONGS_TO relation (creocoder)
+
+Version 1.1.13 December 30, 2012
+--------------------------------
+- Bug #93: Criteria modification in CActiveRecord::beforeFind() did not apply when record was loaded in relational context. See UPGRADE instructions for details on behavior change. (cebe)
+- Bug #109: formatNumber() now uses number_format() instead of round(), because of round() error in IEEE754 accuracy limitations (SonkoDmitry)
+- Bug #110: MSSQL: fixed empty $primaryKey value after saving CActiveRecord model (resurtm)
+- Bug #112: MSSQL: database abstraction layer now uses native transaction support of the SQLSRV driver (resurtm)
+- Bug #124: Added CMysqlCommandBuilder to handle JOIN directive on update commands correctly (cebe, DaSourcerer)
+- Bug #126: Fixed CWebUser::getReturnUrl(), allowing to determine default URL correctly, if CUrlManager::showScriptName is set to false (klimov-paul)
+- Bug #138: CMysqlSchema fixed to support MySQL ANSI mode (cebe)
+- Bug #140: Fixed validation CJuiButton with type buttonset (adminnu)
+- Bug #162: Eventhandler attached twice when behavior is set enabled after attaching it (cebe)
+- Bug #218: Fixed problem when using 'union' and 'order/limit/offset' in CDbCommand::buildQuery (nsanden)
+- Bug #276: Tweaked CGridView stylesheet to include a hover style for the selected row (acorncom)
+- Bug #810: Gii now adds a number to the end of relation name if same named relation already exists instead of not generating relation (n30kill, samdark)
+- Bug #835: CApplication::onEndRequest is now called at the script shutdown to make sure log is written on forceful script termination (samdark, cebe)
+- Bug #837: Fixed method CDbCriteria::__wakeup(), allowing to keep custom names for params and update all string parts for automatic params (klimov-paul)
+- Bug #959: Bug where non-lowercase keys cannot be found in CConsoleApplication::$commandMap fixed (resurtm)
+- Bug #962: Fixed handling of negative timestamps in CDateFormatter::format() (johnmendonca)
+- Bug #1094: CListView with enabled history used to clear page title in case sorting or paging performed (Opera and Firefox only) (mdomba, resurtm)
+- Bug #1095: Added missing retry_interval parameter of addServer function call in CMemCache (Lisio)
+- Bug #1181: Fixed can read but not save binary data e.g. BYTEA on PostgreSQL (karmakaze)
+- Bug #1212: Added missing .gitignore files to the application generated by WebAppCommand (resurtm)
+- Bug #1249: CHttpRequest::sendFile() outputs malformed file content in some specific circumstances (andyhu)
+- Bug #1279: CHttpRequest::sendFile() now always sends valid content-header (Ragazzo)
+- Bug #1330: SQLite column default value was incorrect for column of type string and DEFAULT NULL (cebe)
+- Bug #1344: Fixed URL problem in CGridView and CListView when enableHistory was true and unicode chars where used (mdomba, Redjik)
+- Bug #1347: CDbTestCase: table name in fixtures list enclosed into double curly brackets (e.g. 'tasks'=>':{{task}}') didn't worked properly (resurtm)
+- Bug #1351: CClientScript::registerMetaTag() now allows to register multiple meta tags with the same set of attributes (klimov-paul)
+- Bug #1364: Empty CHtml::$errorCss cause class attribute rendering errors (creocoder)
+- Bug #1381: Ignore select given by criteria or scope on stat relation (cebe)
+- Bug #1392: HostInfo was appended to CHttpRequest::redirect() location in case of using protocol relative URLs (dInGd0nG, samdark)
+- Bug #1406: Fixed the issue that false value returned from CDbCommand could not be cached properly (mdomba)
+- Bug #1407: CDbCommandBuilder::createCountCommand() used to bind parameters for unused ORDER clause and unused SELECT part (resurtm)
+- Bug #1444: Fixed CGoogleApi::register call to registerScriptFile (mdomba)
+- Bug #1478: Fixed CWsdlGenerator error when using namespaced classes (Diego-Rocha)
+- Bug #1485: CSort does not quote table alias when using CDbCriteria (undsoft)
+- Bug #1492: Fixed jQuery calls when noConflict feature was used and jQuery code was returned by ajax calls (l-nagash)
+- Bug #1499: Fixed CVarDumper highlighting "\" (antoncpu)
+- Bug #1549: Fixed CFormatter::sizeFormat() to use translations from 'yii' category and corrected english default translation, also improved number formatting (cebe)
+- Bug #1552: Fixed potential vulnerability in CJavaScript::encode(): $safe parameter didn't used to be passed to the recursive method calls (resurtm)
+- Bug #1575: MessageCommand::extractMessages fails to ignore invalid category definitions (softark)
+- Bug #1584: Fixed CGridView and CListView urls when enableHistory was used with "path" urlFormat (mdomba)
+- Bug #1621: Fixed CCompareValidator to support {compareAttribute} in $message also on client-side (cebe)
+- Bug #1622: CLocale::getTerritory() used to return invalid territory name when locales (language tags) were specified without territory part (e.g. 'de', 'fr') (resurtm)
+- Bug #1624: Requirements page now tries all other preferred languages when the most preferred one is missing (ArtVal)
+- Bug #1625: CEmailLogRoute does not properly encode UTF8 characters contained in logs, CEmailLogRoute::$utf8 property added (mdomba, resurtm)
+- Bug #1628: Active HTTP sessions overwrote the Cache-Control header set by CHttpCacheFilter (DaSourcerer)
+- Bug #1646: CLocale::getTerritory() used to return invalid territory name when locales (language tags) were specified with script part (e.g. 'zh-Hans-CN', 'zh-Hant-HK') (resurtm)
+- Bug #1652: Fixed incorrect syntax of CDbSchema::renameTable() for SQLite, added CSqliteSchema::renameTable() method (Sarke)
+- Bug #1673: CHttpRequest::getPreferredLanguage now works according to RFC2616. Added CHttpRequest::getPreferredLanguages that returns all user accepted languages in order of preference (Rupert-RR, bwoester, cebe, samdark)
+- Bug #1676: Fixed listData() grouping when no group was specified (mdomba)
+- Bug #1716: Fixed CCodeModel::pluralize() and CConsoleCommand::pluralize() so it doesn't force lowercase the first letter in any words (nsanden)
+- Bug #1726: Fixed the error Undefined variable: json in CJSON.php when json_decode function did not exist (heyhoo)
+- Bug #1792: Fixed persistent access permissions when two identities were used in a single application run. (jhenriquemc, François Gannaz)
+- Bug #1853: CAssetManager::publish() method will throw an exception if $forceCopy and $linkAssets are both true (resurtm, mdomba)
+- Bug: Table schema is refreshed on Gii model generation when schemaCachingDuration is used (SonkoDmitry)
+- Bug: CDbCommand::setFetchMode wasn't accepting additional arguments needed for PDO::FETCH_CLASS (samdark)
+- Bug: CCaptchaAction::validate check wasn't working properly in some cases (samdark, Qiang)
+- Enh #84: Log route categories are now accepted in form of array. Added CLogRoute::except and parameter to CLogRoute::getLogs that allows you to exclude specific categories (paystey)
+- Enh #104: Added CWebLogRoute::$collapsedInFireBug property to control whether the log should be collapsed by default in Firebug (marcovtwout)
+- Enh #117: Added CPhpMessageSource::$extensionPaths to allow extensions, that do not have a base class to use as category prefix, to register message source (rcoelho, cebe)
+- Enh #144: baseID in CHtml::checkBoxList and CHtml::radioButtonList can now be customized via htmlOptions (cebe)
+- Enh #217: Added CTypeValidator::validateValue() and CTypeValidator::$strict, better check for arrays (samdark)
+- Enh #259: CHttpRequest::getRestParams is now public (samdark)
+- Enh #291: CFormatter::formatDate and formatDateTime now also accept strings in strtotime() format (francis_tm, cebe)
+- Enh #486: CHttpSession::$gCProbability and CDbHttpSession::$gCProbability are floats now. Minimal possible $gCProbability value has been changed to the ≈0.00000005% (1/2147483647), was integer 1% before, default value left unchanged (1%) (resurtm)
+- Enh #545: Add CDataProviderIterator to allow iteration over large data sets (phpnode)
+- Enh #556: CDbColumnSchema::$comment property has been added. It stores comment for the table column, comment retrieving is working for MySQL, PgSQL and Oracle (resurtm)
+- Enh #724: Third argument of CHtml::listData() now receives anonymous function as calculator of the text field value, PHP 5.3+ only (resurtm)
+- Enh #846: Added addPrimaryKey() / dropPrimaryKey() commands to CDbMigration (ridget)
+- Enh #949: Added COciSchema::resetSequence (jazahn, samdark)
+- Enh #990: Added CArrayDataProvider::$caseSensitiveSort property which allows to control whether sorting should be case sensitive (resurtm)
+- Enh #999: Changed md5() to crypt() in docs/guide/topics.auth, docs/blog and demos/blog. Added Wiki 425 tutorial on use of crypt() (tom--)
+- Enh #1084: CDateTimeParser: MMM pattern for parsing short month names is now locale aware (resurtm)
+- Enh #1146: CFileHelper::copyDirectory recursive directory creation (senz)
+- Enh #1183: CDbCommand: added andWhere()/orWhere() which appends condition to the WHERE part of the query, in contrary of CDbCommand::where() which replaces it (resurtm)
+- Enh #1184: CEmailValidator now supports IDN (Internationalized Domain Names), added CEmailValidator::$validateIDN property (resurtm)
+- Enh #1134: CAssetManager filepath creation now can be extended thru generatePath(). Path creation is now recursive in publish(). (senz)
+- Enh #1201: CMenu now supports HTML attributes for the links' wrap element specified in $linkLabelWrapper (resurtm)
+- Enh #1228: Added ability to MessageCommand to generate translation files for multiple functions (Arne-S, samdark)
+- Enh #1238: CJuiDatePicker is now using the native altField option to handle the hidden input when type flat is used (mdomba, christiansalazar)
+- Enh #1282: CDateTimeParser: added MMMM pattern for parsing standard month names such as 'January', 'Décembre' or 'März' (resurtm)
+- Enh #1286: CUrlValidator now supports IDN (Internationalized Domain Names), added CUrlValidator::$validateIDN property (resurtm)
+- Enh #1289: Added support for column comments for MSSQL (CDbColumnSchema::$comment property) (resurtm)
+- Enh #1299: Added CSRF token validation for PUT and DELETE (miraage, samdark)
+- Enh #1369: Added CCheckBoxColumn::disabled that accepts PHP expression or anonymous function determining if checkbox for the row should be disabled (sucotronic)
+- Enh #1386: Second parameter of the CHtml::value() is now able to accept anonymous function which calculates value to be used (Qiang, resurtm)
+- Enh #1396: Added 'text/csv' mime-type for the 'csv' file extension in utils/mimeTypes.php (effectively used by e.g. CHttpRequest::sendFile()) (rawtaz)
+- Enh #1426: Behaviors are now affecting memory consumption significantly less (slavcodev, creocoder, Qiang, samdark)
+- Enh #1443: Added CHttpRequest::getRawBody() that allows reading RAW HTTP request body multiple times (itamar82, resurtm, samdark)
+- Enh #1464: CCaptchaAction now supports rendering through ImageMagick, CCaptcha::checkRequirements() changed (resurtm, SonkoDmitry)
+- Enh #1500: CSqlDataProvider now supports CDbCommand in constructor (slavcodev)
+- Enh #1507: Added support for minOccurs, maxOccurs, nillable to CWsdlGenerator. Changed most of the methods visibility to protected. Added unit tests (lubosdz)
+- Enh #1518: Allow to configure CHtml::$closeSingleTags and CHtml::$renderSpecialAttributesValue. Useful for HTML5 code (creocoder)
+- Enh #1527: Added $id argument to CClientScript::registerMetaTag that allows you to override existing tags (Alex-Code)
+- Enh #1531: CArrayDataProvider is now able to sort cutted array, where sorting column is not available in every entry (Yiivgeny)
+- Enh #1535: HTML5 special attributes added to CHtml::renderAttributes() (creocoder)
+- Enh #1538: Added CListView::ajaxUpdateError for the possibility to use a custom ajax error handler (mdomba)
+- Enh #1567: Added filterSelector property to CGridView (MonkeyMaster)
+- Enh #1581: Added 'unselectValue' to CHtml::dropDownList() and CHtml::activeDropDownList() to define default post value if no option is selected in multiple mode (creocoder, mdomba)
+- Enh #1596: Added CGridView::rowHtmlOptionsExpression to allow set HTML attributes for the row (Ryadnov)
+- Enh #1657: CDbCommandBuilder::createUpdateCounterCommand now can be used with float values (samdark, hyzhakus)
+- Enh #1658: CFormatter::formatHtml() is now more flexible and customizable through new CFormatter::$htmlPurifierOptions property (resurtm)
+- Enh #2343: Added CRequiredValidator::$trim property which determines to trim attribute value or not (AnatolyRugalev)
+- Enh: Fixed the check for ajaxUpdate false value in jquery.yiilistview.js as that never happens (mdomba)
+- Enh: Requirements checker: added check for Oracle database (pdo_oci extension) and MSSQL (pdo_dblib, pdo_sqlsrv and pdo_mssql extensions) (resurtm)
+- Enh: Added CChainedLogFilter class to allow adding multiple filters to a logroute (cebe)
+- Enh: Allow CDataProvider to use custom pagination and sorter (creocoder)
+- Enh: Value of the CHtml::activeTextArea() can now be set through $htmlOptions['value'] (resurtm)
+- Enh: Allow to customize CHtml::error() container tag (creocoder)
+- Enh: CModule::setComponents() now can reconfigure already loaded components (creocoder)
+- Enh: CLocale::getWeekDayName() weekday-number argument is now more compatible with date() function, allowing 0 and 7 for sunday (Yiivgeny, cebe)
+- Enh: Added minified jQuery BBQ (samdark)
+- Chg #1193: Upgraded jQuery to 1.8.3 (samdark)
+- Chg #1373: Upgraded jquery star rating to 3.14 (samdark)
+- Chg #1548: Upgraded jQueryUI to 1.9.2 (samdark)
+- Chg #1563: Updated CTestCase for PHPUnit 3.7.7+ (tanakahisateru, samdark)
+- Chg #1746: CDbCriteria::mergeWith() is now more consistent with all other class methods (hyzhakus, samdark)
+- Chg: MSSQL unit tests updated and actualized, added SQLSRV driver support (resurtm)
+- Chg: Added Oracle unit tests (resurtm)
+- Chg: Updated CHttpCacheFilter to use dates as specified by RFC 1123 (bramp)
+- Chg: Added punycode.js v1.1.1 (http://mths.be/punycode) and IDNA Converter v0.8.0 (http://phlymail.com/en/downloads/idna-convert.html) to the vendors (third party libraries and utilities) (resurtm)
+- New: Ported offline documentation viewer from yiidoc project. Mainly usable for translations but can be used for reading offline as well (samdark)
+
+Version 1.1.12 August 19, 2012
+------------------------------
+- Bug #190: WSDL return tag was not generated by CWsdlGenerator when Macintosh line endings were used inside service describing docblock (resurtm)
+- Bug #1066: CMemCache: expiration time higher than 60*60*24*30 (31536000) seconds led the value to expire right away after saving (resurtm)
+- Bug #1072: Fixed the problem with getTableAlias() in defaultScope() (creocoder)
+- Bug #1076: CJavaScript::encode() was not compatible with PHP 5.1 (samdark)
+- Bug #1077: Fixed the problem with alias in CSort (creocoder)
+- Bug #1083: CFileValidator is now unsafe by default. This will prevent setting attribute when no file was uploaded (samdark)
+- Bug #1087: Reverted changes to CCookieCollection::add() introduced in 1.1.11 as they were triggering E_STRICT on some old PHP-versions (suralc)
+- Bug #1088: Fixed usage of proper CActiveForm id property when it's supplied with htmlOptions (mdomba)
+- Bug #1094: CGridView with enabled history used to clear page title in case sorting or paging performed (Opera and Firefox only) (resurtm)
+- Bug #1109: Fixed "js:" encoding BC-break in CHtml::ajax() and related methods introduced in 1.1.11 (samdark)
+- Bug #1120: Fixed duplicate events processing in CGridView when ENTER was pressed for filtering (mdomba)
+- Bug #1192: CHttpCacheFilter failed to comply with RFC 2616, section 10.3.5 (DaSourcerer)
+- Bug #1207: Fixed an issue in CHtml::resolveValue() which occurs when handling tabular data input (Qiang)
+- Bug #1225: Fixed the bug that $.fn.yiiGridView.getChecked was not working always if a custom CGridView::template was used (mdomba)
+- Bug #1243: Fixed the bug that when using CUrlManager::addRules with $append=false rules were added in reverse order (samdark)
+- Enh #243: CWebService is now able to deal with the customized WSDL generator classes, was hardcoded to the CWsdlGenerator before, added CWebService::$generatorConfig property (resurtm)
+- Enh #636: CManyManyRelation now parses foreign key for the junction table data internally, and provide public interface to access it (klimov-paul)
+- Enh #1163: CGridview does not create empty class attributes anymore (cebe)
+- Chg #1099: Changed connectionId dropdown to sticky text field in Gii model generator (mdomba)
+- Chg #1167: Reverted back the change to CComponent::evaluateExpression() about global function support (Qiang)
+
+Version 1.1.11 July 29, 2012
+----------------------------
+- Bug #098: No correct identity value being returned when using Active Record and mssql (c-schmitz)
+- Bug #114: CUniqueValidator and CExistValidator now respect table alias while creating db query condition (klimov-paul)
+- Bug #145: CGettextMoFile now can parse strings with no context (eagleoneraptor)
+- Bug #148: Fixed the bug in the blog demo that was not deleting right comment when not on the first page (mdomba)
+- Bug #161: CCookieCollection::remove() now accepts an array of cookie options as a second argument to facilitate correct cookie removal (maximcherny)
+- Bug #164: CEmailValidator.checkPort now checks the port 25 of listed MX servers (DaSourcerer)
+- Bug #178: webapp creation with relative paths like ../ was not working correctly (cebe)
+- Bug #193: Changed datetime column type for postgresql from 'time' to 'timestamp' (cebe)
+- Bug #238: Fixed the problem that empty row could be selected in CGridView when there was no data (mdomba)
+- Bug #295: Sometimes CJSON::decode returns null because native json_encode has bugs and returns null. Workaround to continue decoding when result of json_decode is null (luislobo)
+- Bug #381: Fixed the bug that Gii model name input could get misspelled when autocomplete is used (mdomba)
+- Bug #417: CAttributeCollections::mergeWith() does not take into account the caseSensitive (dmtrs)
+- Bug #433: Fixed the bug that Gii model name input autocomplete was not working sometimes (mdomba)
+- Bug #449: CDbHttpSession and CDbLogRoute now use query builder instead of DAO for proper quoting (mdomba, redguy)
+- Bug #454: Removed translation on CDbConnection exception as it was creating an endless loop if the application used CDbCache (mdomba)
+- Bug #517: Rule parameter sub-patterns are not checked correctly (ranvis)
+- Bug #539: Fixed CUrlRule::createUrl() to treat sub-patterns as Unicode as parseUrl() does (ranvis)
+- Bug #553: Criteria of related AR finders was affected after performing find with relational scopes (marcovtwout)
+- Bug #618: Fixed caching of CWebUser::checkAccess() when it is called first time with and second time without $params (cebe)
+- Bug #660: Fixed error when calling CDbCache::getValues (zilles)
+- Bug #697: Fixed WSDLGenerator now generating proper namespace for certain complexTypes (BBoom)
+- Bug #749: CActiveRecord::refresh() did not work in afterSave() for new records, will now always refresh, when db entry exists (cebe)
+- Bug #769: Fixed the bug that $.fn.yiiGridView.getSelection was not working always if a custom CGridView::template was used (mdomba)
+- Bug #772: CHttpRequest::getIsSecureConnection() was failing on some conditions (bulletbee, samdark)
+- Bug #773: CGridView filters now filter on enter key in Internet Explorer (BBoom)
+- Bug #803: Arbitary non-sorting links in CDataColumn's header were not working proper way (resurtm)
+- Bug #827: Fixed the problem that CJuiSliderInput was rendering a name attribute for div element (mdomba)
+- Bug #842: Active Records insert fails in MSSQL if a column has a default value of (NULL) (c-schmitz)
+- Bug #852: Fixed the problem that CActiveForm was not revalidating fields if ajax submit was used (mdomba)
+- Bug #859: Fixed CSort::applyOrder() and CSort::getOrderBy() to use custom table aliases (troch, samdark)
+- Bug #865: CLogRoute called processLogs() even if log array was empty and caused empty emails and log files (cebe)
+- Bug #879: Fixed a possible PHP error caused by CWebUser::restoreFromCookie() in combination with CHttpRequest.enableCookieValidation (kidol)
+- Bug #901: Fixed possible encoding problem on exception (mdomba, samdark, cebe)
+- Bug #1000: Added params to profiling token in CDbCommand::execute() to be consitent with CDbCommand::queryInternal() (cebe)
+- Bug #1045: Building a query with empty array as parameter will not result in a broken sql-string anymore(suralc)
+- Bug: Fixed CMenu::isItemActive() to work properly when there is a hash in the item's url (SlKelevro)
+- Bug: Added missing return statement to CAuthItem->revoke() (mdomba)
+- Bug: CHtml::resolveValue() ignoring of array elements accessor at the beginning of the $attribute argument now works properly (resurtm)
+- Enh #120: Added ability to set cookies in an object based style without specifying the cookie-name twice (suralc)
+- Enh #136: Added ability to select database connection in Gii model generator (samdark)
+- Enh #157: Added ability to use models with objects implementing ArrayAccess as properties in CHtml::resolveValue (samdark)
+- Enh #165: Allow CCacheDependency to be reusable across multiple cache calls (phpnode)
+- Enh #171: Added support for PUT and DELETE request tunneled through POST via parameter named _method in POST body (musterknabe)
+- Enh #179: CLogger now supports filtering profile timings by multiple & wildcard categories (intel352)
+- Enh #191: Added ability to customize HTML classes of CLinkPager via its public properties (mashingan)
+- Enh #206: Added ability to pass CDbCriteria object as AR relation parameter (samdark)
+- Enh #215: Added tokens to CGridView::updateSelectors to allow adding custom selectors instead replacing only (mdomba)
+- Enh #220: The URL pointing to the Google API in CGoogleApi is now protocol relative (suralc)
+- Enh #237: The tabs of CTabView now support the property 'visible' (DaSourcerer)
+- Enh #255: Sort CArrayDataProvider when elements is CActiveDataProvider or other object (rusmaxim)
+- Enh #266: Add support for HTML5 url, email, number, range and date fields to CHtml (gregmolnar)
+- Enh #267: CDbHttpSession is now able to store binary payload such as the output of the igbinary serializer (DaSourcerer, samdark)
+- Enh #282: Added CCheckBoxColumn::headerTemplate to allow custom headers (mdomba)
+- Enh #286: Added wildcard token to CDateTimeParser (cebe)
+- Enh #294: Added deniedCallback to CAccessControlFilter and CAccessRule to allow forwarding control to a method on denial (luislobo)
+- Enh #342: Added ability to pass parameters for RBAC bizRules from CAccessControlFilter configuration (claudejanz, samdark)
+- Enh #356: Improved extendability of CDetailView by adding method renderItem() (cebe)
+- Enh #369: Added $hashKey to CCache (kidol)
+- Enh #414: Added sort parameter to yiic message command that sorts messages by key when merging (ranvis)
+- Enh #455: Added support for default value in CConsoleCommand::prompt (eagleoneraptor)
+- Enh #551: Added $safe parameter to CJavaScript::encode. If set to true, 'js:' will not be allowed. If you need to pass JavaScript, wrap your code with CJavaScriptExpression instead (samdark)
+- Enh #552: Added support for http-level caching via CHttpCacheFilter (DaSourcerer)
+- Enh #568: CHtml::getIdByName() will now convert spaces to underscore to get proper ID for HTML elements (mdomba)
+- Enh #578: Added extension checks to CMemCache (samdark)
+- Enh #581: Added formatSize method in CFormatter to format file sizes into units of different order - KB, MB, etc (brilyuhns, samdark)
+- Enh #584: Refactored WebAppCommand to be more customizable, added more PHPDoc (samdark)
+- Enh #599: Added case sensitivity check when autoloading classes (qiangxue)
+- Enh #601: added the method loginRequired() to the IWebUser interface (mdomba)
+- Enh #616: CVarDumper is now correctly highligting integer array keys (vernes, samdark)
+- Enh #641: Added support for customizing serialization methods for cache components (DaSourcerer, Qiang)
+- Enh #648: Added filterHtmlOptions property to the CGridColumn component (juban)
+- Enh #652: Added namespace to yiiGridView events, so they can be easily removed by .off() jQuery method (Bethrezen)
+- Enh #673: Changed CClientScript::scripts to be public (mdomba)
+- Enh #675: CDateFormat::format() now returns null if the parameter $time is null (mdomba)
+- Enh #690: Added sender name and proper headers for UTF8 encoding when sending e-mail in SiteController->actionContact() (mdomba)
+- Enh #766: Added 'userId' to $params in CDbAuthManager::checkAccess() and CPhpAuthManager::checkAccess() (cebe)
+- Enh #666: Added property $except to CValidator, a list of scenarios that the validator should not be applied to (resurtm)
+- Enh #839: CListView::renderItems now resolves view file only once (nizsheanez)
+- Enh #938: CFileValidator::sizeToBytes() is now public and available for using in the whole application (resurtm)
+- Enh #943: CDateTimeParser is now able to parse short textual representation of month, e.g. Jan, Jun, Aug (resurtm)
+- Enh #967: Commands from YII_CONSOLE_COMMANDS environment variable are now always added to yiic console application (schmunk)
+- Enh: CFileValidator could validate uploaded file by its MIME-type, added $mimeTypes and $wrongMimeType properties (resurtm)
+- Enh: Fixed romanian translation to use the better-supported cedilla characters (tudorilisoi)
+- Enh: Added default value to CConsoleCommand::confirm (musterknabe)
+- Enh: Allowed returning integer values as application exit code in CConsoleCommand actions (cebe)
+- Enh: Added third parameter to CHttpCookie to configure the cookie by array (suralc)
+- Enh: Added getIsFlashRequest(), proper handling of Flash/Flex request when using CWebLogRoute with FireBug (resurtm)
+- Enh: Added CBreadcrumbs::$activeLinkTemplate and CBreadcrumbs::$inactiveLinkTemplate properties which allows to change each item's template (resurtm)
+- Enh: Added full-featured behaviors and events CConsoleCommand::onBeforeAction & CConsoleCommand::onAfterAction (Yiivgeny)
+- Enh: Added HTML5 history support on ajax requests on CGridView and CListView using History.js v1.7.2-r2 (https://github.com/balupton/history.js) from Benjamin Arthur Lupton (lightglitch)
+- Enh: Changed CldrCommand to use medium dateTimeFormat and updated 18n data using newest(6546) CLDR (tanakahisateru)
+- Enh: Added CErrorHandler::getHttpHeader() to send correct HTTP error codes (pgaultier)
+- Enh: CGridView, only rows in tbody should have hover effect (mdomba)
+- Enh: CClientScript::$defaultScriptFilePosition and CClientScript::$defaultScriptPosition for controlling default $position argument for registerScriptFile and registerScript (resurtm)
+- Enh: CHttpCookie now implements __toString (suralc)
+- Enh: Ability to set namespace for module controllers using CWebModule::controllerNamespace, documentation about using namespaced controllers and modules (samdark)
+- Enh: Added possibility to set the container for CHtml::radioButtonList and CHtml::checkBoxList() (pgaultier)
+- Enh: Added zii romanian(ro) translation; edited core messages to include proper romanian characters with diacritic marks (tudorilisoi)
+- Enh: Added ILogFilter interface as an alternative to using CLogFilter as base class for implementing log filters (cebe)
+- Enh: CAssetManager, added $forceCopy property which globally forces publication of asset files and directories (resurtm)
+- Enh: WebAppCommand has ability to generate fresh application with git or hg specific files (resurtm)
+- Enh: Gii default templates: added additional metadata (PHPDoc) of the variables passed into views for better IDE autocompletion (resurtm)
+- Enh: WebAppCommand generated application: added additional metadata (PHPDoc) of the variables passed into views for better IDE autocompletion (resurtm)
+- Enh #1053: CComponent::evaluateExpression will allow using global functions as callbacks (Ekstazi)
+- Chg #384: CWebUser::changeIdentity() will now delete old unused session data file (Qiang)
+- Chg #440: Upgraded JQuery UI to 1.8.22 (samdark)
+- Chg #497: Added log component and preloaded it in default console application config in order to properly log errors (samdark)
+- Chg: Upgraded jQuery to 1.7.2 (samdark)
+- Chg: More unit tests added for CHtml (resurtm)
+- Chg: Upgraded bundled markdown parser to v1.2.5 (DaSourcerer)
+- New: Added TranslationsCommand build command aimed to help translation teams (samdark)
+
Version 1.1.10 February 12, 2012
--------------------------------
- Bug Fixed the bug introduced in 1.1.9 CActiveForm required field was not validated if left empty (mdomba)
@@ -181,6 +590,7 @@ Version 1.1.8 June 26, 2011
- Chg #2482: CWebService will not display source file name and error line number in production mode (Qiang)
- Chg #2496: Setting CDbConnection::$emulatePrepare to be false will now explicitly set PDO::ATTR_EMULATE_PREPARES to be false (Qiang)
- Chg: Changed CHtml::clientChange event binding to support custom event types and avoid conflicts when using AJAX (Sam Dark)
+- Chg: Changed all js live() calls with on() as live() is deprecated (mdomba)
Version 1.1.7 March 27, 2011
----------------------------
@@ -1204,7 +1614,7 @@ Version 1.0.2 February 1, 2009
Version 1.0.1 January 4, 2009
-----------------------------
-- Bug #41: missing function CHttpRequest:: getCsrfTokenFromCookie() (Qiang)
+- Bug #41: missing function CHttpRequest::getCsrfTokenFromCookie() (Qiang)
- Bug #42: Wrong links in crud generated admin view (Qiang)
- Bug #45: Many-to-many relation does not work when both foreign tables are the same (Qiang)
- Bug #47: Wrong url parsing when CUrlManager is set in path format (Qiang)
2  framework/LICENSE
View
@@ -1,7 +1,7 @@
The Yii framework is free software. It is released under the terms of
the following BSD License.
-Copyright © 2008-2011 by Yii Software LLC (http://www.yiisoft.com)
+Copyright (c) 2008-2013 by Yii Software LLC (http://www.yiisoft.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without
285 framework/UPGRADE
View
@@ -1,6 +1,5 @@
-
- Upgrading Instructions for Yii Framework v1.1.10
- ===============================================
+ Upgrading Instructions for Yii Framework v1.1.14
+ ================================================
!!!IMPORTANT!!!
@@ -9,21 +8,161 @@ if you want to upgrade from version A to version C and there is
version B between A and C, you need to following the instructions
for both A and B.
-General upgrade intructions
----------------------------
+General upgrade instructions
+----------------------------
- Make a backup.
- Clean up your 'assets' folder.
-- Replace 'framework' dir with the new one or point SVN to a fresh
+- Replace 'framework' dir with the new one or point GIT to a fresh
release and update.
- Check if everything is OK, if not — revert from backup and post
issues to Yii issue tracker.
+Upgrading from v1.1.13
+----------------------
+
+- CActiveRecord::count() now respects group by and having. If your code relied
+ on ignoring it your application may break and should be updated.
+
+- Vendors: phlymail's Net_IDNA was replaced by PEAR Net_IDNA2. The latter library is better maintained than the former.
+ In case your code relies on bundled phlymail's Net_IDNA you should change it a bit. Old way of encoding IDNs:
+
+ require_once(Yii::getPathOfAlias('system.vendors.idna_convert').DIRECTORY_SEPARATOR.'idna_convert.class.php');
+ $idnaConvert=new idna_convert();
+ $result=$idnaConvert->encode($value);
+
+ New:
+
+ require_once(Yii::getPathOfAlias('system.vendors.Net_IDNA2.Net').DIRECTORY_SEPARATOR.'IDNA2.php');
+ $idna=new Net_IDNA2();
+ $result=$idna->encode($value);
+
+- CAPTCHA appearance has been changed. Non-free Duality.ttf font (used by CCaptchaAction) replaced by open/free
+ SpicyRice.ttf. New font is distributed under SIL Open Font License version 1.1. Do not forget to adjust font path
+ in case your application relies on Duality.ttf font file.
+
+- CSecurityManager::computeHMAC() method is now public and third parameter has been added. You must change signature
+ of this method in the extended child class to fit new circumstances. Otherwise an E_STRICT error will be issued.
+
+- CClientScript::registerScriptFile() and CClientScript::registerScript() methods signature changed.
+ Update your subclasses that override registerScriptFile() or registerScript() if any.
+
+- CActiveRecord::refreshMetaData() now clears meta data for all objects of the particular Active Record class.
+ Also CActiveRecord::refreshMetaData() will not create new meta data at once - new CActiveRecordMetaData instance
+ will be created on the first demand.
+
+- Oracle related note: in case you're using COciSchema::resetSequence() or CDbSchema::resetSequence() methods with
+ the Oracle database, keep in mind that its behavior has changed to be consistent with the same methods for
+ the other database management systems. Please refer to its documentation for more details and don't forget
+ to adjust your code respectively.
+
+- Signature of the CJuiInputWidget::resolveNameID() method has changed. If you're overriding this method you must
+ change your code to fit it. This method now accepts two parameters, it means you have to adjust code of the
+ overlapped descendant method signature as follows:
+
+ protected function resolveNameID($nameProperty='name',$attributeProperty='attribute')
+
+ And ancestor method call to:
+
+ parent::resolveNameID($nameProperty,$attributeProperty);
+
+- In case you've used your own relation types extended from `CHasOneRelation` or
+ `CHasManyRelation` make sure you update these to reflect moving `through` property
+ from both these to `CActiveRelation`.
+
+- CSecurityManager::generateRandomKey() has been deprecated in favor of CSecurityManager::generateRandomString().
+ Try not to use it anymore and avoid CSecurityManager::generateRandomKey() method in your code.
+
+Upgrading from v1.1.12
+----------------------
+- Both jQuery and jQueryUI were updated. Check [jQuery UI upgrade guide](http://jqueryui.com/upgrade-guide/1.9/)
+ and [jQuery release notes](http://blog.jquery.com/2012/08/09/jquery-1-8-released/).
+
+- We completed the behavior of CFormatter::sizeFormat() which has been introduced in Yii 1.1.11. If you are using it with your own translation file
+ you have to move your translations to the `yii` category in `yii.php` file which is handled by the application component `coreMessages`.
+ We also fixed the default translation strings to be correct English and apply to choice format, so you have to adjust your translation file keys.
+
+- Be sure to clean all your existing cache during the upgrade. The cache values from CDbCommand has been
+ changed to an array to be able to store false values (returned when no records are found).
+
+- Make sure all your event handlers in behaviors are public methods, as we are not supporting protected methods as event handlers anymore.
+
+- We fixed the calls to CActiveRecord::beforeFind() for consistency so that beforeFind() now always gets called for every relation
+ on eager loading even if the main query does not return a result. This has been the case for all CActiveRecord::find*()-methods
+ already but now also applies for findBySql() and findAllBySql().
+
+- Criteria modification in CActiveRecord::beforeFind() did not apply to the query when model was loaded in a relational context.
+ Since version 1.1.13 changes to query criteria made in beforeFind() now also apply to the query when model is loaded in a relational context.
+ The main problem here is that you can not use the `t`-alias for your table anymore, you have to change your code to
+ use the table alias currently in use as this is different in relational context.
+ You can get that alias by calling `$this->getTableAlias();` in your active record class
+ or `$this->owner->getTableAlias()` in behavior context.
+
+ Example:
+ $criteria->condition = 't.myfield = 1';
+ You need to change that to:
+ $alias = $this->owner->getTableAlias();
+ $criteria->condition = $alias.'.myfield = 1';
+
+- Make sure you are using `CCaptcha::checkRequirements()` method for checking whether CAPTCHA could be rendered successfully in your environment.
+ `extension_loaded('gd')` expression is not enough and wrong because CAPTCHA could be rendered via ImageMagick with fallback to GD since 1.1.13
+ (thus checking code is not simple as it seems).
+
+- In case you're using MSSQL driver make sure authentication credentials you use have permissions to use
+ `sys.extended_properties` system view. This is critical for retrieving additional metadata on tables.
+
+Upgrading from v1.1.11
+----------------------
+- Changes in CCookieCollection::add() (introduced in 1.1.11) were reverted as they were triggering E_STRICT on some old PHP-versions
+ If your application relies on these newly added changes. You should change your code from
+
+ $cookies->add(new CHttpCookie($name, $value));
+ to
+ $cookies[$name] = new CHttpCookie($name, $value);
+
+
+- CActiveRecord::resetScope() method signature changed. Please update your subclasses that override resetScope() if any.
+
+Upgrading from v1.1.10
+----------------------
+- API of public method CConsoleCommand::confirm() changed. If you are overriding this method make sure to update your code.
+ The method now has a 2nd parameter for the default value which will be used if no selection is made, so you have to
+ adjust the signature to fit
+
+ public function confirm($message,$default=false)
+
+ and the parent call to
+
+ parent::confirm($message,$default);
+
+- API of protected method CConsoleCommand::afterAction() changed, if you are overriding this method make sure to update your code.
+ method now has a 3rd parameter for application exit code, so you have to adjust the signature to fit
+
+ protected function afterAction($action,$params,$exitCode=0)
+
+ and the parent call to
+
+ parent::afterAction($action,$params,$exitCode);
+
+- CDateFormat::format() now will return null if the parameter $time is null. Previously it would return 1/1/1970.
+
+- If you are using CJavaScript::encode in your application with parameter coming
+ from user input, set second argument to true:
+
+ CJavaScript::encode($userInput, true);
+
+ It will disable prefixing parameters with "js:". If you need to pass JavaScript
+ expression it's now preferrable to wrap these with CJavaScriptExpression:
+
+ CJavaScript::encode(new CJavaScriptExpression('alert("Yii!");'), true);
+
+ Note that second "safe" parameter doesn't affect CJavaScriptExpression in any way.
+
Upgrading from v1.1.9
---------------------
- Previously xSendFile() was returning false if the file was not found.
-This has been removed to allow relative file paths. If you are relying on this check,
-you will need to do it manually before calling xSendFile().
+ This has been removed to allow relative file paths. If you are relying on this check,
+ you will need to do it manually before calling xSendFile().
Upgrading from v1.1.8
---------------------
@@ -31,26 +170,26 @@ Upgrading from v1.1.8
Yii::createComponent, new CPagination directly and CHtml::activeId respectively.
- In CErrorHandler::handleException() the checking for ajax call has been removed
-as it was preventing to customize the display of the exception during an ajax call.
+ as it was preventing to customize the display of the exception during an ajax call.
- Previously in case of validation error the CSS "error" class was not added to the row container at all when
-checkBoxList or radioButtonList where used. This is fixed now and proper "error" CSS class is added to the row
-container but in case of validation error, all labels from the list are shown in red because of the CSS rule.
+ checkBoxList or radioButtonList where used. This is fixed now and proper "error" CSS class is added to the row
+ container but in case of validation error, all labels from the list are shown in red because of the CSS rule.
-To fix this and display only the attribute label in red:
+ To fix this and display only the attribute label in red:
-in <projectdir>/css/form.css the line:
+ in <projectdir>/css/form.css the line:
div.form div.error label
-should be changed to
+ should be changed to
div.form div.error label:first-child
- If you've used "through" ActiveRecord option in your relation definitions it's good to update code as shown below.
-Old style of defining this option still works but is now deprecated.
+ Old style of defining this option still works but is now deprecated.
-Change
+ Change
~~~
class Group extends CActiveRecord
@@ -65,7 +204,7 @@ class Group extends CActiveRecord
}
~~~
-to
+ to
~~~
class Group extends CActiveRecord
@@ -84,12 +223,12 @@ class Group extends CActiveRecord
Upgrading from v1.1.7
---------------------
- CDbAuthManager will now quote columns and tables referenced in its SQL code.
-If your auth tables were created in a case-insensitive fashion (e.g. on PostgreSQL)
-while your DBMS is case-sensitive, this change may cause DB query errors.
-To fix this issue, you will have to rename the table names and columns, or re-create
-the auth tables by following the SQL code given in framework/web/auth/*.sql.
+ If your auth tables were created in a case-insensitive fashion (e.g. on PostgreSQL)
+ while your DBMS is case-sensitive, this change may cause DB query errors.
+ To fix this issue, you will have to rename the table names and columns, or re-create
+ the auth tables by following the SQL code given in framework/web/auth/*.sql.
- jQuery was upgraded to 1.6.1. Check your client side code and if you have issues consider
-downgrading to 1.5.1 or 1.4.4.
+ downgrading to 1.5.1 or 1.4.4.
Upgrading from v1.1.6
@@ -137,14 +276,14 @@ Upgrading from v1.1.3
Upgrading from v1.1.2
---------------------
- When using the skin feature, you now need to explicitly configure
-the 'enableSkin' property of 'widgetFactory' application component
-to be true. Also, if you have configured the 'widgets' property, you
-should rename it to be 'skinnableWidgets'. These changes are due to
-the introduction of the global widget customization feature.
-Please see the guide (the "Theming" section) for more details.
+ the 'enableSkin' property of 'widgetFactory' application component
+ to be true. Also, if you have configured the 'widgets' property, you
+ should rename it to be 'skinnableWidgets'. These changes are due to
+ the introduction of the global widget customization feature.
+ Please see the guide (the "Theming" section) for more details.
- CAutoComplete is now deprecated and will be removed in Yii 1.2. Consider
-using CJuiAutoComplete.
+ using CJuiAutoComplete.
- Now it's not possible to reuse CActiveFinder. So if you have code like this:
@@ -160,7 +299,7 @@ using CJuiAutoComplete.
$posts2 = Post::model()->with('comments');
- The 'condition' declared in the scopes of the related AR classes will now
-be put in the 'ON' clause of the JOIN statement when performing relational AR queries.
+ be put in the 'ON' clause of the JOIN statement when performing relational AR queries.
Upgrading from v1.1.1
@@ -169,35 +308,35 @@ Upgrading from v1.1.1
Upgrading from v1.1.0
---------------------
- CHtml::beginForm() will automatically generate hidden fields to represent
-the parameters in the query string when the form uses GET method.
-To avoid submitting duplicated query parameters, you may use createUrl()
-to explicitly specify the action of the form. You may also need to remove
-the hidden fields that you previously render for the same purpose.
+ the parameters in the query string when the form uses GET method.
+ To avoid submitting duplicated query parameters, you may use createUrl()
+ to explicitly specify the action of the form. You may also need to remove
+ the hidden fields that you previously render for the same purpose.
- The code generated by yiic tool is changed. If you are using yiic tool
-to generate new CRUD code on a previously generated skeleton, you are recommended
-to run "yiic webapp" again to re-generate the skeleton. Make sure you backup
-your work before you do this.
+ to generate new CRUD code on a previously generated skeleton, you are recommended
+ to run "yiic webapp" again to re-generate the skeleton. Make sure you backup
+ your work before you do this.
- CMenu now renders the 'active' CSS class for the 'li' tag instead of the
-hyperlink tag. You should adjust your CSS code accordingly if you use CMenu
-in your application.
+ hyperlink tag. You should adjust your CSS code accordingly if you use CMenu
+ in your application.
- CUrlManager::parsePathInfo() is changed to be non-static. If you override
-this method or your existing code calls this method directly (neither is common),
-you need to change your code accordingly.
+ this method or your existing code calls this method directly (neither is common),
+ you need to change your code accordingly.
- CController::forward() will exit the application by default now. If you want
-to keep the old behavior, you may pass false as the second parameter.
+ to keep the old behavior, you may pass false as the second parameter.
- The jQuery copy included in the framework has been upgraded to version 1.4.2.
-This may cause some incompatibility problems to your existing jQuery code or plugins.
-If you want to keep using version 1.3.2, you may do so by configuring
-CClientScript::scriptMap property.
+ This may cause some incompatibility problems to your existing jQuery code or plugins.
+ If you want to keep using version 1.3.2, you may do so by configuring
+ CClientScript::scriptMap property.
- The default theme for JQuery UI widgets was changed from 'smoothness' to 'base'.
-If you are using 'smoothness', you will need to manually download this theme from
-jqueryui.com and configure the 'theme' property of the JQuery UI widgets accordingly.
+ If you are using 'smoothness', you will need to manually download this theme from
+ jqueryui.com and configure the 'theme' property of the JQuery UI widgets accordingly.
Upgrading from v1.1rc
@@ -212,18 +351,18 @@ Upgrading from v1.1b
Upgrading from v1.1a
--------------------
- CSort::attributes is changed. Now the array keys refer to attribute names
-and array values refer to virtual attribute definitions. Please read the
-API documentation for this property to learn more details. This change will
-affect your code only when you explicitly specify this property.
+ and array values refer to virtual attribute definitions. Please read the
+ API documentation for this property to learn more details. This change will
+ affect your code only when you explicitly specify this property.
Upgrading from v1.0.x
---------------------
- Application and module parameter names are changed to be case-sensitive.
-In 1.0.x, they are case-insensitive.
+ In 1.0.x, they are case-insensitive.
- For tabular input, using Field[$i] is not valid anymore. Attribute names
-should look like [$i]Field in order to support array-typed fields
-(e.g. [$i]Field[$index]).
+ should look like [$i]Field in order to support array-typed fields
+ (e.g. [$i]Field[$index]).
- Please read the Guide for further details on how to upgrade from v1.0.x to v1.1.
@@ -242,34 +381,34 @@ Upgrading from v1.0.9
Upgrading from v1.0.8
---------------------
- ActiveRecord lazy loading is changed for optimization purpose. Previously,
-when lazy loading occurs, the related table will be joined with the primary
-table. Now, the related table will be queried without joining the primary table.
-As a result, if you are using lazy loading and the corresponding relation
-declaration includes reference to the primary table, the query will fail.
-To fix this problem, please specify the lazy loading query options with the
-actual primary table column values.
+ when lazy loading occurs, the related table will be joined with the primary
+ table. Now, the related table will be queried without joining the primary table.
+ As a result, if you are using lazy loading and the corresponding relation
+ declaration includes reference to the primary table, the query will fail.
+ To fix this problem, please specify the lazy loading query options with the
+ actual primary table column values.
Upgrading from v1.0.7
---------------------
- A directory imported using Yii::import() will have precedence over
-any existing include paths. For example, if we import 'application.models.*',
-then the corresponding directory will be searched before any other
-existing include paths. This also means, a directory imported later will
-have precedence over directories imported earlier. Previously, this order
-was reversed. This change may affect you if you have several classes with
-the same name and they are imported via different directories. You will need
-to adjust the import order of these directories to make sure your existing
-applications are not broken due to this change.
+ any existing include paths. For example, if we import 'application.models.*',
+ then the corresponding directory will be searched before any other
+ existing include paths. This also means, a directory imported later will
+ have precedence over directories imported earlier. Previously, this order
+ was reversed. This change may affect you if you have several classes with
+ the same name and they are imported via different directories. You will need
+ to adjust the import order of these directories to make sure your existing
+ applications are not broken due to this change.
Upgrading from v1.0.6
---------------------
- Default named scope will no longer be applied to INSERT, UPDATE and
-DELETE queries. It is only applied to SELECT queries. You should be aware
-of this change if you override CActiveRecord::defaultScope() in your code.
+ DELETE queries. It is only applied to SELECT queries. You should be aware
+ of this change if you override CActiveRecord::defaultScope() in your code.
- The signature of CWebUser::logout() is changed. If you override this method,
-you will need to modify your method declaration accordingly.
+ you will need to modify your method declaration accordingly.
Upgrading from v1.0.5
@@ -279,10 +418,10 @@ Upgrading from v1.0.5
Upgrading from v1.0.4
---------------------
- CWebUser::checkAccess() takes an additional parameter to allow caching
-the access check results. If you override this method, you will need to
-modify your method declaration accordingly. Because the new parameter will
-enable caching the access check results by default, please double check
-your code containing this method call to make sure the behavior is as expected.
+ the access check results. If you override this method, you will need to
+ modify your method declaration accordingly. Because the new parameter will
+ enable caching the access check results by default, please double check
+ your code containing this method call to make sure the behavior is as expected.
- CDateParser has been renamed to CDateTimeParser
21 framework/YiiBase.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
* @package system
* @since 1.0
@@ -80,7 +80,7 @@ class YiiBase
*/
public static function getVersion()
{
- return '1.1.13';
+ return '1.1.14';
}
/**
@@ -287,8 +287,14 @@ public static function import($alias,$forceInclude=false)
return $alias;
}
else
- throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing directory.',
- array('{alias}'=>$namespace)));
+ {
+ // try to autoload the class with an autoloader
+ if (class_exists($alias,true))
+ return self::$_imports[$alias]=$alias;
+ else
+ throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing directory or file.',
+ array('{alias}'=>$namespace)));
+ }
}
if(($pos=strrpos($alias,'.'))===false) // a simple class name
@@ -612,6 +618,9 @@ public static function t($category,$message,$params=array(),$source=null,$langua
* any other existing autoloaders.
* @param callback $callback a valid PHP callback (function name or array($className,$methodName)).
* @param boolean $append whether to append the new autoloader after the default Yii autoloader.
+ * Be careful using this option as it will disable {@link enableIncludePath autoloading via include path}
+ * when set to true. After this the Yii autoloader can not rely on loading classes via simple include anymore
+ * and you have to {@link import} all classes explicitly.
*/
public static function registerAutoloader($callback, $append=false)
{
@@ -656,6 +665,7 @@ public static function registerAutoloader($callback, $append=false)
'CEAcceleratorCache' => '/caching/CEAcceleratorCache.php',
'CFileCache' => '/caching/CFileCache.php',
'CMemCache' => '/caching/CMemCache.php',
+ 'CRedisCache' => '/caching/CRedisCache.php',
'CWinCache' => '/caching/CWinCache.php',
'CXCache' => '/caching/CXCache.php',
'CZendDataCache' => '/caching/CZendDataCache.php',
@@ -714,6 +724,7 @@ public static function registerAutoloader($callback, $append=false)
'COciSchema' => '/db/schema/oci/COciSchema.php',
'COciTableSchema' => '/db/schema/oci/COciTableSchema.php',
'CPgsqlColumnSchema' => '/db/schema/pgsql/CPgsqlColumnSchema.php',
+ 'CPgsqlCommandBuilder' => '/db/schema/pgsql/CPgsqlCommandBuilder.php',
'CPgsqlSchema' => '/db/schema/pgsql/CPgsqlSchema.php',
'CPgsqlTableSchema' => '/db/schema/pgsql/CPgsqlTableSchema.php',
'CSqliteColumnSchema' => '/db/schema/sqlite/CSqliteColumnSchema.php',
@@ -743,7 +754,9 @@ public static function registerAutoloader($callback, $append=false)
'CDateTimeParser' => '/utils/CDateTimeParser.php',
'CFileHelper' => '/utils/CFileHelper.php',
'CFormatter' => '/utils/CFormatter.php',
+ 'CLocalizedFormatter' => '/utils/CLocalizedFormatter.php',
'CMarkdownParser' => '/utils/CMarkdownParser.php',
+ 'CPasswordHelper' => '/utils/CPasswordHelper.php',
'CPropertyValue' => '/utils/CPropertyValue.php',
'CTimestamp' => '/utils/CTimestamp.php',
'CVarDumper' => '/utils/CVarDumper.php',
16 framework/base/CApplication.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -140,7 +140,18 @@ public function __construct($config=null)
$this->setBasePath('protected');
Yii::setPathOfAlias('application',$this->getBasePath());
Yii::setPathOfAlias('webroot',dirname($_SERVER['SCRIPT_FILENAME']));
- Yii::setPathOfAlias('ext',$this->getBasePath().DIRECTORY_SEPARATOR.'extensions');
+ if(isset($config['extensionPath']))
+ {
+ $this->setExtensionPath($config['extensionPath']);
+ unset($config['extensionPath']);
+ }
+ else
+ Yii::setPathOfAlias('ext',$this->getBasePath().DIRECTORY_SEPARATOR.'extensions');
+ if(isset($config['aliases']))
+ {
+ $this->setAliases($config['aliases']);
+ unset($config['aliases']);
+ }
$this->preinit();
@@ -292,6 +303,7 @@ public function getExtensionPath()
/**
* Sets the root directory that holds all third-party extensions.
* @param string $path the directory that contains all third-party extensions.
+ * @throws CException if the directory does not exist
*/
public function setExtensionPath($path)
{
4 framework/base/CApplicationComponent.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -47,7 +47,7 @@ public function init()
}
/**
- * Checks if this application component bas been initialized.
+ * Checks if this application component has been initialized.
* @return boolean whether this application component has been initialized (ie, {@link init()} is invoked).
*/
public function getIsInitialized()
2  framework/base/CBehavior.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
8 framework/base/CComponent.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -248,6 +248,7 @@ public function __unset($name)
* to implement the behavior feature.
* @param string $name the method name
* @param array $parameters method parameters
+ * @throws CException if current class and its behaviors do not have a method or closure with the given name
* @return mixed the method return value
*/
public function __call($name,$parameters)
@@ -318,6 +319,8 @@ public function detachBehaviors()
* @param string $name the behavior's name. It should uniquely identify this behavior.
* @param mixed $behavior the behavior configuration. This is passed as the first
* parameter to {@link YiiBase::createComponent} to create the behavior object.
+ * You can also pass an already created behavior instance (the new behavior will replace an already created
+ * behavior with the same name, if it exists).
* @return IBehavior the behavior object
*/
public function attachBehavior($name,$behavior)
@@ -593,6 +596,9 @@ public function raiseEvent($name,$event)
* that can be directly accessed in the expression. See {@link http://us.php.net/manual/en/function.extract.php PHP extract}
* for more details. In the expression, the component object can be accessed using $this.
*
+ * A PHP expression can be any PHP code that has a value. To learn more about what an expression is,
+ * please refer to the {@link http://www.php.net/manual/en/language.expressions.php php manual}.
+ *
* @param mixed $_expression_ a PHP expression or PHP callback to be evaluated.
* @param array $_data_ additional parameters to be passed to the above expression/callback.
* @return mixed the expression result
2  framework/base/CErrorEvent.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
2  framework/base/CErrorHandler.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
2  framework/base/CException.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
2  framework/base/CExceptionEvent.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
2  framework/base/CHttpException.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
3  framework/base/CModel.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -275,6 +275,7 @@ public function getValidators($attribute=null)
/**
* Creates validator objects based on the specification in {@link rules}.
* This method is mainly used internally.
+ * @throws CException if current class has an invalid validation rule
* @return CList validators built based on {@link rules()}.
*/
public function createValidators()
2  framework/base/CModelBehavior.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
2  framework/base/CModelEvent.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
2  framework/base/CModule.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
200 framework/base/CSecurityManager.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -80,16 +80,18 @@ public function init()
}
/**
- * @return string a randomly generated private key
+ * @return string a randomly generated private key.
+ * @deprecated in favor of {@link generateRandomString()} since 1.1.14. Never use this method.
*/
protected function generateRandomKey()
{
- return sprintf('%08x%08x%08x%08x',mt_rand(),mt_rand(),mt_rand(),mt_rand());
+ return $this->generateRandomString(32);
}
/**
* @return string the private key used to generate HMAC.
* If the key is not explicitly set, a random one is generated and returned.
+ * @throws CException in case random string cannot be generated.
*/
public function getValidationKey()
{
@@ -101,7 +103,10 @@ public function getValidationKey()
$this->setValidationKey($key);
else
{
- $key=$this->generateRandomKey();
+ if(($key=$this->generateRandomString(32,true))===false)
+ if(($key=$this->generateRandomString(32,false))===false)
+ throw new CException(Yii::t('yii',
+ 'CSecurityManager::generateRandomString() cannot generate random string in the current environment.'));
$this->setValidationKey($key);
Yii::app()->setGlobalState(self::STATE_VALIDATION_KEY,$key);
}
@@ -124,6 +129,7 @@ public function setValidationKey($value)
/**
* @return string the private key used to encrypt/decrypt data.
* If the key is not explicitly set, a random one is generated and returned.
+ * @throws CException in case random string cannot be generated.
*/
public function getEncryptionKey()
{
@@ -135,7 +141,10 @@ public function getEncryptionKey()
$this->setEncryptionKey($key);
else
{
- $key=$this->generateRandomKey();
+ if(($key=$this->generateRandomString(32,true))===false)
+ if(($key=$this->generateRandomString(32,false))===false)
+ throw new CException(Yii::t('yii',
+ 'CSecurityManager::generateRandomString() cannot generate random string in the current environment.'));
$this->setEncryptionKey($key);
Yii::app()->setGlobalState(self::STATE_ENCRYPTION_KEY,$key);
}
@@ -158,7 +167,8 @@ public function setEncryptionKey($value)
/**
* This method has been deprecated since version 1.1.3.
* Please use {@link hashAlgorithm} instead.
- * @return string
+ * @return string -
+ * @deprecated
*/
public function getValidation()
{
@@ -169,6 +179,7 @@ public function getValidation()
* This method has been deprecated since version 1.1.3.
* Please use {@link hashAlgorithm} instead.
* @param string $value -
+ * @deprecated
*/
public function setValidation($value)
{
@@ -217,6 +228,7 @@ public function decrypt($data,$key=null)
/**
* Opens the mcrypt module with the configuration specified in {@link cryptAlgorithm}.
+ * @throws CException if failed to initialize the mcrypt module or PHP mcrypt extension
* @return resource the mycrypt module handle.
* @since 1.1.3
*/
@@ -271,38 +283,190 @@ public function validateData($data,$key=null)
}
/**
- * Computes the HMAC for the data with {@link getValidationKey ValidationKey}.
- * @param string $data data to be generated HMAC
- * @param string $key the private key to be used for generating HMAC. Defaults to null, meaning using {@link validationKey}.
- * @return string the HMAC for the data
+ * Computes the HMAC for the data with {@link getValidationKey validationKey}. This method has been made public
+ * since 1.1.14.
+ * @param string $data data to be generated HMAC.
+ * @param string|null $key the private key to be used for generating HMAC. Defaults to null, meaning using
+ * {@link validationKey} value.
+ * @param string|null $hashAlgorithm the name of the hashing algorithm to be used.
+ * See {@link http://php.net/manual/en/function.hash-algos.php hash-algos} for the list of possible
+ * hash algorithms. Note that if you are using PHP 5.1.1 or below, you can only use 'sha1' or 'md5'.
+ * Defaults to null, meaning using {@link hashAlgorithm} value.
+ * @return string the HMAC for the data.
+ * @throws CException on unsupported hash algorithm given.
*/
- protected function computeHMAC($data,$key=null)
+ public function computeHMAC($data,$key=null,$hashAlgorithm=null)
{
if($key===null)
$key=$this->getValidationKey();
+ if($hashAlgorithm===null)
+ $hashAlgorithm=$this->hashAlgorithm;
if(function_exists('hash_hmac'))
- return hash_hmac($this->hashAlgorithm, $data, $key);
+ return hash_hmac($hashAlgorithm,$data,$key);
- if(!strcasecmp($this->hashAlgorithm,'sha1'))
+ if(0===strcasecmp($hashAlgorithm,'sha1'))
{
$pack='H40';
$func='sha1';
}
- else
+ elseif(0===strcasecmp($hashAlgorithm,'md5'))
{
$pack='H32';
$func='md5';
}
- if($this->strlen($key) > 64)
- $key=pack($pack, $func($key));
- if($this->strlen($key) < 64)
- $key=str_pad($key, 64, chr(0));
+ else
+ {
+ throw new CException(Yii::t('yii','Only SHA1 and MD5 hashing algorithms are supported when using PHP 5.1.1 or below.'));
+ }
+ if($this->strlen($key)>64)
+ $key=pack($pack,$func($key));
+ if($this->strlen($key)<64)
+ $key=str_pad($key,64,chr(0));
$key=$this->substr($key,0,64);
return $func((str_repeat(chr(0x5C), 64) ^ $key) . pack($pack, $func((str_repeat(chr(0x36), 64) ^ $key) . $data)));
}
/**
+ * Generate a random ASCII string. Generates only [0-9a-zA-z_~] characters which are all
+ * transparent in raw URL encoding.
+ * @param integer $length length of the generated string in characters.
+ * @param boolean $cryptographicallyStrong set this to require cryptographically strong randomness.
+ * @return string|boolean random string or false in case it cannot be generated.
+ * @since 1.1.14
+ */
+ public function generateRandomString($length,$cryptographicallyStrong=true)
+ {
+ if(($randomBytes=$this->generateRandomBytes($length+2,$cryptographicallyStrong))!==false)
+ return strtr($this->substr(base64_encode($randomBytes),0,$length),array('+'=>'_','/'=>'~'));
+ return false;
+ }
+
+ /**
+ * Generates a string of random bytes.
+ * @param integer $length number of random bytes to be generated.
+ * @param boolean $cryptographicallyStrong whether to fail if a cryptographically strong
+ * result cannot be generated. The method attempts to read from a cryptographically strong
+ * pseudorandom number generator (CS-PRNG), see
+ * {@link https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator#Requirements Wikipedia}.
+ * However, in some runtime environments, PHP has no access to a CS-PRNG, in which case
+ * the method returns false if $cryptographicallyStrong is true. When $cryptographicallyStrong is false,
+ * the method always returns a pseudorandom result but may fall back to using {@link generatePseudoRandomBlock}.
+ * This method does not guarantee that entropy, from sources external to the CS-PRNG, was mixed into
+ * the CS-PRNG state between each successive call. The caller can therefore expect non-blocking
+ * behavior, unlike, for example, reading from /dev/random on Linux, see
+ * {@link http://eprint.iacr.org/2006/086.pdf Gutterman et al 2006}.
+ * @return boolean|string generated random binary string or false on failure.
+ * @since 1.1.14
+ */
+ public function generateRandomBytes($length,$cryptographicallyStrong=true)
+ {
+ $bytes='';
+ if(function_exists('openssl_random_pseudo_bytes'))
+ {
+ $bytes=openssl_random_pseudo_bytes($length,$strong);
+ if($this->strlen($bytes)>=$length && ($strong || !$cryptographicallyStrong))
+ return $this->substr($bytes,0,$length);
+ }
+
+ if(function_exists('mcrypt_create_iv') &&
+ ($bytes=mcrypt_create_iv($length, MCRYPT_DEV_URANDOM))!==false &&
+ $this->strlen($bytes)>=$length)
+ {
+ return $this->substr($bytes,0,$length);
+ }
+
+ if(($file=@fopen('/dev/urandom','rb'))!==false &&
+ ($bytes=@fread($file,$length))!==false &&
+ (fclose($file) || true) &&
+ $this->strlen($bytes)>=$length)
+ {
+ return $this->substr($bytes,0,$length);
+ }
+
+ $i=0;
+ while($this->strlen($bytes)<$length &&
+ ($byte=$this->generateSessionRandomBlock())!==false &&
+ ++$i<3)
+ {
+ $bytes.=$byte;
+ }
+ if($this->strlen($bytes)>=$length)
+ return $this->substr($bytes,0,$length);
+
+ if ($cryptographicallyStrong)
+ return false;
+
+ while($this->strlen($bytes)<$length)
+ $bytes.=$this->generatePseudoRandomBlock();
+ return $this->substr($bytes,0,$length);
+ }
+
+ /**
+ * Generate a pseudo random block of data using several sources. On some systems this may be a bit
+ * better than PHP's {@link mt_rand} built-in function, which is not really random.
+ * @return string of 64 pseudo random bytes.
+ * @since 1.1.14
+ */
+ public function generatePseudoRandomBlock()
+ {
+ $bytes='';
+
+ if (function_exists('openssl_random_pseudo_bytes')
+ && ($bytes=openssl_random_pseudo_bytes(512))!==false
+ && $this->strlen($bytes)>=512)
+ {
+ return $this->substr($bytes,0,512);
+ }
+
+ for($i=0;$i<32;++$i)
+ $bytes.=pack('S',mt_rand(0,0xffff));
+
+ // On UNIX and UNIX-like operating systems the numerical values in `ps`, `uptime` and `iostat`
+ // ought to be fairly unpredictable. Gather the non-zero digits from those.
+ foreach(array('ps','uptime','iostat') as $command) {
+ @exec($command,$commandResult,$retVal);
+ if(is_array($commandResult) && !empty($commandResult) && $retVal==0)
+ $bytes.=preg_replace('/[^1-9]/','',implode('',$commandResult));
+ }
+
+ // Gather the current time's microsecond part. Note: this is only a source of entropy on
+ // the first call! If multiple calls are made, the entropy is only as much as the
+ // randomness in the time between calls.
+ $bytes.=$this->substr(microtime(),2,6);
+
+ // Concatenate everything gathered, mix it with sha512. hash() is part of PHP core and
+ // enabled by default but it can be disabled at compile time but we ignore that possibility here.
+ return hash('sha512',$bytes,true);
+ }
+
+ /**
+ * Get random bytes from the system entropy source via PHP session manager.
+ * @return boolean|string 20-byte random binary string or false on error.
+ * @since 1.1.14
+ */
+ public function generateSessionRandomBlock()
+ {
+ ini_set('session.entropy_length',20);
+ if(ini_get('session.entropy_length')!=20)
+ return false;
+
+ // These calls are (supposed to be, according to PHP manual) safe even if
+ // there is already an active session for the calling script.
+ @session_start();
+ @session_regenerate_id();
+
+ $bytes=session_id();
+ if(!$bytes)
+ return false;
+
+ // $bytes has 20 bytes of entropy but the session manager converts the binary
+ // random bytes into something readable. We have to convert that back.
+ // SHA-1 should do it without losing entropy.
+ return sha1($bytes,true);
+ }
+
+ /**
* Returns the length of the given string.
* If available uses the multibyte string function mb_strlen.
* @param string $string the string being measured for length
2  framework/base/CStatePersister.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
2  framework/base/interfaces.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
4 framework/caching/CApcCache.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -39,7 +39,7 @@ public function init()
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
- * @return string the value stored in cache, false if the value is not in the cache or expired.
+ * @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
4 framework/caching/CCache.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -238,7 +238,7 @@ public function flush()
* in {@link get()} already. So only the implementation of data retrieval
* is needed.
* @param string $key a unique key identifying the cached value
- * @return string the value stored in cache, false if the value is not in the cache or expired.
+ * @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
* @throws CException if this method is not overridden by child classes
*/
protected function getValue($key)
4 framework/caching/CDbCache.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -176,7 +176,7 @@ public function setDbConnection($value)
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
- * @return string the value stored in cache, false if the value is not in the cache or expired.
+ * @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
2  framework/caching/CDummyCache.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
4 framework/caching/CEAcceleratorCache.php
View
@@ -4,7 +4,7 @@
*
* @author Steffen Dietz <steffo.dietz[at]googlemail[dot]com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -40,7 +40,7 @@ public function init()
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
- * @return string the value stored in cache, false if the value is not in the cache or expired.
+ * @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
38 framework/caching/CFileCache.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -41,6 +41,15 @@ class CFileCache extends CCache
* The value of this property should not exceed 16 (less than 3 is recommended).
*/
public $directoryLevel=0;
+ /**
+ * @var boolean whether cache entry expiration time should be embedded into a physical file.
+ * Defaults to false meaning that the file modification time will be used to store expire value.
+ * True value means that first ten bytes of the file would be reserved and used to store expiration time.
+ * On some systems PHP is not allowed to change file modification time to be in future even with 777
+ * permissions, so this property could be useful in this case.
+ * @since 1.1.14
+ */
+ public $embedExpiry=false;
private $_gcProbability=100;
private $_gced=false;
@@ -98,13 +107,13 @@ protected function flushValues()
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
- * @return string the value stored in cache, false if the value is not in the cache or expired.
+ * @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
$cacheFile=$this->getCacheFile($key);
- if(($time=@filemtime($cacheFile))>time())
- return @file_get_contents($cacheFile);
+ if(($time=$this->filemtime($cacheFile))>time())
+ return @file_get_contents($cacheFile,false,null,$this->embedExpiry ? 10 : -1);
elseif($time>0)
@unlink($cacheFile);
return false;
@@ -134,10 +143,10 @@ protected function setValue($key,$value,$expire)
$cacheFile=$this->getCacheFile($key);
if($this->directoryLevel>0)
@mkdir(dirname($cacheFile),0777,true);
- if(@file_put_contents($cacheFile,$value,LOCK_EX)!==false)
+ if(@file_put_contents($cacheFile,$this->embedExpiry ? $expire.$value : $value,LOCK_EX)!==false)
{
@chmod($cacheFile,0777);
- return @touch($cacheFile,$expire);
+ return $this->embedExpiry ? true : @touch($cacheFile,$expire);
}
else
return false;
@@ -155,7 +164,7 @@ protected function setValue($key,$value,$expire)
protected function addValue($key,$value,$expire)
{
$cacheFile=$this->getCacheFile($key);
- if(@filemtime($cacheFile)>time())
+ if($this->filemtime($cacheFile)>time())
return false;
return $this->setValue($key,$value,$expire);
}
@@ -212,9 +221,22 @@ public function gc($expiredOnly=true,$path=null)
$fullPath=$path.DIRECTORY_SEPARATOR.$file;
if(is_dir($fullPath))
$this->gc($expiredOnly,$fullPath);
- elseif($expiredOnly && @filemtime($fullPath)<time() || !$expiredOnly)
+ elseif($expiredOnly && $this->filemtime($fullPath)<time() || !$expiredOnly)
@unlink($fullPath);
}
closedir($handle);
}
+
+ /**
+ * Returns cache file modification time. {@link $embedExpiry} aware.
+ * @param string $path to the file, modification time to be retrieved from.
+ * @return integer file modification time.
+ */
+ private function filemtime($path)
+ {
+ if($this->embedExpiry)
+ return (int)@file_get_contents($path,false,null,0,10);
+ else
+ return @filemtime($path);
+ }
}
4 framework/caching/CMemCache.php
View
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
- * @copyright Copyright &copy; 2008-2011 Yii Software LLC
+ * @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
@@ -142,7 +142,7 @@ public function setServers($config)
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
- * @return string the value stored in cache, false if the value is not in the cache or expired.
+ * @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
257 framework/caching/CRedisCache.php
View
@@ -0,0 +1,257 @@
+<?php
+/**
+ * CRedisCache class file
+ *
+ * @author Carsten Brandt <mail@cebe.cc>
+ * @link http://www.yiiframework.com/
+ * @copyright 2008-2013 Yii Software LLC
+ * @license http://www.yiiframework.com/license/
+ */
+
+/**
+ * CRedisCache implements a cache application component based on {@link http://redis.io/ redis}.
+ *
+ * CRedisCache needs to be configured with {@link hostname}, {@link port} and {@link database} of the server
+ * to connect to. By default CRedisCache assumes there is a redis server running on localhost at
+ * port 6379 and uses the database number 0.
+ *
+ * CRedisCache also supports {@link http://redis.io/commands/auth the AUTH command} of redis.
+ * When the server needs authentication, you can set the {@link password} property to
+ * authenticate with the server after connect.
+ *
+ * See {@link CCache} manual for common cache operations that are supported by CRedisCache.
+ *
+ * To use CRedisCache as the cache application component, configure the application as follows,
+ * <pre>
+ * array(
+ * 'components'=>array(
+ * 'cache'=>array(
+ * 'class'=>'CRedisCache',
+ * 'hostname'=>'localhost',
+ * 'port'=>6379,
+ * 'database'=>0,
+ * ),
+ * ),
+ * )
+ * </pre>
+ *
+ * The minimum required redis version is 2.0.0.
+ *
+ * @author Carsten Brandt <mail@cebe.cc>
+ * @package system.caching
+ * @since 1.1.14
+ */
+class CRedisCache extends CCache
+{
+ /**
+ * @var string hostname to use for connecting to the redis server. Defaults to 'localhost'.
+ */
+ public $hostname='localhost';
+ /**
+ * @var int the port to use for connecting to the redis server. Default port is 6379.
+ */
+ public $port=6379;
+ /**