Permalink
Browse files

Merge branch 'master' into 93-relational-beforefind-criteria-modifica…

…tion

* master: (180 commits)
  Updated changelog with last-modified date change.
  Changed the CHttpCacheFilter to use RFC 1123 complaint dates when returning the last-modified header.
  tabs...
  gii: better default validation "length" rule for fixed-point / floating-point field type (MYSQL)
  fixes #1319
  updated comment in CHttpSession
  Update framework/YiiBase.php
  Update docs/guide/database.arr.txt
  New unit test for enhanced $gCProbability s/getters in CHttpSession #486. Fixed those methods to process corner cases properly. Initial $gCProbability is now double(1.0), was > 1.0 before.
  Bug #112: MSSQL: database abstraction layer now uses native transaction support of the SQLSRV driver.
  Forgot about spaces in comments creating procedure call. [ci skip]
  Better comments testing method name.
  Forgot about local MSSQL database settings.
  MSSQL unit testing SQL file reformatted and decorated. MSSQL testing class improved. Added unit tests for column comments retrieving.
  Removed old message.
  Update docs/guide/topics.i18n.txt
  Update docs/guide/topics.i18n.txt
  Requirements checker: russian (ru_RU) messages.
  Minor fixes and refinements to the MSSQL unit tests.
  better fix for issues #124
  ...

Conflicts:
	UPGRADE
  • Loading branch information...
2 parents 21da317 + 2147fae commit be1fbf198213642f4e39f0ebbe793083aef3511e @cebe cebe committed Sep 3, 2012
Showing with 5,402 additions and 4,458 deletions.
  1. +1 −1 .travis.yml
  2. +31 −3 CHANGELOG
  3. +9 −3 UPGRADE
  4. +1 −1 docs/blog/comment.admin.txt
  5. +2 −2 docs/blog/comment.model.txt
  6. +37 −9 docs/blog/ja/comment.admin.txt
  7. +21 −21 docs/blog/ja/comment.create.txt
  8. +18 −18 docs/blog/ja/comment.model.txt
  9. +5 −5 docs/blog/ja/final.deployment.txt
  10. +3 −3 docs/blog/ja/final.future.txt
  11. +2 −2 docs/blog/ja/final.logging.txt
  12. +10 −11 docs/blog/ja/final.url.txt
  13. +9 −9 docs/blog/ja/portlet.comments.txt
  14. +42 −42 docs/blog/ja/portlet.menu.txt
  15. +12 −13 docs/blog/ja/portlet.tags.txt
  16. +15 −15 docs/blog/ja/post.admin.txt
  17. +16 −16 docs/blog/ja/post.create.txt
  18. +17 −17 docs/blog/ja/post.display.txt
  19. +49 −48 docs/blog/ja/post.model.txt
  20. +43 −41 docs/blog/ja/prototype.auth.txt
  21. +38 −35 docs/blog/ja/prototype.database.txt
  22. +60 −59 docs/blog/ja/prototype.scaffold.txt
  23. +8 −7 docs/blog/ja/prototype.summary.txt
  24. +28 −32 docs/blog/ja/start.design.txt
  25. +11 −10 docs/blog/ja/start.overview.txt
  26. +13 −13 docs/blog/ja/start.requirements.txt
  27. +32 −33 docs/blog/ja/start.testdrive.txt
  28. +6 −6 docs/blog/ja/toc.txt
  29. +3 −3 docs/blog/post.admin.txt
  30. +2 −1 docs/blog/ru/comment.create.txt
  31. +1 −1 docs/guide/database.arr.txt
  32. +342 −0 docs/guide/fr/basics.controller.txt
  33. +55 −0 docs/guide/fr/basics.mvc.txt
  34. +82 −0 docs/guide/fr/caching.overview.txt
  35. +49 −42 docs/guide/fr/toc.txt
  36. BIN docs/guide/images/gii-model.png
  37. +48 −50 docs/guide/ja/basics.application.txt
  38. +9 −9 docs/guide/ja/basics.best-practices.txt
  39. +69 −85 docs/guide/ja/basics.component.txt
  40. +94 −119 docs/guide/ja/basics.controller.txt
  41. +88 −116 docs/guide/ja/basics.convention.txt
  42. +11 −11 docs/guide/ja/basics.entry.txt
  43. +7 −10 docs/guide/ja/basics.model.txt
  44. +41 −79 docs/guide/ja/basics.module.txt
  45. +26 −26 docs/guide/ja/basics.mvc.txt
  46. +58 −73 docs/guide/ja/basics.namespace.txt
  47. +28 −46 docs/guide/ja/basics.view.txt
  48. +19 −23 docs/guide/ja/basics.workflow.txt
  49. +74 −104 docs/guide/ja/caching.data.txt
  50. +17 −29 docs/guide/ja/caching.dynamic.txt
  51. +54 −95 docs/guide/ja/caching.fragment.txt
  52. +24 −37 docs/guide/ja/caching.overview.txt
  53. +41 −63 docs/guide/ja/caching.page.txt
  54. +22 −22 docs/guide/ja/changes.txt
  55. +173 −164 docs/guide/ja/database.ar.txt
  56. +175 −167 docs/guide/ja/database.arr.txt
  57. +48 −73 docs/guide/ja/database.dao.txt
  58. +33 −23 docs/guide/ja/database.migration.txt
  59. +6 −10 docs/guide/ja/database.overview.txt
  60. +61 −37 docs/guide/ja/database.query-builder.txt
  61. +53 −69 docs/guide/ja/extension.create.txt
  62. +17 −31 docs/guide/ja/extension.integration.txt
  63. +19 −19 docs/guide/ja/extension.overview.txt
  64. +64 −98 docs/guide/ja/extension.use.txt
  65. +19 −34 docs/guide/ja/form.action.txt
  66. +189 −186 docs/guide/ja/form.builder.txt
  67. +91 −137 docs/guide/ja/form.model.txt
  68. +6 −9 docs/guide/ja/form.overview.txt
  69. +16 −26 docs/guide/ja/form.table.txt
  70. +24 −33 docs/guide/ja/form.view.txt
  71. +4 −4 docs/guide/ja/index.txt
  72. +3 −3 docs/guide/ja/quickstart.apache-nginx-config.txt
  73. +3 −3 docs/guide/ja/quickstart.first-app-yiic.txt
  74. +41 −42 docs/guide/ja/quickstart.first-app.txt
  75. +10 −10 docs/guide/ja/quickstart.installation.txt
  76. +19 −18 docs/guide/ja/quickstart.what-is-yii.txt
  77. +15 −12 docs/guide/ja/test.fixture.txt
  78. +26 −15 docs/guide/ja/test.functional.txt
  79. +33 −21 docs/guide/ja/test.overview.txt
  80. +25 −13 docs/guide/ja/test.unit.txt
  81. +53 −53 docs/guide/ja/toc.txt
  82. +154 −178 docs/guide/ja/topics.auth.txt
  83. +44 −57 docs/guide/ja/topics.console.txt
  84. +54 −92 docs/guide/ja/topics.error.txt
  85. +98 −44 docs/guide/ja/topics.gii.txt
  86. +98 −161 docs/guide/ja/topics.i18n.txt
  87. +40 −47 docs/guide/ja/topics.logging.txt
  88. +41 −55 docs/guide/ja/topics.performance.txt
  89. +32 −43 docs/guide/ja/topics.prado.txt
  90. +47 −83 docs/guide/ja/topics.security.txt
  91. +91 −110 docs/guide/ja/topics.theming.txt
  92. +91 −114 docs/guide/ja/topics.url.txt
  93. +47 −67 docs/guide/ja/topics.webservice.txt
  94. +24 −28 docs/guide/ja/upgrade.txt
  95. +3 −3 docs/guide/ru/basics.namespace.txt
  96. +1 −1 docs/guide/ru/database.ar.txt
  97. +24 −23 docs/guide/topics.i18n.txt
  98. +10 −8 framework/YiiBase.php
  99. +1 −1 framework/base/CComponent.php
  100. +0 −7 framework/base/CModelEvent.php
  101. +3 −3 framework/base/CSecurityManager.php
  102. +2 −2 framework/base/interfaces.php
  103. +10 −0 framework/caching/CMemCache.php
  104. +2 −2 framework/console/CConsoleCommand.php
  105. +3 −1 framework/db/CDbConnection.php
  106. +3 −2 framework/db/ar/CActiveFinder.php
  107. +2 −2 framework/db/ar/CActiveRecord.php
  108. +7 −1 framework/db/schema/CDbColumnSchema.php
  109. +8 −7 framework/db/schema/mssql/CMssqlCommandBuilder.php
  110. +9 −5 framework/db/schema/mssql/CMssqlSchema.php
  111. +36 −0 framework/db/schema/mssql/CMssqlSqlsrvPdoAdapter.php
  112. +37 −0 framework/db/schema/mysql/CMysqlCommandBuilder.php
  113. +13 −1 framework/db/schema/mysql/CMysqlSchema.php
  114. +1 −1 framework/db/schema/oci/COciColumnSchema.php
  115. +4 −1 framework/db/schema/oci/COciSchema.php
  116. +1 −1 framework/db/schema/oci/COciTableSchema.php
  117. +3 −1 framework/db/schema/pgsql/CPgsqlSchema.php
  118. +2 −0 framework/db/schema/sqlite/CSqliteSchema.php
  119. +2 −3 framework/gii/assets/css/main.css
  120. +1 −1 framework/gii/generators/crud/templates/default/_view.php
  121. +10 −35 framework/gii/generators/model/ModelCode.php
  122. +19 −0 framework/gii/generators/model/ModelGenerator.php
  123. +4 −4 framework/gii/generators/model/templates/default/model.php
  124. +16 −5 framework/gii/generators/model/views/index.php
  125. +3 −3 framework/logging/CLogger.php
  126. +1 −1 framework/messages/fa_ir/yii.php
  127. +32 −0 framework/messages/nl/size_units.php
  128. +6 −4 framework/messages/nl/yii.php
  129. +9 −5 framework/messages/nl/zii.php
  130. +2 −2 framework/utils/CDateTimeParser.php
  131. +7 −1 framework/utils/CMarkdownParser.php
  132. +10 −0 framework/utils/mimeTypes.php
  133. +3 −2 framework/validators/CDefaultValueValidator.php
  134. +2 −2 framework/validators/CEmailValidator.php
  135. +14 −8 framework/validators/CFileValidator.php
  136. +5 −0 framework/vendors/README.html
  137. +10 −0 framework/vendors/history/license.txt
  138. +2 −1 framework/web/CAssetManager.php
  139. +2 −2 framework/web/CController.php
  140. +9 −31 framework/web/CHttpRequest.php
  141. +13 −9 framework/web/CHttpSession.php
  142. +1 −1 framework/web/CSort.php
  143. +2 −1 framework/web/CUrlManager.php
  144. +1 −1 framework/web/auth/CAuthItem.php
  145. +1 −1 framework/web/auth/CBaseUserIdentity.php
  146. +38 −22 framework/web/filters/CHttpCacheFilter.php
  147. +1 −1 framework/web/form/CFormInputElement.php
  148. +6 −6 framework/web/helpers/CHtml.php
  149. +1 −1 framework/web/helpers/CJavaScript.php
  150. +10 −2 framework/web/helpers/CJavaScriptExpression.php
  151. +1 −1 framework/web/js/source/jquery.yiiactiveform.js
  152. +12 −2 framework/web/services/CWebService.php
  153. +1 −0 framework/web/services/CWsdlGenerator.php
  154. +6 −3 framework/web/widgets/CActiveForm.php
  155. +7 −3 framework/web/widgets/CAutoComplete.php
  156. +6 −4 framework/web/widgets/CMaskedTextField.php
  157. +1 −1 framework/web/widgets/CMultiFileUpload.php
  158. +8 −19 framework/web/widgets/CStarRating.php
  159. +5 −5 framework/web/widgets/captcha/CCaptcha.php
  160. +42 −26 framework/yiilite.php
  161. +17 −30 framework/zii/widgets/CListView.php
  162. +17 −6 framework/zii/widgets/assets/gridview/jquery.yiigridview.js
  163. +7 −9 framework/zii/widgets/assets/listview/jquery.yiilistview.js
  164. +1 −1 framework/zii/widgets/grid/CButtonColumn.php
  165. +7 −4 framework/zii/widgets/grid/CGridColumn.php
  166. +15 −45 framework/zii/widgets/grid/CGridView.php
  167. +3 −3 framework/zii/widgets/jui/CJuiAutoComplete.php
  168. +12 −15 framework/zii/widgets/jui/CJuiButton.php
  169. +1 −1 framework/zii/widgets/jui/CJuiSortable.php
  170. +24 −0 requirements/index.php
  171. +16 −1 requirements/messages/ru/yii.php
  172. +3 −3 tests/bootstrap.php
  173. +4 −4 tests/framework/base/CModelTest.php
  174. +24 −14 tests/framework/caching/CMemCacheTest.php
  175. +11 −11 tests/framework/collections/CAttributeCollectionTest.php
  176. +3 −3 tests/framework/collections/CListTest.php
  177. +1 −1 tests/framework/collections/CMapTest.php
  178. +2 −2 tests/framework/collections/CQueueTest.php
  179. +2 −2 tests/framework/collections/CStackTest.php
  180. +4 −4 tests/framework/db/CDbCommand2Test.php
  181. +4 −4 tests/framework/db/ar/CActiveRecord2Test.php
  182. +2 −2 tests/framework/db/ar/CActiveRecordTest.php
  183. +122 −36 tests/framework/db/data/mssql.sql
  184. +2 −2 tests/framework/db/data/mysql.sql
  185. +3 −0 tests/framework/db/data/postgres.sql
  186. +1 −1 tests/framework/db/schema/CDbCriteriaTest.php
  187. +57 −23 tests/framework/db/schema/CMssqlTest.php
  188. +1 −1 tests/framework/db/schema/CMysql2Test.php
  189. +34 −4 tests/framework/db/schema/CMysqlTest.php
  190. +10 −0 tests/framework/db/schema/CPostgresTest.php
  191. +106 −0 tests/framework/web/CCookieCollectionTest.php
  192. +57 −0 tests/framework/web/CHttpCookieTest.php
  193. +36 −0 tests/framework/web/CHttpSessionTest.php
  194. +19 −2 tests/framework/web/helpers/CHtmlTest.php
  195. +12 −0 tests/framework/web/helpers/CJavaScriptExpressionTest.php
  196. +24 −0 tests/framework/web/helpers/CJavaScriptTest.php
  197. +35 −0 tests/framework/web/widgets/CAutoCompleteTest.php
  198. +35 −0 tests/framework/web/widgets/CMaskedTextFieldTest.php
  199. +34 −0 tests/framework/web/widgets/CMultiFileUploadTest.php
  200. +34 −0 tests/framework/web/widgets/CStarRatingTest.php
  201. +29 −24 tests/framework/zii/behaviors/CTimestampBehaviorTest.php
  202. +53 −0 tests/framework/zii/widgets/CGridViewTest.php
  203. +37 −0 tests/framework/zii/widgets/CListViewTest.php
  204. +39 −0 tests/framework/zii/widgets/grid/CButtonColumnTest.php
  205. +35 −0 tests/framework/zii/widgets/jui/CJuiButtonTest.php
View
@@ -12,6 +12,6 @@ before_script:
- psql -q -c 'CREATE DATABASE yii WITH OWNER = test;' -U postgres
- psql -q -c 'GRANT ALL PRIVILEGES ON DATABASE yii TO test;' -U postgres
- echo 'y' | pecl install memcache > ~/memcache.log || ( echo "=== MEMCACHE BUILD FAILED ==="; cat ~/memcache.log )
- - echo "extension=memcache.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
+ - if [ $TRAVIS_PHP_VERSION \< 5.4 ]; then echo "extension=memcache.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
script: phpunit --colors --coverage-text --exclude-group mssql framework
View
@@ -1,12 +1,40 @@
Yii Framework Change Log
========================
-Version 1.1.12 work in progress
+Version 1.1.13 work in progress
-------------------------------
-- Bug #1077: Fixed the problem with alias in CSort (creocoder)
+- 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)
+- 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 #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 #1289: Added support for column comments for MSSQL (CDbColumnSchema::$comment property) (resurtm)
+- 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)
+- Chg: MSSQL unit tests updated and actualized, added SQLSRV driver support (resurtm)
+- Chg: Updated CHttpCacheFilter to use dates as specified by RFC 1123 (bramp)
+
+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
----------------------------
View
12 UPGRADE
@@ -1,5 +1,5 @@
- Upgrading Instructions for Yii Framework v1.1.12
+ Upgrading Instructions for Yii Framework v1.1.13
================================================
!!!IMPORTANT!!!
@@ -9,8 +9,8 @@ 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 GIT to a fresh
@@ -38,6 +38,12 @@ Upgrading from v1.1.12
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);
Upgrading from v1.1.10
----------------------
@@ -7,7 +7,7 @@ Comment management includes updating, deleting and approving comments. These ope
Updating and Deleting Comments
------------------------------
-The code generated by `yiic` for updating and deleting comments remains largely unchanged.
+The code generated by `Gii` for updating and deleting comments remains largely unchanged.
Approving Comments
@@ -1,13 +1,13 @@
Customizing Comment Model
=========================
-For the `Comment` model, we mainly need to customize the `rules()` and `attributeLabels()` methods. The `attributeLabels()` method returns a mapping between attribute names and attribute labels. We do not need to touch `relations()` since the code generated by the `yiic` tool is good enough.
+For the `Comment` model, we mainly need to customize the `rules()` and `attributeLabels()` methods. The `attributeLabels()` method returns a mapping between attribute names and attribute labels. We do not need to touch `relations()` since the code generated by the `Gii` tool is good enough.
Customizing `rules()` Method
----------------------------
-We first customize the validation rules generated by the `yiic` tool. The following rules are used for comments:
+We first customize the validation rules generated by the `Gii` tool. The following rules are used for comments:
~~~
[php]
@@ -1,21 +1,21 @@
コメントの管理
==============
-コメントの管理には、コメントの更新・削除・承認があります。これらの操作は`CommentController`クラスのアクションとして実装します。
+コメントの管理には、コメントの更新・削除・承認があります。これらの操作は `CommentController` クラスのアクションとして実装します。
コメントの更新と削除
--------------------
-`yiic`で生成したコードの、コメント更新・削除の部分はほとんど変更せずに使います。
+`Gii` で生成したコードの、コメント更新・削除の部分はほとんど変更せずに使います。
コメントの承認
--------------
-コメントが新しく作成されたとき、コメントは承認待ちの状態になります。ゲストユーザに見えるようにするためには承認が必要です。コメントの承認は、基本的にコメントのステータス・カラムを変更するだけです。
+コメントが新しく作成されたとき、コメントは承認待ちの状態になります。ゲストユーザに見えるようにするためには承認が必要です。コメントの承認は、基本的にコメントの `status` カラムを変更するだけです。
-`CommentController``actionApprove()`メソッドを以下のように作成します
+`CommentController` に以下のような `actionApprove()` メソッドを作成します
~~~
[php]
@@ -32,9 +32,37 @@ public function actionApprove()
}
~~~
-上記コードでは、POSTリクエスト経由で`approve`アクションが呼ばれたときに、`Comment`モデルで定義した`approve()`メソッドを呼んでステータスを変更します。それから、このコメントが属する記事を表示するページに、ブラウザをリダイレクトします。
+上記コードでは、POST リクエスト経由で `approve` アクションが呼ばれたときに、`Comment` モデルで定義した `approve()` メソッドを呼んでステータスを変更します。それから、このコメントが属する記事を表示するページに、ブラウザをリダイレクトします。
-また、すべてのコメントを表示するために`Comment`の`actionIndex()`メソッドを修正します。承認待ちのコメントを先頭に表示するようにします。
+もちろん、上記に加えて、`Comment` モデルに `approve()` メソッドを作成する必要もあります。以下のようにします。
+
+~~~
+[php]
+public function approve()
+{
+ $this->status=Comment::STATUS_APPROVED;
+ $this->update(array('status'));
+}
+~~~
+
+していることは単純なことです。まず、コメントの `status` プロパティに `Comment` クラスで定義されている `承認済み` 状態を示す定数をセットします。
+
+~~~
+[php]
+class Comment extends CActiveRecord
+{
+ ...
+
+ const STATUS_PENDING=1;
+ const STATUS_APPROVED=2;
+
+ ..
+}
+~~~
+
+そして、次に、`update()` メソッドを呼んで新しくセットされたプロパティをデータベースに保存します。
+
+さらに、すべてのコメントを表示するために `CommentController` の `actionIndex()` メソッドを修正します。承認待ちのコメントを先頭に表示するようにします。
~~~
[php]
@@ -53,8 +81,8 @@ public function actionIndex()
}
~~~
-上記コードでは、`tbl_post``tbl_comment`の両方に`status``create_time`というカラムがあるので、曖昧さを無くすためにテーブルのエイリアス名を接頭辞として付ける必要があります。[ガイド](http://www.yiiframework.com/doc/guide/ja/database.arr#disambiguating-column-names)に記述されているように、リレーショナルなクエリーでは、プライマリテーブルのエイリアスは常に`t`です。そのため上記コードでは、`status`カラムと`create_time`カラムに接頭辞`t`を付けています
+上記コードでは、`tbl_post``tbl_comment` の両方に `status``create_time` というカラムがあるので、曖昧さを無くすためにテーブルのエイリアス名を接頭辞として付ける必要があります。[ガイド](http://www.yiiframework.com/doc/guide/ja/database.arr#sec-6) に記述されているように、リレーショナルなクエリーでは、プライマリテーブルのエイリアスは常に `t` です。そのため上記コードでは、`status` カラムと `create_time` カラムに接頭辞 `t` を付けて、それらの値をプライマリテーブル (`tbl_comment`) から取得すべきことを示しています
-記事のindexビューのように、`CommentController``index`ビューでも[CListView]を使ってコメント一覧を表示します。部分的ビューとして`/wwwroot/blog/protected/views/comment/_view.php`を使って、個々のコメントの詳細を表示します。ここでは詳細には立ち入りません。興味のある方はblogデモの対応するファイル`/wwwroot/yii/demos/blog/protected/views/comment/_view.php`を参照してください。
+記事の index ビューのように、`CommentController``index` ビューでも [CListView] を使ってコメント一覧を表示します。部分的ビューとして `/wwwroot/blog/protected/views/comment/_view.php` を使って、個々のコメントの詳細を表示します。ここでは詳細には立ち入りません。興味のある方はブログデモの対応するファイル `/wwwroot/yii/demos/blog/protected/views/comment/_view.php` を参照してください。
-<div class="revision">$Id: comment.admin.txt 1810 2010-02-18 00:24:54Z qiang.xue $</div>
+<div class="revision">$Id$</div>
Oops, something went wrong.

0 comments on commit be1fbf1

Please sign in to comment.