aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages/actions')
-rw-r--r--mod/pages/actions/pages/editwelcome.php55
1 files changed, 0 insertions, 55 deletions
diff --git a/mod/pages/actions/pages/editwelcome.php b/mod/pages/actions/pages/editwelcome.php
deleted file mode 100644
index a13ae4c35..000000000
--- a/mod/pages/actions/pages/editwelcome.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/**
- * Elgg Pages Edit welcome message
- *
- * @package ElggPages
- */
-
-global $CONFIG;
-
-// Get group fields
-$message = get_input("pages_welcome");
-$container_guid = get_input("owner_guid");
-$object_guid = get_input("object_guid");
-$access_id = (int) get_input("access_id");
-
-//check to see if this is an edit or new welcome message
-if($object_guid){
-
- //it is an edit so grab the object
- $welcome = get_entity($object_guid);
- if ($welcome->getSubtype() == "pages_welcome" && $welcome->canEdit()) {
-
- $welcome->description = $message;
- $welcome->access_id = $access_id;
- $welcome->save();
- system_message(elgg_echo("pages:welcomeposted"));
-
- } else {
- register_error(elgg_echo("pages:welcomeerror"));
- }
-} else {
- //it is a new welcome object
- if ($container_guid) {
- $welcome = new ElggObject();
- // Tell the system it's a pages welcome message
- $welcome->subtype = "pages_welcome";
- $welcome->title = "Welcome";
- $welcome->description = $message;
- $welcome->access_id = $access_id;
-
- // Set the owner
- $welcome->container_guid = $container_guid;
-
- // save
- if (!$welcome->save()){
- register_error(elgg_echo("pages:welcomeerror"));
- } else {
- system_message(elgg_echo("pages:welcomeposted"));
- }
- } else {
- register_error(elgg_echo("pages:welcomeerror"));
- }
-}
-
-forward("pg/pages/owned/" . get_entity($container_guid)->username); \ No newline at end of file