Skip to content

Commit

Permalink
Added 1 more language to the alias transliterations. Changed construc…
Browse files Browse the repository at this point in the history
…tor names of classes in admin/tables/ folder for PHP 7 compliance
  • Loading branch information
ggppdk committed Apr 19, 2016
1 parent 1e6a944 commit bec420a
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_cats_item_relations.php
Expand Up @@ -44,7 +44,7 @@ class flexicontent_cats_item_relations extends JTable
*/
var $ordering = null;

function flexicontent_cats_item_relations(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_cats_item_relations', 'catid', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_favourites.php
Expand Up @@ -45,7 +45,7 @@ class flexicontent_favourites extends JTable
/** @var int */
var $notify = null;

function flexicontent_favourites(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_favourites', 'id', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_fields_item_relations.php
Expand Up @@ -56,7 +56,7 @@ class flexicontent_fields_item_relations extends JTable
*/
var $value = null;

function flexicontent_fields_item_relations(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_fields_item_relations', 'item_id', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_fields_type_relations.php
Expand Up @@ -43,7 +43,7 @@ class flexicontent_fields_type_relations extends JTable
*/
var $ordering = null;

function flexicontent_fields_type_relations(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_fields_type_relations', 'field_id', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_files.php
Expand Up @@ -67,7 +67,7 @@ class flexicontent_files extends JTable
/** @var string */
var $attribs = null;

function flexicontent_files(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_files', 'id', $db);
$this->access = FLEXI_J16GE ? 1 : 0; // Public access is 1 for J2.5 and 0 for J1.5
}
Expand Down
23 changes: 15 additions & 8 deletions admin/tables/flexicontent_items.php
Expand Up @@ -237,8 +237,7 @@ function __construct(&$db) {
if (!isset($tbl_fields))
{
$tbls = array($this->_tbl_join_tmp);
if (!FLEXI_J16GE) $tbl_fields = $db->getTableFields($tbls);
else foreach ($tbls as $tbl) $tbl_fields[$tbl] = $db->getTableColumns($tbl);
foreach ($tbls as $tbl) $tbl_fields[$tbl] = $db->getTableColumns($tbl);
}
$this->_join_prop_tmp = array_keys($tbl_fields[$this->_tbl_join_tmp]);

Expand Down Expand Up @@ -678,36 +677,44 @@ function transliterate($string)
$langFrom = array();
$langTo = array();

// BULGARIAN
if ($this->language == 'bg-BG') {
$bgLangFrom = array('А', 'а', 'Б', 'б', 'В', 'в', 'Г', 'г', 'Д', 'д', 'Е', 'е', 'Ж', 'ж', 'З', 'з', 'И', 'и', 'Й', 'й', 'К', 'к', 'Л', 'л', 'М', 'м', 'Н', 'н', 'О', 'о', 'П', 'п', 'Р', 'р', 'С', 'с', 'Т', 'т', 'У', 'у', 'Ф', 'ф', 'Х', 'х', 'Ц', 'ц', 'Ч', 'ч', 'Ш', 'ш', 'Щ', 'щ', 'Ъ', 'ъ', 'Ьо', 'ьо', 'Ю', 'ю', 'Я', 'я');
$bgLangTo = array('A', 'a', 'B', 'b', 'V', 'v', 'G', 'g', 'D', 'd', 'E', 'e', 'Zh', 'zh', 'Z', 'z', 'I', 'i', 'J', 'j', 'K', 'k', 'L', 'l', 'M', 'm', 'N', 'n', 'O', 'o', 'P', 'p', 'R', 'r', 'S', 's', 'T', 't', 'U', 'u', 'F', 'f', 'H', 'h', 'C', 'c', 'Ch', 'ch', 'Sh', 'sh', 'Sht', 'sht', 'Y', 'y', 'Io', 'io', 'Ju', 'ju', 'Ja', 'ja');
$langFrom = array_merge ($langFrom, $bgLangFrom);
$langTo = array_merge ($langTo, $bgLangTo);
}

// CZECH
if ($this->language == 'cz-CZ') {
$czLangFrom = array('á','č','ď','é','ě','í','ň','ó','ř','š','ť','ú','ů','ý','ž','Á','Č','Ď','É','Ě','Í','Ň','Ó','Ř','Š','Ť','Ú','Ů','Ý','Ž');
$czLangTo = array('a','c','d','e','e','i','n','o','r','s','t','u','u','y','z','a','c','d','e','e','i','ň','o','r','s','t','u','u','y','z');
$langFrom = $czLangFrom;
$langTo = $czLangTo;
$langFrom = array_merge ($langFrom, $czLangFrom);
$langTo = array_merge ($langTo, $czLangTo);
}

// CROATIAN
if ($this->language == 'hr-HR' || $this->language == 'hr-BA') {
$hrLangFrom = array('č','ć','đ','š','ž','Č','Ć','Đ','Š','Ž');
$hrLangTo = array('c','c','d','s','z','c','c','d','s','z');
$langFrom = array_merge ($langFrom, $hrLangFrom);
$langTo = array_merge ($langTo, $hrLangTo);
$langTo = array_merge ($langTo, $hrLangTo);
}

// GREEK
if ($this->language == 'el-GR') {
$grLangFrom = array('α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'η', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω', 'Α', 'Β', 'Γ', 'Δ', 'Ε', 'Ζ', 'Η', 'Θ', 'Ι', 'Κ', 'Λ', 'Μ', 'Ν', 'Ξ', 'Ο', 'Π', 'Ρ', 'Σ', 'Τ', 'Υ', 'Φ', 'Χ', 'Ψ', 'Ω', 'Ά', 'Έ', 'Ή', 'Ί', 'Ύ', 'Ό', 'Ώ', 'ά', 'έ', 'ή', 'ί', 'ύ', 'ό', 'ώ', 'ΰ', 'ΐ', 'ϋ', 'ϊ', 'ς', '«', '»' );
$grLangTo = array('a', 'b', 'g', 'd', 'e', 'z', 'h', 'th', 'i', 'i', 'k', 'l', 'm', 'n', 'ks', 'o', 'p', 'r', 's', 't', 'u', 'f', 'x', 'ps', 'o', 'A', 'B', 'G', 'D', 'E', 'Z', 'I', 'Th', 'I', 'K', 'L', 'M', 'N', 'Ks', 'O', 'P', 'R', 'S', 'T', 'Y', 'F', 'X', 'Ps', 'O', 'A', 'E', 'I', 'I', 'U', 'O', 'O', 'a', 'e', 'i', 'i', 'u', 'o', 'o', 'u', 'i', 'u', 'i', 's', '_', '_' );
$langFrom = array_merge ($langFrom, $grLangFrom);
$langTo = array_merge ($langTo, $grLangTo);
$langTo = array_merge ($langTo, $grLangTo);
}

// HUNGARIAN
if ($this->language == 'hu-HU') {
$huLangFrom = array('á','é','ë','í','ó','ö','ő','ú','ü','ű','Á','É','Ë','Í','Ó','Ö','Ő','Ú','Ü','Ű');
$huLangTo = array('a','e','e','i','o','o','o','u','u','u','a','e','e','i','o','o','o','u','u','u');
$langFrom = array_merge ($langFrom, $huLangFrom);
$langTo = array_merge ($langTo, $huLangTo);
$langTo = array_merge ($langTo, $huLangTo);
}

// POLISH
Expand All @@ -731,7 +738,7 @@ function transliterate($string)
$skLangFrom = array('á','ä','č','ď','é','í','ľ','ĺ','ň','ó','ô','ŕ','š','ť','ú','ý','ž','Á','Ä','Č','Ď','É','Í','Ľ','Ĺ','Ň','Ó','Ô','Ŕ','Š','Ť','Ú','Ý','Ž');
$skLangTo = array('a','a','c','d','e','i','l','l','n','o','o','r','s','t','u','y','z','a','a','c','d','e','i','l','l','n','o','o','r','s','t','u','y','z');
$langFrom = array_merge ($langFrom, $skLangFrom);
$langTo = array_merge ($langTo, $skLangTo);
$langTo = array_merge ($langTo, $skLangTo);
}

// SLOVENIAN
Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_items_ext.php
Expand Up @@ -46,7 +46,7 @@ class flexicontent_items_ext extends JTable{
/**
* @param database A database connector object
*/
function flexicontent_items_ext(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_items_ext', 'item_id', $db);
}
}
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_items_extravote.php
Expand Up @@ -42,7 +42,7 @@ class flexicontent_items_extravote extends JTable
/** @var string */
var $lastip = null;

function flexicontent_items_extravote(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_items_extravote', 'content_id', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_items_rating.php
Expand Up @@ -40,7 +40,7 @@ class flexicontent_items_rating extends JTable
/** @var string */
var $lastip = null;

function flexicontent_items_rating(& $db) {
function __construct(& $db) {
parent::__construct('#__content_rating', 'content_id', $db);
}

Expand Down
5 changes: 2 additions & 3 deletions admin/tables/flexicontent_items_tmp.php
Expand Up @@ -36,13 +36,12 @@ class flexicontent_items_tmp extends JTable{
/**
* @param database A database connector object
*/
function flexicontent_items_tmp(& $db) {
function __construct(& $db) {
$tbl_name = '#__flexicontent_items_tmp';

// Get columns
$tbls = array($tbl_name);
if (!FLEXI_J16GE) $tbl_fields = $db->getTableFields($tbls);
else foreach ($tbls as $tbl) $tbl_fields[$tbl] = $db->getTableColumns($tbl);
foreach ($tbls as $tbl) $tbl_fields[$tbl] = $db->getTableColumns($tbl);

$tbl_fields = array_keys($tbl_fields[$tbl_name]);
foreach ($tbl_fields as $tbl_field) $this->$tbl_field = null;
Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_tags.php
Expand Up @@ -43,7 +43,7 @@ class flexicontent_tags extends JTable
/** @var date */
var $checked_out_time = '';

function flexicontent_tags(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_tags', 'id', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_tags_item_relations.php
Expand Up @@ -38,7 +38,7 @@ class flexicontent_tags_item_relations extends JTable
*/
var $itemid = null;

function flexicontent_tags_item_relations(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_tags_item_relations', 'tid', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_types.php
Expand Up @@ -90,7 +90,7 @@ class flexicontent_types extends _flexicontent_types
/** @var boolean */
var $_trackAssets = true;

function flexicontent_types(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_types', 'id', $db);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/tables/flexicontent_versions.php
Expand Up @@ -45,7 +45,7 @@ class flexicontent_versions extends JTable
/** @var int */
var $state = null;

function flexicontent_versions(& $db) {
function __construct(& $db) {
parent::__construct('#__flexicontent_versions', 'id', $db);
}

Expand Down

0 comments on commit bec420a

Please sign in to comment.