@@ -152,6 +152,7 @@ |
||
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | 154 | * Helper for testing if the subsite should be adjusted. |
| 155 | + * @param integer $currentSubsiteID |
|
| 155 | 156 | */ |
| 156 | 157 | public function shouldChangeSubsite($adminClass, $recordSubsiteID, $currentSubsiteID) { |
| 157 | 158 | if (Config::inst()->get($adminClass, 'treats_subsite_0_as_global') && $recordSubsiteID==0) return false; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * - Is in a group which has access to the subsite this page belongs to |
| 123 | 123 | * - Is in a group with edit permissions on the "main site" |
| 124 | 124 | * |
| 125 | - * @return boolean |
|
| 125 | + * @return false|null |
|
| 126 | 126 | */ |
| 127 | 127 | function canEdit($member = null) { |
| 128 | 128 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | - * @return boolean |
|
| 150 | + * @return false|null |
|
| 151 | 151 | */ |
| 152 | 152 | function canDelete($member = null) { |
| 153 | 153 | if(!$member && $member !== FALSE) $member = Member::currentUser(); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | - * @return boolean |
|
| 159 | + * @return false|null |
|
| 160 | 160 | */ |
| 161 | 161 | function canAddChildren($member = null) { |
| 162 | 162 | if(!$member && $member !== FALSE) $member = Member::currentUser(); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | - * @return boolean |
|
| 168 | + * @return false|null |
|
| 169 | 169 | */ |
| 170 | 170 | function canPublish($member = null) { |
| 171 | 171 | if(!$member && $member !== FALSE) $member = Member::currentUser(); |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | |
| 288 | 288 | /** |
| 289 | 289 | * @param Member |
| 290 | - * @return boolean|null |
|
| 290 | + * @return false|null |
|
| 291 | 291 | */ |
| 292 | 292 | function canCreate($member = null) { |
| 293 | 293 | // Typically called on a singleton, so we're not using the Subsite() relation |
@@ -97,7 +97,6 @@ discard block |
||
| 97 | 97 | * |
| 98 | 98 | * @todo Pass $request object from controller so we don't have to rely on $_GET |
| 99 | 99 | * |
| 100 | - * @param boolean $cache |
|
| 101 | 100 | * @return int ID of the current subsite instance |
| 102 | 101 | */ |
| 103 | 102 | public static function currentSubsiteID() { |
@@ -149,7 +148,7 @@ discard block |
||
| 149 | 148 | * for example matching all subdomains on *.example.com with one subsite, |
| 150 | 149 | * and all subdomains on *.example.org on another. |
| 151 | 150 | * |
| 152 | - * @param $host The host to find the subsite for. If not specified, $_SERVER['HTTP_HOST'] is used. |
|
| 151 | + * @param string $host The host to find the subsite for. If not specified, $_SERVER['HTTP_HOST'] is used. |
|
| 153 | 152 | * @return int Subsite ID |
| 154 | 153 | */ |
| 155 | 154 | public static function getSubsiteIDForDomain($host = null, $checkPermissions = true) { |
@@ -61,6 +61,9 @@ |
||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $msg |
|
| 66 | + */ |
|
| 64 | 67 | function log($msg) { |
| 65 | 68 | echo $msg . "\n"; |
| 66 | 69 | } |