summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-24 21:20:16 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-24 21:20:16 +0000
commit173f528f59e6a83bdda973ef63c55659e6b1323b (patch)
tree093703257868dffd08c74328468c868a87327931 /database
parentcdc4ca816d175ab455f30024dbfd64069b537cf3 (diff)
downloadbrdo-173f528f59e6a83bdda973ef63c55659e6b1323b.tar.gz
brdo-173f528f59e6a83bdda973ef63c55659e6b1323b.tar.bz2
- Modified patch #14170 by Neil: improved default workflow (default node type) configuration page.
Modified the patch to remove some redundant code, to translate strings, and to better use the menu system.
Diffstat (limited to 'database')
-rw-r--r--database/updates.inc34
1 files changed, 33 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 8dab69b03..f41f1d2e1 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -94,7 +94,8 @@ $sql_updates = array(
"2005-01-07" => "update_115",
"2005-01-14" => "update_116",
"2005-01-18" => "update_117",
- "2005-01-19" => "update_118"
+ "2005-01-19" => "update_118",
+ "2005-01-20" => "update_119"
);
function update_32() {
@@ -2110,6 +2111,37 @@ function update_118() {
return $ret;
}
+function update_119() {
+ $ret = array();
+
+ foreach (node_list() as $type) {
+ $node_options = array();
+ if (variable_get('node_status_'. $type, 1)) {
+ $node_options[] = 'status';
+ }
+ if (variable_get('node_moderate_'. $type, 0)) {
+ $node_options[] = 'moderate';
+ }
+ if (variable_get('node_promote_'. $type, 1)) {
+ $node_options[] = 'promote';
+ }
+ if (variable_get('node_sticky_'. $type, 0)) {
+ $node_options[] = 'sticky';
+ }
+ if (variable_get('node_revision_'. $type, 0)) {
+ $node_options[] = 'revision';
+ }
+ variable_set('node_options_'. $type, $node_options);
+ variable_del('node_status_'. $type);
+ variable_del('node_moderate_'. $type);
+ variable_del('node_promote_'. $type);
+ variable_del('node_sticky_'. $type);
+ variable_del('node_revision_'. $type);
+ }
+
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);