diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-26 18:25:08 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-26 18:25:08 +0000 |
commit | b027f962af16d074398d1351a90d863aaf5469f3 (patch) | |
tree | cb547da86008491ce9a25cafae56800fd4944229 /mod/sitepages/actions/add.php | |
parent | fd878435ffeb7478aa745f76dfcea608301a04ba (diff) | |
download | elgg-b027f962af16d074398d1351a90d863aaf5469f3.tar.gz elgg-b027f962af16d074398d1351a90d863aaf5469f3.tar.bz2 |
Updating Sitepages plugin settings for new administration layout.
git-svn-id: http://code.elgg.org/elgg/trunk@6242 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages/actions/add.php')
-rw-r--r-- | mod/sitepages/actions/add.php | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/mod/sitepages/actions/add.php b/mod/sitepages/actions/add.php deleted file mode 100644 index bc38d8067..000000000 --- a/mod/sitepages/actions/add.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * Site pages save/edit - * - * @package SitePages - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd <info@elgg.com> - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - */ - -// Make sure we're logged as admin -admin_gatekeeper(); - -// Get input data -$content = get_input('sitepages_content', '', FALSE); -$page_type = get_input('page_type'); -$tags = get_input('sitepages_tags'); -$tag_array = string_to_tag_array($tags); - -// Cache to the session for sticky forms -// @todo make these work. -$_SESSION['sitepages_content'] = $content; -$_SESSION['sitepages_type'] = $type; -$_SESSION['sitepages_tags'] = $tags; - -if (!$sitepage = sitepages_get_sitepage_object($page_type)) { - $sitepage = sitepages_create_sitepage_object($page_type); -} - -if (empty($content)) { - register_error(elgg_echo('sitepages:blank')); -} else { - $sitepage->title = $type; - $sitepage->description = $content; - $sitepage->tags = $tag_array; - - if (!$sitepage->save()) { - register_error(elgg_echo('sitepages:error')); - } else { - system_message(elgg_echo('sitepages:posted')); - // @todo this needs to be accurate for create or update. - add_to_river('river/sitepages/create', 'create', $_SESSION['user']->guid, $sitepages->guid); - } - - // @todo Good intensions... - unset($_SESSION['sitepages_content']); - unset($_SESSION['sitepagestitle']); - unset($_SESSION['sitepagestags']); -} - -forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file |