diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php
index f4906fa48..469ddfef4 100755
--- a/e107_handlers/admin_ui.php
+++ b/e107_handlers/admin_ui.php
@@ -7212,33 +7212,41 @@ class e_admin_form_ui extends e_form
private function renderLanguageTableInfo()
{
- $text = '';
- if(e107::getConfig()->get('multilanguage'))
+ if(!e107::getConfig()->get('multilanguage'))
{
- $curTable = $this->getController()->getTableName();
- $sitelanguage = e107::getConfig()->get('sitelanguage');
-
- if($curTable != e107::getDb()->db_IsLang($curTable))
- {
- $lang = e107::getDb()->mySQLlanguage;
- }
- else
- {
- $lang = $sitelanguage;
- }
-
- $def = deftrue('LAN_UI_USING_DATABASE_TABLE','Using [x] database table');
- $diz = e107::getParser()->lanVars($def, $lang); // "Using ".$lang." database table";
- $class = ($sitelanguage == $lang) ? "default" : "";
-
- $text = "";
- $text .= e107::getParser()->toGlyph('fa-hdd-o'); // ' ';
- $text .= e107::getLanguage()->toNative($lang)."";
- return $text;
+ return null;
}
- return false;
+ $curTable = $this->getController()->getTableName();
+ $sitelanguage = e107::getConfig()->get('sitelanguage');
+
+ $val = e107::getDb()->hasLanguage($curTable, true);
+
+ if($val === false)
+ {
+ return null;
+ }
+
+ if($curTable != e107::getDb()->hasLanguage($curTable))
+ {
+ $lang = e107::getDb()->mySQLlanguage;
+ }
+ else
+ {
+ $lang = $sitelanguage;
+ }
+
+ $def = deftrue('LAN_UI_USING_DATABASE_TABLE','Using [x] database table');
+ $diz = e107::getParser()->lanVars($def, $lang); // "Using ".$lang." database table";
+ $class = ($sitelanguage == $lang) ? "default" : "";
+
+ $text = "";
+ $text .= e107::getParser()->toGlyph('fa-hdd-o'); // ' ';
+ $text .= e107::getLanguage()->toNative($lang)."";
+ return $text;
+
+
}
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index 11e0f0b2a..0e752a248 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -4065,7 +4065,7 @@ var_dump($select_options);*/
return $def_options;
}
- function columnSelector($columnsArray, $columnsDefault = '', $id = 'column_options')
+ function columnSelector($columnsArray, $columnsDefault = array(), $id = 'column_options')
{
$columnsArray = array_filter($columnsArray);
@@ -4083,16 +4083,16 @@ var_dump($select_options);*/
foreach($columnsArray as $key => $fld)
{
+ if(!isset($fld['type']) || $fld['type'] === null) // Fixes #4083
+ {
+ continue;
+ }
+
if (empty($fld['forced']) && empty($fld['nolist']) && vartrue($fld['type'])!='hidden' && vartrue($fld['type'])!='upload')
{
$checked = (in_array($key,$columnsDefault)) ? TRUE : FALSE;
$ttl = isset($fld['title']) ? defset($fld['title'], $fld['title']) : $key;
- // $text .= "
- //
- // ".$this->checkbox_label($ttl, 'e-columns[]', $key, $checked)."
- //
- // ";
-//
+
$text .= "
".$this->checkbox('e-columns[]', $key, $checked,'label='.$ttl)."
diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php
index f5d8948a4..340779a21 100644
--- a/e107_handlers/mysql_class.php
+++ b/e107_handlers/mysql_class.php
@@ -867,6 +867,16 @@ class e_db_mysql implements e_db
return $this->mySQLrows;
}
+ /**
+ * hasLanguage() alias
+ * @deprecated
+ */
+ function db_IsLang($table, $multiple=false)
+ {
+ return $this->hasLanguage($table, $multiple);
+ }
+
+
/**
* insert() alias
* @deprecated
@@ -1467,7 +1477,7 @@ class e_db_mysql implements e_db
* @access private
* @return mixed the name of the language table (eg. lan_french_news) or an array of all matching language tables. (with mprefix)
*/
- function db_IsLang($table, $multiple=false)
+ function hasLanguage($table, $multiple=false)
{
//When running a multi-language site with english included. English must be the main site language.
// WARNING!!! FALSE is critical important - if missed, expect dead loop (prefs are calling db handler as well when loading)
diff --git a/e107_plugins/_blank/admin_config.php b/e107_plugins/_blank/admin_config.php
index c5cdf6c89..6927f6875 100644
--- a/e107_plugins/_blank/admin_config.php
+++ b/e107_plugins/_blank/admin_config.php
@@ -91,7 +91,7 @@ class plugin_blank_admin_ui extends e_admin_ui
* Example: 'r.blank'
* @var string
*/
- protected $table = "blank";
+ protected $table = "blank"; // must match _blank_sql.php
/**
* This is only needed if you need to JOIN tables AND don't wanna use $tableJoin
@@ -252,10 +252,10 @@ class plugin_blank_admin_ui extends e_admin_ui
'blank_name' => array('title'=> 'Name', 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'thclass' => ''),
'blank_version' => array('title'=> 'Version', 'type' => 'number', 'data' => 'str', 'width' => 'auto', 'thclass' => ''),
'blank_author' => array('title'=> LAN_AUTHOR, 'type' => 'user', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left'),
- 'blank_authorURL' => array('title'=> "Url", 'type' => 'url', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left'),
+ 'blank_authorURL' => array('title'=> LAN_URL, 'type' => 'url', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left'),
'blank_date' => array('title'=> LAN_DATE, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'thclass' => '', 'readParms' => 'long', 'writeParms' => array('type' => 'datetime')),
'blank_compatibility' => array('title'=> 'Compatible', 'type' => 'text', 'data' => 'str', 'width' => '10%', 'thclass' => 'center' ),
- 'blank_url' => array('title'=> LAN_URL, 'type' => 'file', 'data' => 'str', 'width' => '20%', 'thclass' => 'center', 'batch' => TRUE, 'filter'=>TRUE, 'readParms' => array('truncate' => 30), 'validate' => false, 'help' => 'Enter blank URL here', 'error' => 'please, enter valid URL'),
+ 'blank_url' => array('title'=> LAN_FILE, 'type' => 'file', 'data' => 'str', 'width' => '20%', 'thclass' => 'center', 'batch' => TRUE, 'filter'=>TRUE, 'readParms' => array('truncate' => 30), 'validate' => false, 'help' => 'Enter blank URL here', 'error' => 'please, enter valid URL'),
'blank_media' => array('title'=> "Media", 'type' => 'media', 'data' => 'json', 'width' => '20%', 'thclass' => 'center', 'batch' => TRUE, 'filter'=>TRUE, 'readParms' => array('truncate' => 30), 'writeParms'=>array(/*'w'=>200, 'h'=>150,*/ 'image'=>1, 'video'=>1, 'youtube'=>1, 'audio'=>1, 'glyph'=>1), 'validate' => false),
'test_list_1' => array('title'=> 'test 1', 'type' => 'boolean', 'data' => false, 'width' => '5%', 'thclass' => 'center', 'batch' => TRUE, 'filter'=>TRUE, 'noedit' => true),