MINOR: Updated docs to remove references to obsolete 'subdomains' (from r80857)

This commit is contained in:
Tom Rix 2010-03-01 02:49:35 +00:00
parent 9a556a31f9
commit 6df861e2b5
2 changed files with 6 additions and 30 deletions

View File

@ -6,7 +6,6 @@
*/ */
class LeftAndMainSubsites extends Extension { class LeftAndMainSubsites extends Extension {
static $allowed_actions = array( static $allowed_actions = array(
'addsubsite',
'changesubsite', 'changesubsite',
); );
@ -39,28 +38,6 @@ class LeftAndMainSubsites extends Extension {
return array(); 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() { public function Subsites() {
$siteList = new DataObjectSet(); $siteList = new DataObjectSet();
$subsites = Subsite::accessible_sites('CMS_ACCESS_' . $this->owner->class); $subsites = Subsite::accessible_sites('CMS_ACCESS_' . $this->owner->class);

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* A dynamically created subdomain. SiteTree objects can now belong to a subdomain. * A dynamically created subsite. SiteTree objects can now belong to a subsite.
* You can simulate subsite access without creating subdomains by appending ?SubsiteID=<ID> to the request. * You can simulate subsite access without setting up virtual hosts by appending ?SubsiteID=<ID> to the request.
* *
* @package subsites * @package subsites
*/ */
@ -84,7 +84,7 @@ class Subsite extends DataObject implements PermissionProvider {
/** /**
* Return the domain of this site * 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() { function domain() {
if($this->ID) { if($this->ID) {
@ -188,7 +188,7 @@ JS;
* directly from ModelAsController::getNestedController. Only gets Subsite instances which have their * directly from ModelAsController::getNestedController. Only gets Subsite instances which have their
* {@link IsPublic} flag set to TRUE. * {@link IsPublic} flag set to TRUE.
* *
* You can simulate subsite access without creating subdomains by appending ?SubsiteID=<ID> to the request. * You can simulate subsite access without creating virtual hosts by appending ?SubsiteID=<ID> to the request.
* *
* @todo Pass $request object from controller so we don't have to rely on $_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. * Return the subsites that the current user can access.
* Look for one of the given permission codes on the site. * Look for one of the given permission codes on the site.
* *
* Sites will only be included if they have a Title and a Subdomain. * Sites and Templates will only be included if they have a Title
* 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. * @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 { 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) { function createInstance($title, $domain) {
$intranet = Object::create('Subsite'); $intranet = Object::create('Subsite');