aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/sites.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 14cc2039d..e12a745c5 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -139,7 +139,7 @@
if ($CONFIG->site->getGUID() == $this->guid)
throw new SecurityException('SecurityException:deletedisablecurrentsite');
- return parent::delete;
+ return parent::delete();
}
/**
@@ -603,7 +603,12 @@
}
// Register event handlers
-
- register_elgg_event_handler('boot','system','sites_init',2);
-
-?> \ No newline at end of file
+ register_elgg_event_handler('boot','system','sites_init',2);
+
+ // Register with unit test
+ register_plugin_hook('unit_test', 'system', 'sites_test');
+ function sites_test($hook, $type, $value, $params) {
+ global $CONFIG;
+ $value[] = "{$CONFIG->path}engine/tests/objects/sites.php";
+ return $value;
+ }