diff --git a/code/Subsite.php b/code/Subsite.php index 73b5799..2d5b47d 100644 --- a/code/Subsite.php +++ b/code/Subsite.php @@ -220,8 +220,8 @@ SQL; $SQLa_perm = Convert::raw2sql($permissionCodes); $SQL_perms = join("','", $SQLa_perm); $memberID = (int)$member->ID; - - return DB::query("SELECT COUNT(`Permission`.`ID`) FROM `Permission` LEFT JOIN `Group` ON `Group`.`ID` = `Permission`.`GroupID` LEFT JOIN `Group_Members` USING(`GroupID`) WHERE `Permission`.`Code` IN ('$SQL_perms') AND `SubsiteID` = 0 AND `MemberID` = {$memberID}")->value(); + // `SubsiteID` = 0 AND + return DB::query("SELECT COUNT(`Permission`.`ID`) FROM `Permission` LEFT JOIN `Group` ON `Group`.`ID` = `Permission`.`GroupID` LEFT JOIN `Group_Members` USING(`GroupID`) WHERE `Permission`.`Code` IN ('$SQL_perms') AND `MemberID` = {$memberID}")->value(); } function createInitialRecords() { diff --git a/code/SubsiteAdmin.php b/code/SubsiteAdmin.php index 85ed6f4..89d9284 100644 --- a/code/SubsiteAdmin.php +++ b/code/SubsiteAdmin.php @@ -14,14 +14,16 @@ class SubsiteAdmin extends GenericDataAdmin { } function getLink() { - return 'admin/intranets/'; + return 'admin/subsites/'; } function Link() { return $this->getLink(); } - function Results($data, $form) { + function Results($data = null) { + if(!$data) $data = $this->requestParams; + $where = ''; if(isset($data['Name']) && $data['Name']) { $SQL_name = Convert::raw2sql($data['Name']); @@ -38,7 +40,7 @@ class SubsiteAdmin extends GenericDataAdmin { foreach($intranets as $intranet) { $numIntranets++; $evenOdd = ($numIntranets % 2) ? 'odd':'even'; - $html .= "