Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Labels for new languages #1

Merged
merged 1 commit into from

2 participants

@jonmifsud

New languages did not have the label column added thus leading to issues when saving entries after having added new languages.

@jonmifsud jonmifsud Add Labels for new languages
New languages did not have the label column added thus leading to issues when saving entries after having added new languages.
5d36dfc
@vlad-ghita vlad-ghita merged commit 81e0abb into from
@vlad-ghita
Owner

Ohh, thank you !

@jonmifsud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 25, 2013
  1. @jonmifsud

    Add Labels for new languages

    jonmifsud authored
    New languages did not have the label column added thus leading to issues when saving entries after having added new languages.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 extension.driver.php
View
6 extension.driver.php
@@ -190,7 +190,8 @@ public function dFLSavePreferences($context){
if( ($consolidate !== 'yes') && !in_array($lc, $context['new_langs']) )
Symphony::Database()->query(
"ALTER TABLE `{$entries_table}`
- DROP COLUMN `value-{$lc}`;"
+ DROP COLUMN `value-{$lc}`,
+ DROP COLUMN `label-{$lc}`;"
);
else
$columns[] = $column['Field'];
@@ -202,7 +203,8 @@ public function dFLSavePreferences($context){
if( !in_array('value-'.$lc, $columns) )
Symphony::Database()->query(
"ALTER TABLE `{$entries_table}`
- ADD COLUMN `value-{$lc}` varchar(255) default NULL;
+ ADD COLUMN `value-{$lc}` varchar(255) default NULL,
+ ADD COLUMN `label-{$lc}` TEXT DEFAULT null;
");
}
}
Something went wrong with that request. Please try again.