Skip to content

Commit

Permalink
Merge pull request #7 from itsmng/fix-whitelabel-update
Browse files Browse the repository at this point in the history
Fix whitelabel update
  • Loading branch information
itsmdevteam committed Feb 27, 2023
2 parents 0434d55 + 29cd14d commit 6a4c5e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
16 changes: 11 additions & 5 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,19 +187,19 @@ function plugin_whitelabel_install() {
// Add column header_icons_color
if(!$DB->fieldExists('glpi_plugin_whitelabel_brand', 'header_icons_color')) {
$query = "ALTER TABLE `glpi_plugin_whitelabel_brand` ADD COLUMN `header_icons_color` varchar(7) COLLATE utf8_unicode_ci NOT NULL DEFAULT '#ffffff'";
$DB->queryOrDie($query, $DB->error());
$DB->queryOrDie($query, $DB->error());
}

// Add column menu_color
if(!$DB->fieldExists('glpi_plugin_whitelabel_brand', 'menu_color')) {
$query = "ALTER TABLE `glpi_plugin_whitelabel_brand` ADD COLUMN `menu_color` varchar(7) COLLATE utf8_unicode_ci NOT NULL DEFAULT '#ae0c2a'";
$DB->queryOrDie($query, $DB->error());
$DB->queryOrDie($query, $DB->error());
}

// Add column menu_text_color
if(!$DB->fieldExists('glpi_plugin_whitelabel_brand', 'menu_color')) {
$query = "ALTER TABLE `glpi_plugin_whitelabel_brand` ADD COLUMN `menu_color` varchar(7) COLLATE utf8_unicode_ci NOT NULL DEFAULT '#ffffff'";
$DB->queryOrDie($query, $DB->error());
if(!$DB->fieldExists('glpi_plugin_whitelabel_brand', 'menu_text_color')) {
$query = "ALTER TABLE `glpi_plugin_whitelabel_brand` ADD COLUMN `menu_text_color` varchar(7) COLLATE utf8_unicode_ci NOT NULL DEFAULT '#ffffff'";
$DB->queryOrDie($query, $DB->error());
}

// Add column menu_active_color
Expand Down Expand Up @@ -256,6 +256,12 @@ function plugin_whitelabel_install() {
$DB->queryOrDie($query, $DB->error());
}

// Add column table_header_background_color
if(!$DB->fieldExists('glpi_plugin_whitelabel_brand', 'table_header_background_color')) {
$query = "ALTER TABLE `glpi_plugin_whitelabel_brand` ADD COLUMN `table_header_background_color` varchar(7) COLLATE utf8_unicode_ci NOT NULL DEFAULT '#f8f8f8'";
$DB->queryOrDie($query, $DB->error());
}

// Add column table_header_text_color
if(!$DB->fieldExists('glpi_plugin_whitelabel_brand', 'table_header_text_color')) {
$query = "ALTER TABLE `glpi_plugin_whitelabel_brand` ADD COLUMN `table_header_text_color` varchar(7) COLLATE utf8_unicode_ci NOT NULL DEFAULT '#ae0c2a'";
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function plugin_init_whitelabel() {
function plugin_version_whitelabel() {
return array(
'name' => "White Label",
'version' => '2.1.0',
'version' => '2.2.0',
'author' => 'ITSM Dev Team, Théodore Clément',
'license' => 'GPLv3+',
'homepage' => 'https://github.com/itsmng/whitelabel',
Expand Down
4 changes: 0 additions & 4 deletions styles/template.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ $break_tablets: 1300px;
color: %primary_color% !important;
}

.itilstatus {
color: %primary_color% !important;
}

#logo_login {
background: %menu_color% !important;
}
Expand Down

0 comments on commit 6a4c5e6

Please sign in to comment.