Skip to content

Commit

Permalink
- Patch by JonBob/Jonathan: reworked the menu system so that menus are
Browse files Browse the repository at this point in the history
  configurable!  Menu items can be disabled, repositioned, added and
  so on.

  Upgrading to requires you to run update.php.

  This functionality depricates some of the 'navigation modules' in the
  contributions repository.  Furthermore, modules can now 'suggest'
  menu items and site adminstrators can choose to enable them.  Modules
  in the contributions repository should try to take advantage of this.
  • Loading branch information
dbuytaert committed Apr 15, 2004
1 parent a083daf commit 10bdb51
Show file tree
Hide file tree
Showing 27 changed files with 1,201 additions and 166 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Drupal x.x.x, xxxx-xx-xx
------------------------

- profile module:
* made it possible to administere profile fields.
* made it possible to administer profile fields.
* made it possible to browse the profiles by field.

Drupal 4.4.0, 2004-04-01 (release candidate)
Expand Down
16 changes: 16 additions & 0 deletions database/database.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,21 @@ CREATE TABLE locales (
PRIMARY KEY (lid)
) TYPE=MyISAM;

--
-- Table structure for table 'menu'
--

CREATE TABLE menu (
mid int(10) unsigned NOT NULL default '0',
pid int(10) unsigned NOT NULL default '0',
path varchar(255) NOT NULL default '',
title varchar(255) NOT NULL default '',
weight tinyint(4) NOT NULL default '0',
visibility int(1) unsigned NOT NULL default '0',
status int(1) unsigned NOT NULL default '0',
PRIMARY KEY (mid)
) TYPE=MyISAM;

--
-- Table structure for table 'moderation_filters'
--
Expand Down Expand Up @@ -632,3 +647,4 @@ REPLACE variable SET name='theme_default', value='s:9:"xtemplate";';
REPLACE blocks SET module = 'user', delta = '0', status = '1';
REPLACE blocks SET module = 'user', delta = '1', status = '1';

INSERT INTO sequences (name, id) VALUES ('menu_mid', 1);
24 changes: 23 additions & 1 deletion database/updates.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ $sql_updates = array(
"2004-02-21" => "update_79",
"2004-03-11: first update since Drupal 4.4.0 release" => "update_80",
"2004-02-20" => "update_81",
"2004-02-27" => "update_82"
"2004-02-27" => "update_82",
"2004-04-15" => "update_83"
);

function update_32() {
Expand Down Expand Up @@ -900,6 +901,27 @@ function update_82() {
return $ret;
}

function update_83() {
$ret = array();
if ($GLOBALS["db_type"] == "mysql") {
$ret[] = update_sql("CREATE TABLE menu (
mid int(10) unsigned NOT NULL default '0',
pid int(10) unsigned NOT NULL default '0',
path varchar(255) NOT NULL default '',
title varchar(255) NOT NULL default '',
weight tinyint(4) NOT NULL default '0',
visibility int(1) unsigned NOT NULL default '0',
status int(1) unsigned NOT NULL default '0',
PRIMARY KEY (mid)
);");
$ret[] = update_sql("INSERT INTO sequences (name, id) VALUES ('menu_mid', 1)");
}
else {
/* Needs PostgreSQL equivalent */
}
return $ret;
}

function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);
Expand Down
Loading

0 comments on commit 10bdb51

Please sign in to comment.