if (!dbm::is_result($result)) {
print_update_error($db, $sql);
}
if (!dbm::is_result($result)) {
print_update_error($db, $sql);
}
$email_tpl = get_intltext_template("update_fail_eml.tpl");
$email_msg = replace_macros($email_tpl, array(
'$sitename' => $a->config['sitename'],
$email_tpl = get_intltext_template("update_fail_eml.tpl");
$email_msg = replace_macros($email_tpl, array(
'$sitename' => $a->config['sitename'],
// On utf8mb4 a varchar index can only have a length of 191
// The "show index" command sometimes returns this value although this value wasn't added manually.
// Because we don't want to add this number to every index, we ignore bigger numbers
// On utf8mb4 a varchar index can only have a length of 191
// The "show index" command sometimes returns this value although this value wasn't added manually.
// Because we don't want to add this number to every index, we ignore bigger numbers
$field_definition = $database[$name]["fields"][$fieldname];
// Define the default collation if not given
$field_definition = $database[$name]["fields"][$fieldname];
// Define the default collation if not given
if ($field_definition['Collation'] != $parameters['Collation']) {
$sql2 = db_modify_table_field($fieldname, $parameters);
if ($field_definition['Collation'] != $parameters['Collation']) {
$sql2 = db_modify_table_field($fieldname, $parameters);
$primary_keys = array();
foreach ($fields AS $fieldname => $field) {
$sql_rows[] = "`".dbesc($fieldname)."` ".db_field_command($field);
$primary_keys = array();
foreach ($fields AS $fieldname => $field) {
$sql_rows[] = "`".dbesc($fieldname)."` ".db_field_command($field);
"created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE),
"pid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
"executed" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE),
"created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE),
"pid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
"executed" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE),
),
"indexes" => array(
"PRIMARY" => array("id"),
"pid" => array("pid"),
"parameter" => array("parameter(64)"),
"priority_created" => array("priority", "created"),
),
"indexes" => array(
"PRIMARY" => array("id"),
"pid" => array("pid"),
"parameter" => array("parameter(64)"),
"priority_created" => array("priority", "created"),
$db = new dba($db_host, $db_user, $db_pass, $db_data);
$db = new dba($db_host, $db_user, $db_pass, $db_data);
- unset($db_host, $db_user, $db_pass, $db_data);
+ unset($db_host, $db_user, $db_pass, $db_data);