diff --git a/_config.php b/_config.php index c8b68e421..33673d417 100644 --- a/_config.php +++ b/_config.php @@ -25,6 +25,7 @@ Director::addRules(10, array( '$Controller//$Action/$ID/$OtherID' => '*', 'images' => 'Image_Uploader', '' => 'RootURLController', + 'api/v1/live' => 'VersionedRestfulServer', 'api/v1' => 'RestfulServer', 'soap/v1' => 'SOAPModelAccess', 'dev' => 'DevelopmentAdmin' @@ -68,4 +69,4 @@ define('MCE_ROOT', 'jsparty/tiny_mce2/'); */ define('EMAIL_BOUNCEHANDLER_KEY', '1aaaf8fb60ea253dbf6efa71baaacbb3'); -?> \ No newline at end of file +?> diff --git a/api/RestfulServer.php b/api/RestfulServer.php index 139b91ed1..1f2780709 100644 --- a/api/RestfulServer.php +++ b/api/RestfulServer.php @@ -457,7 +457,7 @@ class RestfulServer extends Controller { */ protected function getObjectQuery($className, $id, $params) { $baseClass = ClassInfo::baseDataClass($className); - return singleton($className)->buildSQL( + return singleton($className)->extendedSQL( "`$baseClass`.ID = {$id}" ); } diff --git a/api/VersionedRestfulServer.php b/api/VersionedRestfulServer.php new file mode 100644 index 000000000..e5342e6c3 --- /dev/null +++ b/api/VersionedRestfulServer.php @@ -0,0 +1,15 @@ +handleRequest($request); + return $response; + } +} + +?> diff --git a/search/SearchContext.php b/search/SearchContext.php index e8fb86ff7..946d36108 100644 --- a/search/SearchContext.php +++ b/search/SearchContext.php @@ -108,7 +108,7 @@ class SearchContext extends Object { if($existingQuery) { $query = $existingQuery; } else { - $query = $model->buildSQL(); + $query = $model->extendedSQL(); } $SQL_limit = Convert::raw2sql($limit); @@ -268,4 +268,4 @@ class SearchContext extends Object { } } -?> \ No newline at end of file +?>