diff options
author | neoraider <devnull@localhost> | 2006-04-18 20:47:03 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-04-18 20:47:03 +0200 |
commit | 7b622dca2d4a24221202d85c15ba68d0974b432c (patch) | |
tree | 4234772ed30b7e2e7a7c751d8520ab608227035f /pages/content/Pages:Edit.xml | |
parent | aea6a2fa30bff2be100858bfc582384df4b84195 (diff) | |
download | neon-7b622dca2d4a24221202d85c15ba68d0974b432c.tar neon-7b622dca2d4a24221202d85c15ba68d0974b432c.zip |
Sofort-Bearbeiten-Funktion ?berarbeitet.
Diffstat (limited to 'pages/content/Pages:Edit.xml')
-rw-r--r-- | pages/content/Pages:Edit.xml | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/pages/content/Pages:Edit.xml b/pages/content/Pages:Edit.xml index beaa0b3..973b9f0 100644 --- a/pages/content/Pages:Edit.xml +++ b/pages/content/Pages:Edit.xml @@ -11,22 +11,35 @@ <![CDATA[ <?PHP require_once('code/pages.inc.php'); + require_once('code/links.inc.php'); require_once('code/util.inc.php'); - if($_GET['type'] != 'c' && $_GET['type'] != 'n' && $_GET['type'] != 'e') + if($_POST['type'] != 'c' && $_POST['type'] != 'n' && $_POST['type'] != 'e') exit(); - if(!$_GET['name'] || !$_GET['backlink']) exit(); + if($_POST['back']) { + header('Location: ' . Unquote($_POST['backlink'])); + exit(); + } + + if(!$_POST['name'] || !$_POST['backlink']) exit(); - if(!$GLOBALS['pages']->HasWriteAccess(Unquote($_GET['name']), $_GET['type'])) + if(!$GLOBALS['pages']->HasWriteAccess(Unquote($_POST['name']), $_POST['type'])) exit(); - $data = $GLOBALS['pages']->GetEditor(Unquote($_GET['name']), $_GET['type'], Unquote($_GET['backlink'])); - - $title = $data['title']; - - echo $data['content']; + $data = array(); + + foreach($_POST as $key => $val) { + if(substr($key, 0, 5) != 'data_') continue; + + $data[substr($key, 5)] = Unquote($val); + } + + $GLOBALS['pages']->Edit(Unquote($_POST['name']), $_POST['type'], $data); + + header('Location: ' . Unquote($_POST['backlink'])); + exit(); ?> ]]> </code> |