Skip to content

Commit

Permalink
SQL and PHP cases
Browse files Browse the repository at this point in the history
PHP true,false,null in lowercase
SQL keywords uppercase

Picked fro 65438a2
Re #75
  • Loading branch information
Alexandra Nantel authored and nitriques committed Oct 24, 2017
1 parent dc7665e commit fc6fb38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ public function dFLSavePreferences($context)
if (!in_array("handle-$lc", $valid_columns)) {
Symphony::Database()->query(
"ALTER TABLE `$entries_table`
ADD COLUMN `handle-$lc` varchar(255) default NULL,
ADD COLUMN `value-$lc` text default NULL,
ADD COLUMN `value_formatted-$lc` text default NULL,
ADD COLUMN `word_count-$lc` int(11) default NULL;"
ADD COLUMN `handle-$lc` VARCHAR(255) DEFAULT NULL,
ADD COLUMN `value-$lc` TEXT DEFAULT NULL,
ADD COLUMN `value_formatted-$lc` TEXT DEFAULT NULL,
ADD COLUMN `word_count-$lc` INT(11) DEFAULT NULL;"
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions fields/field.multilingual_textbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public static function generateTableColumns()
$cols = array();
foreach (FLang::getLangs() as $lc) {
$cols[] = "`handle-{$lc}` VARCHAR(255) DEFAULT NULL,";
$cols[] = "`value-{$lc}` TEXT default NULL,";
$cols[] = "`value_formatted-{$lc}` TEXT default NULL,";
$cols[] = "`value-{$lc}` TEXT DEFAULT NULL,";
$cols[] = "`value_formatted-{$lc}` TEXT DEFAULT NULL,";
$cols[] = "`word_count-{$lc}` INT(11) UNSIGNED DEFAULT NULL,";
}
return $cols;
Expand Down Expand Up @@ -725,7 +725,7 @@ public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = fa
}

// @todo: remove and fallback to default (Symphony 2.5 only?)
public function prepareTableValue($data, XMLElement $link = null, $entry_id = NULL)
public function prepareTableValue($data, XMLElement $link = null, $entry_id = null)
{
$lc = $this->getLang($data);

Expand Down Expand Up @@ -764,7 +764,7 @@ protected function getLang($data = null)
return $lc;
}

public function getParameterPoolValue(array $data, $entry_id = NULL)
public function getParameterPoolValue(array $data, $entry_id = null)
{
$lc = $this->getLang();
return $data["value-$lc"];
Expand Down

0 comments on commit fc6fb38

Please sign in to comment.