summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-01-08 16:51:25 -0800
committerBharat Mediratta <bharat@menalto.com>2011-01-08 16:51:25 -0800
commite1e1e860cd1b19ebef491f0c0f82a3cd18e63721 (patch)
tree5746aa0920f4f406831cf675d3134733c222db1c
parent4fc5d50eb83f29c0a28ce16b9ff22179fd3f2c98 (diff)
Use the code version when installing a module that has no installer,
instead of hardcoding version 1. Fixes #1589.
-rw-r--r--installer/install.sql2
-rw-r--r--modules/gallery/helpers/module.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/installer/install.sql b/installer/install.sql
index 09fabc7d..0ed7f2f3 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -247,7 +247,7 @@ CREATE TABLE {modules} (
INSERT INTO {modules} VALUES (1,1,'gallery',43,1);
INSERT INTO {modules} VALUES (2,1,'user',3,2);
INSERT INTO {modules} VALUES (3,1,'comment',3,3);
-INSERT INTO {modules} VALUES (4,1,'organize',1,4);
+INSERT INTO {modules} VALUES (4,1,'organize',3,4);
INSERT INTO {modules} VALUES (5,1,'info',2,5);
INSERT INTO {modules} VALUES (6,1,'rss',1,6);
INSERT INTO {modules} VALUES (7,1,'search',1,7);
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index 7c5578af..6efe6162 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -168,7 +168,7 @@ class module_Core {
if (method_exists($installer_class, "install")) {
call_user_func_array(array($installer_class, "install"), array());
} else {
- module::set_version($module_name, 1);
+ module::set_version($module_name, module::available()->$module_name->code_version);
}
// Set the weight of the new module, which controls the order in which the modules are