Commit 43b345ca authored by tbrehm's avatar tbrehm
Browse files

Merged revisions from 3.0.5 stable branch: 3758-3768, 3769 shall not be merged to trunk.

parent 2de9fd78
......@@ -61,10 +61,9 @@ class db extends mysqli
if ($this->connect_error) {
$this->updateError('DB::__construct');
return false;
} else {
$this->setCharacterEncoding();
}
parent::query( 'SET NAMES '.$this->dbCharset);
parent::query( "SET character_set_results = '".$this->dbCharset."', character_set_client = '".$this->dbCharset."', character_set_connection = '".$this->dbCharset."', character_set_database = '".$this->dbCharset."', character_set_server = '".$this->dbCharset."'");
}
public function __destruct() {
......@@ -89,14 +88,36 @@ class db extends mysqli
// This right here will allow us to use the samefile for server & interface
if($this->show_error_messages) {
echo $error_msg;
} else if(method_exists($app, 'log')) {
} else if(is_object($app) && method_exists($app, 'log')) {
$app->log($error_msg, LOGLEVEL_WARN);
}
}
}
private function setCharacterEncoding() {
parent::query( 'SET NAMES '.$this->dbCharset);
parent::query( "SET character_set_results = '".$this->dbCharset."', character_set_client = '".$this->dbCharset."', character_set_connection = '".$this->dbCharset."', character_set_database = '".$this->dbCharset."', character_set_server = '".$this->dbCharset."'");
}
public function query($queryString) {
parent::ping();
$try = 0;
do {
$try++;
$ok = parent::ping();
if(!$ok) {
if(!parent::real_connect($this->dbHost, $this->dbUser, $this->dbPass,$this->dbName)) {
if($try > 9) {
$this->updateError('DB::query -> reconnect');
return false;
} else {
sleep(1);
}
} else {
$this->setCharacterEncoding();
$ok = true;
}
}
} while($ok == false);
$this->queryId = parent::query($queryString);
$this->updateError('DB::query('.$queryString.') -> mysqli_query');
if($this->errorNumber) debug_print_backtrace();
......@@ -184,10 +205,10 @@ public function toLower($record) {
if(is_array($record_old) && count($record_old) > 0) {
foreach($record_old as $key => $val) {
// if(!isset($record_new[$key]) || $record_new[$key] != $val) {
if($record_new[$key] != $val) {
if(@$record_new[$key] != $val) {
// Record has changed
$diffrec_full['old'][$key] = $val;
$diffrec_full['new'][$key] = $record_new[$key];
$diffrec_full['new'][$key] = @$record_new[$key];
$diff_num++;
} else {
$diffrec_full['old'][$key] = $val;
......
......@@ -94,7 +94,7 @@ class listform_tpl_generator {
$html .= " <td class=\"tbl_col_buttons\">
<div class=\"buttons icons16\">
<a class=\"icons16 icoDelete\" href=\"javascript: del_record('".$module."/".$listDef["delete_file"]."?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');\"><span>{tmpl_var name='delete_txt'}</span></a>
<a class=\"button icons16 icoDelete\" href=\"javascript: del_record('".$module."/".$listDef["delete_file"]."?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');\"><span>{tmpl_var name='delete_txt'}</span></a>
</div>
</td>
</tr>
......
......@@ -681,7 +681,9 @@ class remoting_lib {
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
$sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
$tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`");
$record[$key] = $tmp['crypted'];
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} else {
$record[$key] = md5(stripslashes($record[$key]));
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
......@@ -708,7 +710,9 @@ class remoting_lib {
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
$sql_update .= "`$key` = PASSWORD('".$app->db->quote($record[$key])."'), ";
$tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`");
$record[$key] = $tmp['crypted'];
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} else {
$record[$key] = md5(stripslashes($record[$key]));
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
......
......@@ -1057,7 +1057,9 @@ class tform {
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} elseif ($field['encryption'] == 'MYSQL') {
$sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
$tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`");
$record[$key] = $tmp['crypted'];
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} elseif ($field['encryption'] == 'CLEARTEXT') {
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} else {
......@@ -1084,7 +1086,9 @@ class tform {
$record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
$sql_update .= "`$key` = PASSWORD('".$app->db->quote($record[$key])."'), ";
$tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`");
$record[$key] = $tmp['crypted'];
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'CLEARTEXT') {
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} else {
......
......@@ -131,3 +131,5 @@ $wb['datalog_status_i_web_folder_user'] = 'Vytvoření uživatele pro adresáře
$wb['datalog_status_u_web_folder_user'] = 'Aktualizace nastavení uživatele pro adresáře chráněné heslem';
$wb['datalog_status_d_web_folder_user'] = 'Odstranění uživatele pro adresáře chráněné heslem';
?>
......@@ -25,9 +25,9 @@ $wb['Getmail'] = 'Getmail';
$wb['Web'] = 'Web';
$wb['FastCGI'] = 'FastCGI';
$wb['Jailkit'] = 'Jailkit';
$wb['Rescue'] = 'Monitorování';
$wb['Rescue'] = 'Zachrána';
$wb['Server IP addresses'] = 'IP adresy serveru';
$wb['Additional PHP Versions'] = 'Další PHP verze';
$wb['Additional PHP Versions'] = 'Další verze PHP';
$wb['Firewall'] = 'Firewall';
$wb['Interface'] = 'Rozhraní';
$wb['Interface Config'] = 'Hlavní konfigurace';
......@@ -48,3 +48,5 @@ $wb['Do OS-Update'] = 'Aktualizovat operační systém';
$wb['Do ISPConfig-Update'] = 'Aktualizovat ISPConfig';
$wb['Directive Snippets'] = 'Directive Snippets';
?>
<?php
$wb['Directive Snippets'] = 'Directive Snippets';
$wb['name_txt'] = 'Name of Snippet';
$wb['type_txt'] = 'Type';
$wb['type_txt'] = 'Verze';
$wb['snippet_txt'] = 'Snippet';
$wb['active_txt'] = 'Aktivní';
$wb['directive_snippets_name_empty'] = 'Please specify a name for the snippet.';
$wb['directive_snippets_name_error_unique'] = 'There is already a directive snippet with this name.';
?>
......@@ -2,6 +2,8 @@
$wb['list_head_txt'] = 'Directive Snippets';
$wb['active_txt'] = 'Aktivní';
$wb['name_txt'] = 'Name of Snippet';
$wb['type_txt'] = 'Type';
$wb['type_txt'] = 'Verze';
$wb['add_new_record_txt'] = 'Add Directive Snippet';
?>
......@@ -9,3 +9,5 @@ $wb['firewall_error_unique'] = 'Pro tento server již existuje záznam firewallu
$wb['tcp_ports_error_regex'] = 'Znak není povole v definici TCP portu. Povolené symboly jsou čísla, : a ,.';
$wb['udp_ports_error_regex'] = 'Znak není povole v definici UDP portu. Povolené symboly jsou čísla, : a ,.';
?>
......@@ -6,3 +6,5 @@ $wb['tcp_port_txt'] = 'Otevřené TCP porty';
$wb['udp_port_txt'] = 'Otevřené UDP porty';
$wb['add_new_record_txt'] = 'Přidat záznam';
?>
......@@ -3,3 +3,5 @@ $wb['description_txt'] = 'Popis';
$wb['name_txt'] = 'Skupina';
$wb['name_err'] = 'Skupina musí mít min. 1, max. 30 znaků.';
?>
......@@ -5,3 +5,5 @@ $wb['name_txt'] = 'Skupina';
$wb['add_new_record_txt'] = 'Přidat skupinu';
$wb['warning_txt'] = '<b>VAROVÁNÍ:</b> Zde neupravujte uživatelská nastavení. Užijte klientská a distributorská nastavení v klientském modulu. Úprava uživatelý nebo skupin zde může způsobit ztrátu dat!';
?>
......@@ -4,10 +4,12 @@ $wb['multiport_txt'] = 'Multi Port';
$wb['singleport_txt'] = 'Single Port';
$wb['protocol_txt'] = 'Protocol';
$wb['table_txt'] = 'Table';
$wb['target_txt'] = 'Target';
$wb['target_txt'] = 'Cíl';
$wb['state_txt'] = 'State';
$wb['destination_ip_txt'] = 'Destination Address';
$wb['source_ip_txt'] = 'Source Address';
$wb['active_txt'] = 'Aktivní';
$wb['iptables_error_unique'] = 'There is already a firewall record for this server.';
?>
......@@ -6,10 +6,12 @@ $wb['multiport_txt'] = 'Multi Port';
$wb['singleport_txt'] = 'Single Port';
$wb['protocol_txt'] = 'Protocol';
$wb['table_txt'] = 'Table';
$wb['target_txt'] = 'Target';
$wb['target_txt'] = 'Cíl';
$wb['state_txt'] = 'State';
$wb['destination_ip_txt'] = 'Destination Address';
$wb['source_ip_txt'] = 'Source Address';
$wb['active_txt'] = 'Aktivní';
$wb['iptables_error_unique'] = 'There is already a firewall record for this server.';
?>
......@@ -6,3 +6,5 @@ $wb['language_new_hint_txt'] = '2 znakové ISO 639-1 jazykové kódy (Viz: http:
$wb['btn_save_txt'] = 'Vytvořit novou jazykovou sadu souborů';
$wb['btn_cancel_txt'] = 'Zpět';
?>
<?php
$wb['list_head_txt'] = 'Sloučit jazykový soubor';
$wb['list_desc_txt'] = 'Sloučit vybraný jazykový soubor s hlavním anglickým jazykovým souborem. <br />Toto přidá chybějící řetězce z anglického hlavního souboru do vybraného jazykového souboru. Odebere také zrušené řetezce. <br /> V nových verzích ISPConfigu vznikají nové moduly a položky, které chybějí ve starších jazykových souborech a takto je doplníte k překladu.';
$wb['list_desc_txt'] = 'Sloučit vybraný jazykový soubor s hlavním anglickým jazykovým souborem. <br />Toto přidá chybějící řetězce z anglického hlavního souboru do vybraného jazykového souboru. <br /> V nových verzích ISPConfigu vznikají nové moduly a položky, které chybějí ve starších jazykových souborech a takto je doplníte k překladu.';
$wb['language_select_txt'] = 'Vybrat jazyk k doplnění';
$wb['btn_save_txt'] = 'Sloučit / doplnit jazykový soubor';
$wb['btn_cancel_txt'] = 'Zpět';
?>
......@@ -6,3 +6,5 @@ $wb['lang_file_txt'] = 'Jazykový soubor';
$wb['btn_save_txt'] = 'Uložit';
$wb['btn_cancel_txt'] = 'Zpět';
?>
......@@ -4,3 +4,5 @@ $wb['language_select_txt'] = 'Vybrat jazykovou sadu';
$wb['btn_save_txt'] = 'Uložit vybranou jazykovou sadu do souboru';
$wb['btn_cancel_txt'] = 'Zpět';
?>
......@@ -6,3 +6,5 @@ $wb['language_overwrite_txt'] = 'Přepsat soubor, pokud existuje.';
$wb['btn_cancel_txt'] = 'Zpět';
$wb['ignore_version_txt'] = 'Přeskočit kontrolu verze ISPConfigu.';
?>
......@@ -5,3 +5,5 @@ $wb['module_txt'] = 'Modul';
$wb['lang_file_txt'] = 'Jazykový soubor';
$wb['lang_file_date_txt'] = 'Poslední úprava';
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment