Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rename defaultDbCriteria to defaultScope.

  • Loading branch information...
commit 4ab7e4ab7887bfc7ad900856ea8f327116a40c8d 1 parent 080704e
qiang.xue authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 framework/db/ar/CActiveRecord.php
6 framework/db/ar/CActiveRecord.php
@@ -602,21 +602,21 @@ public function getDbCriteria($createIfNull=true)
- if(($c=$this->defaultDbCriteria())!==array() || $createIfNull)
+ if(($c=$this->defaultScope())!==array() || $createIfNull)
$this->_c=new CDbCriteria($c);
return $this->_c;
- * Returns the default query criteria that should be applied to all queries for this model.
+ * Returns the default named scope that should be applied to all queries implicitly for this model.
* The default implementation simply returns an empty array. You may override this method
* if the model needs to be queried with some default criteria (e.g. only active records should be returned).
* @return array the query criteria. This will be used as the parameter to the constructor
* of {@link CDbCriteria}.
* @since 1.0.5
- public function defaultDbCriteria()
+ public function defaultScope()
return array();
Please sign in to comment.
Something went wrong with that request. Please try again.