aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php12
-rw-r--r--engine/lib/entities.php13
-rw-r--r--engine/lib/filestore.php6
-rw-r--r--engine/lib/navigation.php2
-rw-r--r--engine/lib/views.php2
5 files changed, 29 insertions, 6 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index db1464bd8..4bbe87f57 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2016,10 +2016,20 @@ function elgg_is_valid_options_for_batch_operation($options, $type) {
*
* @link http://docs.elgg.org/Tutorials/WalledGarden
* @elgg_plugin_hook index system
+ *
+ * @param string $hook The name of the hook
+ * @param string $type The type of hook
+ * @param bool $value Has a plugin already rendered an index page?
+ * @param array $params Array of parameters (should be empty)
* @return bool
* @access private
*/
-function elgg_walled_garden_index() {
+function elgg_walled_garden_index($hook, $type, $value, $params) {
+ if ($value) {
+ // do not create a second index page so return
+ return;
+ }
+
elgg_load_css('elgg.walled_garden');
elgg_load_js('elgg.walled_garden');
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 4875b2c2f..ae5df66f7 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -331,7 +331,7 @@ function remove_subtype($type, $subtype) {
}
/**
- * Update a registered ElggEntity type, subtype, and classname
+ * Update a registered ElggEntity type, subtype, and class name
*
* @param string $type Type
* @param string $subtype Subtype
@@ -340,7 +340,7 @@ function remove_subtype($type, $subtype) {
* @return bool
*/
function update_subtype($type, $subtype, $class = '') {
- global $CONFIG;
+ global $CONFIG, $SUBTYPE_CACHE;
if (!$id = get_subtype_id($type, $subtype)) {
return FALSE;
@@ -348,10 +348,16 @@ function update_subtype($type, $subtype, $class = '') {
$type = sanitise_string($type);
$subtype = sanitise_string($subtype);
- return update_data("UPDATE {$CONFIG->dbprefix}entity_subtypes
+ $result = update_data("UPDATE {$CONFIG->dbprefix}entity_subtypes
SET type = '$type', subtype = '$subtype', class = '$class'
WHERE id = $id
");
+
+ if ($result && isset($SUBTYPE_CACHE[$id])) {
+ $SUBTYPE_CACHE[$id]->class = $class;
+ }
+
+ return $result;
}
/**
@@ -1452,6 +1458,7 @@ function enable_entity($guid, $recursive = true) {
'relationship' => 'disabled_with',
'relationship_guid' => $entity->guid,
'inverse_relationship' => true,
+ 'limit' => 0,
));
foreach ($disabled_with_it as $e) {
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index 86f6d9baa..93a127257 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -149,6 +149,12 @@ $x1 = 0, $y1 = 0, $x2 = 0, $y2 = 0, $upscale = FALSE) {
return FALSE;
}
+ // color transparencies white (default is black)
+ imagefilledrectangle(
+ $new_image, 0, 0, $params['newwidth'], $params['newheight'],
+ imagecolorallocate($new_image, 255, 255, 255)
+ );
+
$rtn_code = imagecopyresampled( $new_image,
$original_image,
0,
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index a7984ce5a..4ff009bfb 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -230,7 +230,7 @@ function elgg_pop_breadcrumb() {
global $CONFIG;
if (is_array($CONFIG->breadcrumbs)) {
- array_pop($CONFIG->breadcrumbs);
+ return array_pop($CONFIG->breadcrumbs);
}
return FALSE;
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 1b013be6f..c98ad4e78 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -403,7 +403,7 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
$view_orig = $view;
// Trigger the pagesetup event
- if (!isset($CONFIG->pagesetupdone)) {
+ if (!isset($CONFIG->pagesetupdone) && $CONFIG->boot_complete) {
$CONFIG->pagesetupdone = true;
elgg_trigger_event('pagesetup', 'system');
}