mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 16:24:43 +03:00
Use more convenient name for the primary key in "translation" table
This commit is contained in:
parent
14e709be37
commit
1a3062f2f9
@ -112,7 +112,7 @@ requestcallback:
|
|||||||
# Contains updated translations
|
# Contains updated translations
|
||||||
translation:
|
translation:
|
||||||
fields:
|
fields:
|
||||||
stringid: "int NOT NULL auto_increment PRIMARY KEY"
|
translationid: "int NOT NULL auto_increment PRIMARY KEY"
|
||||||
locale: "varchar(5) NOT NULL"
|
locale: "varchar(5) NOT NULL"
|
||||||
context: "varchar(256) NOT NULL DEFAULT ''"
|
context: "varchar(256) NOT NULL DEFAULT ''"
|
||||||
source: "text COLLATE utf8_bin"
|
source: "text COLLATE utf8_bin"
|
||||||
|
@ -60,7 +60,7 @@ class TranslationController extends AbstractController
|
|||||||
$strings = $this->loadStrings($target);
|
$strings = $this->loadStrings($target);
|
||||||
foreach ($strings as $key => $item) {
|
foreach ($strings as $key => $item) {
|
||||||
$strings[$key] = array(
|
$strings[$key] = array(
|
||||||
'id' => $item['stringid'],
|
'id' => $item['translationid'],
|
||||||
'source' => htmlentities($item['source']),
|
'source' => htmlentities($item['source']),
|
||||||
'translation' => (empty($item['translation'])
|
'translation' => (empty($item['translation'])
|
||||||
? "<font color=\"#c13030\"><b>absent</b></font>"
|
? "<font color=\"#c13030\"><b>absent</b></font>"
|
||||||
@ -229,7 +229,7 @@ class TranslationController extends AbstractController
|
|||||||
protected function loadString($id)
|
protected function loadString($id)
|
||||||
{
|
{
|
||||||
$string = Database::getInstance()->query(
|
$string = Database::getInstance()->query(
|
||||||
"SELECT * FROM {translation} WHERE stringid = :id",
|
"SELECT * FROM {translation} WHERE translationid = :id",
|
||||||
array(':id' => $id),
|
array(':id' => $id),
|
||||||
array('return_rows' => Database::RETURN_ONE_ROW)
|
array('return_rows' => Database::RETURN_ONE_ROW)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user