dropped some resources, as they are not existing anymore

parent 862571be
......@@ -8,7 +8,7 @@ use ACP3\Core\Modules;
class ArticlesInstaller extends ModuleInstaller {
private $module_name = 'articles';
private $schema_version = 32;
private $schema_version = 33;
public function renameModule()
{
......@@ -66,7 +66,11 @@ class ArticlesInstaller extends ModuleInstaller {
"UPDATE `{pre}seo` SET uri = REPLACE(uri, '/list/', '/details/') WHERE uri REGEXP '^(articles/list/id_[0-9]+/)$';",
"UPDATE `{pre}articles` SET `text` = REPLACE(`text`, 'articles/list/id_', 'articles/details/id_') WHERE `text` REGEXP '(articles/list/id_[0-9]+/)';",
Modules::isInstalled('menus') || Modules::isInstalled('menu_items') ? "UPDATE `{pre}menu_items` SET uri = REPLACE(uri, '/list/', '/details/') WHERE uri REGEXP '^(articles/list/id_[0-9]+/)$';" : ''
)
),
33 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"extensions/search\";",
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
......
......@@ -4,7 +4,7 @@ use ACP3\Core\ModuleInstaller;
class CaptchaInstaller extends ModuleInstaller {
private $module_name = 'captcha';
private $schema_version = 30;
private $schema_version = 31;
protected function getName() {
return $this->module_name;
......@@ -27,6 +27,10 @@ class CaptchaInstaller extends ModuleInstaller {
}
protected function schemaUpdates() {
return array();
return array(
31 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
<?php
namespace ACP3\Modules\Categories;
use ACP3\Core\ModuleInstaller;
class CategoriesInstaller extends ModuleInstaller {
private $module_name = 'categories';
private $schema_version = 31;
private $schema_version = 32;
protected function getName() {
return $this->module_name;
......@@ -43,7 +46,11 @@ class CategoriesInstaller extends ModuleInstaller {
return array(
31 => array(
"ALTER TABLE `{pre}categories` CHANGE `name` `title` VARCHAR(120) {charset} NOT NULL;",
),
32 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
<?php
namespace ACP3\Modules\Comments;
use ACP3\Core\ModuleInstaller;
class CommentsInstaller extends ModuleInstaller {
private $module_name = 'comments';
private $schema_version = 31;
private $schema_version = 32;
protected function getName() {
return $this->module_name;
......@@ -46,7 +49,12 @@ class CommentsInstaller extends ModuleInstaller {
31 => array(
"INSERT INTO `{pre}acl_resources` (`id`, `module_id`, `page`, `params`, `privilege_id`) VALUES ('', " . $this->getModuleId() . ", 'acp_list_comments', '', 3);",
"UPDATE `{pre}acl_resources` SET page = 'acp_delete' WHERE module_id = " . $this->getModuleId() . " AND page = 'acp_delete_comments_per_module';",
),
32 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
"INSERT INTO `{pre}acl_resources` (`id`, `module_id`, `page`, `params`, `privilege_id`) VALUES('', " . $this->getModuleId() . ", 'list', '', 1);",
)
);
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ use ACP3\Core\ModuleInstaller;
class EmoticonsInstaller extends ModuleInstaller {
private $module_name = 'emoticons';
private $schema_version = 30;
private $schema_version = 31;
protected function getName() {
return $this->module_name;
......@@ -62,6 +62,10 @@ class EmoticonsInstaller extends ModuleInstaller {
}
protected function schemaUpdates() {
return array();
return array(
31 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ use ACP3\Core\ModuleInstaller;
class FilesInstaller extends ModuleInstaller {
private $module_name = 'files';
private $schema_version = 31;
private $schema_version = 32;
protected function getName() {
return $this->module_name;
......@@ -51,7 +51,12 @@ class FilesInstaller extends ModuleInstaller {
return array(
31 => array(
"ALTER TABLE `{pre}files` CHANGE `link_title` `title` VARCHAR(120) {charset} NOT NULL;",
)
),
32 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"extensions/search\";",
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"extensions/feeds\";",
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
<?php
namespace ACP3\Modules\Gallery;
use ACP3\Core\ModuleInstaller;
class GalleryInstaller extends ModuleInstaller {
private $module_name = 'gallery';
private $schema_version = 31;
private $schema_version = 32;
protected function getName() {
return $this->module_name;
......@@ -63,7 +66,11 @@ class GalleryInstaller extends ModuleInstaller {
return array(
31 => array(
"ALTER TABLE `{pre}gallery` CHANGE `name` `title` VARCHAR(120) {charset} NOT NULL;",
),
32 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
<?php
namespace ACP3\Modules\Menus;
use ACP3\Core\ModuleInstaller;
class MenusInstaller extends ModuleInstaller {
private $module_name = 'menus';
private $schema_version = 31;
private $schema_version = 32;
public function renameModule() {
return array(
......@@ -68,7 +71,11 @@ class MenusInstaller extends ModuleInstaller {
"UPDATE `{pre}acl_resources` SET page = 'acp_edit_item' WHERE module_id = " . $this->getModuleId() . " AND page = 'acp_edit_block';",
"DELETE FROM `{pre}acl_resources` WHERE page = 'acp_list_blocks' AND module_id = " . $this->getModuleId() . ";",
"RENAME TABLE `{pre}menu_items_blocks` TO `{pre}menus`"
),
32 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
<?php
namespace ACP3\Modules\News;
use ACP3\Core\ModuleInstaller;
class NewsInstaller extends ModuleInstaller {
private $module_name = 'news';
private $schema_version = 31;
private $schema_version = 32;
protected function getName() {
return $this->module_name;
......@@ -56,7 +59,13 @@ class NewsInstaller extends ModuleInstaller {
return array(
31 => array(
"ALTER TABLE `{pre}news` CHANGE `headline` `title` VARCHAR(120) {charset} NOT NULL",
),
32 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"extensions/search\";",
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"extensions/feeds\";",
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
<?php
namespace ACP3\Modules\Newsletter;
use ACP3\Core\ModuleInstaller;
class NewsletterInstaller extends ModuleInstaller {
private $module_name = 'newsletter';
private $schema_version = 33;
private $schema_version = 34;
public function __construct() {
$this->special_resources = array(
......@@ -65,7 +68,11 @@ class NewsletterInstaller extends ModuleInstaller {
),
33 => array(
"INSERT INTO `{pre}acl_resources` (`id`, `module_id`, `page`, `params`, `privilege_id`) VALUES('', " . $this->getModuleId() . ", 'sidebar', '', 1);",
),
34 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ use ACP3\Core\ModuleInstaller;
class SystemInstaller extends ModuleInstaller {
private $module_name = 'system';
private $schema_version = 34;
private $schema_version = 35;
public function __construct() {
$this->special_resources = array(
......@@ -151,7 +151,7 @@ class SystemInstaller extends ModuleInstaller {
'seo_robots' => 1,
'seo_title' => '',
'version' => '',
'wysiwyg' => 'ckeditor'
'wysiwyg' => 'CKEditor'
);
}
......@@ -177,7 +177,11 @@ class SystemInstaller extends ModuleInstaller {
),
34 => array(
"INSERT INTO `{pre}acl_resources` (`id`, `module_id`, `page`, `params`, `privilege_id`) VALUES('', " . $this->getModuleId() . ", 'functions', '', 1);",
)
),
35 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
"UPDATE `{pre}settings` SET value = \"4.0-dev\" WHERE module_id = " . $this->getModuleId() . " AND name = \"config_version\";",
),
);
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ use ACP3\Core\ModuleInstaller;
class UsersInstaller extends ModuleInstaller {
private $module_name = 'users';
private $schema_version = 32;
private $schema_version = 33;
protected function getName() {
return $this->module_name;
......@@ -99,7 +99,10 @@ class UsersInstaller extends ModuleInstaller {
"ALTER TABLE `{pre}users` ADD `address_display` TINYINT(1) UNSIGNED NOT NULL AFTER `city`;",
"ALTER TABLE `{pre}users` ADD `country_display` TINYINT(1) UNSIGNED NOT NULL AFTER `country`;",
"ALTER TABLE `{pre}users` ADD `mail_display` TINYINT(1) UNSIGNED NOT NULL AFTER `mail`;",
)
),
33 => array(
"DELETE FROM `{pre}acl_resources` WHERE `module_id` = " . $this->getModuleId() . " AND page = \"functions\";",
)
);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment