From 6df861e2b5d8d59a119764237a69d7c0b7b6da5d Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Mon, 1 Mar 2010 02:49:35 +0000 Subject: [PATCH] MINOR: Updated docs to remove references to obsolete 'subdomains' (from r80857) --- code/LeftAndMainSubsites.php | 23 ----------------------- code/Subsite.php | 13 ++++++------- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/code/LeftAndMainSubsites.php b/code/LeftAndMainSubsites.php index 8208a68..d4d6a37 100644 --- a/code/LeftAndMainSubsites.php +++ b/code/LeftAndMainSubsites.php @@ -6,7 +6,6 @@ */ class LeftAndMainSubsites extends Extension { static $allowed_actions = array( - 'addsubsite', 'changesubsite', ); @@ -39,28 +38,6 @@ class LeftAndMainSubsites extends Extension { return array(); } - public function addsubsite() { - $name = $_REQUEST['Name']; - $newSubsite = Subsite::create($name); - - $subsites = $this->Subsites(); - - if(Director::is_ajax()) { - /*$output = "var option = null; for(var i = 0; i < \$('SubsitesSelect').size; i++) {\$('SubsitesSelect').remove(i);}\n"; - - if($subsites) { - foreach($subsites as $subsite) { - $output .= "option = document.createElement('option');\n option.title = '$subsite->Title';\n option.value = $subsite->ID;\$('SubsitesSelect').add(option);\n"; - } - } - - return $output;*/ - - return $this->SubsiteList(); - } else - return array(); - } - public function Subsites() { $siteList = new DataObjectSet(); $subsites = Subsite::accessible_sites('CMS_ACCESS_' . $this->owner->class); diff --git a/code/Subsite.php b/code/Subsite.php index 99edf20..5d192ae 100644 --- a/code/Subsite.php +++ b/code/Subsite.php @@ -1,7 +1,7 @@ to the request. + * A dynamically created subsite. SiteTree objects can now belong to a subsite. + * You can simulate subsite access without setting up virtual hosts by appending ?SubsiteID= to the request. * * @package subsites */ @@ -84,7 +84,7 @@ class Subsite extends DataObject implements PermissionProvider { /** * Return the domain of this site * - * @return string Domain name including subdomain (without protocol prefix) + * @return string The full domain name of this subsite (without protocol prefix) */ function domain() { if($this->ID) { @@ -188,7 +188,7 @@ JS; * directly from ModelAsController::getNestedController. Only gets Subsite instances which have their * {@link IsPublic} flag set to TRUE. * - * You can simulate subsite access without creating subdomains by appending ?SubsiteID= to the request. + * You can simulate subsite access without creating virtual hosts by appending ?SubsiteID= to the request. * * @todo Pass $request object from controller so we don't have to rely on $_REQUEST * @@ -407,8 +407,7 @@ JS; * Return the subsites that the current user can access. * Look for one of the given permission codes on the site. * - * Sites will only be included if they have a Title and a Subdomain. - * Templates will only be included if they have a Title. + * Sites and Templates will only be included if they have a Title * * @param $permCode array|string Either a single permission code or an array of permission codes. */ @@ -481,7 +480,7 @@ JS; */ class Subsite_Template extends Subsite { /** - * Create an instance of this template, with the given title & subdomain + * Create an instance of this template, with the given title & domain */ function createInstance($title, $domain) { $intranet = Object::create('Subsite');