summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
authorwei <>2007-02-06 08:10:29 +0000
committerwei <>2007-02-06 08:10:29 +0000
commit7c4c3271118a0bdd8a1d7b85def3899911b00835 (patch)
treee8d3d9c05eb986ca9ceb31cf65cd5d515d913bb9 /framework/Data
parentec66b8c2c850c0d415e2e670be18d87dfd091a13 (diff)
scaffold typo, allow multiple parameters in findBySql.
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php2
-rw-r--r--framework/Data/ActiveRecord/TActiveRecord.php5
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();