mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE: queries fixed for MSSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72929 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
fc4756ddcd
commit
aaaf9cdfcd
@ -497,7 +497,7 @@ class Hierarchy extends DataObjectDecorator {
|
||||
* @return DataObjectSet
|
||||
*/
|
||||
public function stageChildren($showAll = false) {
|
||||
$extraFilter = $showAll ? '' : " AND \"ShowInMenus\"";
|
||||
$extraFilter = $showAll ? '' : " AND \"ShowInMenus\"=1";
|
||||
$baseClass = ClassInfo::baseDataClass($this->owner->class);
|
||||
|
||||
$staged = DataObject::get($baseClass, "\"{$baseClass}\".\"ParentID\" = " . (int)$this->owner->ID . " AND \"{$baseClass}\".\"ID\" != " . (int)$this->owner->ID . $extraFilter, "");
|
||||
|
@ -654,7 +654,7 @@ class Member extends DataObject {
|
||||
if(count($collatedGroups) > 0) {
|
||||
$collatedGroups = implode(", ", array_unique($collatedGroups));
|
||||
|
||||
$unfilteredGroups = singleton('Group')->instance_get("\"ID\" IN ($collatedGroups)", '"ID"', "", "", "Member_GroupSet");
|
||||
$unfilteredGroups = singleton('Group')->instance_get("\"ID\" IN ($collatedGroups)", "\"Group\".\"ID\"", "", "", "Member_GroupSet");
|
||||
$result = new ComponentSet();
|
||||
|
||||
// Only include groups where allowedIPAddress() returns true
|
||||
|
@ -583,7 +583,7 @@ class Security extends Controller {
|
||||
* privileges.
|
||||
*/
|
||||
static function findAnAdministrator($username = 'admin', $password = 'password') {
|
||||
$permission = DataObject::get_one("Permission", "\"Code\" = 'ADMIN'", true, '"ID"');
|
||||
$permission = DataObject::get_one("Permission", "\"Code\" = 'ADMIN'", true, "\"Permission\".\"ID\"");
|
||||
|
||||
$adminGroup = null;
|
||||
if($permission) $adminGroup = DataObject::get_one("Group", "\"Group\".\"ID\" = '{$permission->GroupID}'", true, "\"Group\".\"ID\"");
|
||||
|
Loading…
x
Reference in New Issue
Block a user