diff options
author | wei <> | 2007-02-06 08:10:29 +0000 |
---|---|---|
committer | wei <> | 2007-02-06 08:10:29 +0000 |
commit | 7c4c3271118a0bdd8a1d7b85def3899911b00835 (patch) | |
tree | e8d3d9c05eb986ca9ceb31cf65cd5d515d913bb9 /framework | |
parent | ec66b8c2c850c0d415e2e670be18d87dfd091a13 (diff) |
scaffold typo, allow multiple parameters in findBySql.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php | 2 | ||||
-rw-r--r-- | framework/Data/ActiveRecord/TActiveRecord.php | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php index cb56d598..c6fc6902 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php @@ -2,7 +2,7 @@ Prado::using('System.Data.ActiveRecord.Scaffold.InputBuilder.TScaffoldInputCommon');
-class MysqlScaffoldInput extends ScaffoldInputCommon
+class MysqlScaffoldInput extends TScaffoldInputCommon
{
protected function createControl($container, $column, $record)
{
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php index 9bc74c0f..91ae971a 100644 --- a/framework/Data/ActiveRecord/TActiveRecord.php +++ b/framework/Data/ActiveRecord/TActiveRecord.php @@ -390,6 +390,11 @@ abstract class TActiveRecord extends TComponent */
public function findBySql($sql,$parameters=array())
{
+ if(!is_array($parameters) && func_num_args() > 1)
+ {
+ $parameters = func_get_args();
+ array_shift($parameters);
+ }
$gateway = $this->getRecordManager()->getRecordGateway();
$data = $gateway->findRecordsBySql($this,$sql,$parameters);
$results = array();
|