summaryrefslogtreecommitdiffstats
path: root/pages/content/Pages:Edit.xml
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-04-18 02:20:03 +0200
committerneoraider <devnull@localhost>2006-04-18 02:20:03 +0200
commit531b89f69ab5e72900fbd2484d60491f68e9153b (patch)
tree397a9203c3cc7c2042b9276f67e89ede68fcd0da /pages/content/Pages:Edit.xml
parente7359ccf2db89b1feec820d1c97583f720ae0d7a (diff)
downloadneon-531b89f69ab5e72900fbd2484d60491f68e9153b.tar
neon-531b89f69ab5e72900fbd2484d60491f68e9153b.zip
Sofort-Bearbeiten funktioniert jetzt.
Diffstat (limited to 'pages/content/Pages:Edit.xml')
-rw-r--r--pages/content/Pages:Edit.xml30
1 files changed, 10 insertions, 20 deletions
diff --git a/pages/content/Pages:Edit.xml b/pages/content/Pages:Edit.xml
index dfe9a51..beaa0b3 100644
--- a/pages/content/Pages:Edit.xml
+++ b/pages/content/Pages:Edit.xml
@@ -3,7 +3,7 @@
<info>
<name>Pages:Edit</name>
<template>phpexec</template>
- <access>0:0</access>
+ <access>9:0</access>
<type>c</type>
</info>
<data>
@@ -11,32 +11,22 @@
<![CDATA[
<?PHP
require_once('code/pages.inc.php');
- require_once('code/links.inc.php');
require_once('code/util.inc.php');
- if($_POST['type'] != 'c' && $_POST['type'] != 'n' && $_POST['type'] != 'e')
+ if($_GET['type'] != 'c' && $_GET['type'] != 'n' && $_GET['type'] != 'e')
exit();
- if($_POST['back']) {
- header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false));
- exit();
- }
-
- if(!$_POST['name']) exit();
-
- $data = array();
+ if(!$_GET['name'] || !$_GET['backlink']) exit();
- 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);
+ if(!$GLOBALS['pages']->HasWriteAccess(Unquote($_GET['name']), $_GET['type']))
+ exit();
- header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false));
- exit();
+ $data = $GLOBALS['pages']->GetEditor(Unquote($_GET['name']), $_GET['type'], Unquote($_GET['backlink']));
+
+ $title = $data['title'];
+
+ echo $data['content'];
?>
]]>
</code>