diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-05-19 18:36:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-05-19 18:36:58 +0000 |
commit | b5e644d6b09351434167d87879e81029f36cf60d (patch) | |
tree | a11918f1b967d4df51324af9dbba7c7df2bbe567 /modules/node.module | |
parent | 65293a819b4b6ffcc883dd30fd8b5a9cdccfb085 (diff) | |
download | brdo-b5e644d6b09351434167d87879e81029f36cf60d.tar.gz brdo-b5e644d6b09351434167d87879e81029f36cf60d.tar.bz2 |
- Some fields can be passed through the $_GET array (eg. to make the "blog
it" modules work). Patch by Ax.
Diffstat (limited to 'modules/node.module')
-rw-r--r-- | modules/node.module | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/node.module b/modules/node.module index 7ec69b207..b8471124c 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1104,12 +1104,16 @@ function node_add($type) { */ if ($type && node_access("create", $type)) { - // Initialize settings - // TODO : clean up this code. + // Initialize settings: $node = array("uid" => $user->uid, "name" => $user->name, "type" => $type); + + /* + ** Allow the following fields to be initialized via $_GET (eg. for use + ** with a "blog it" bookmarklet): + */ foreach (array("title", "teaser", "body") as $field) { - if ($edit[$field]) { - $node[$field] = check_input($edit[$field]); + if ($_GET["edit"][$field]) { + $node[$field] = check_input($_GET["edit"][$field]); } } $output = node_form($node); |