- Patch #471070 by stella: millions of code style fixes.
parent
a5f42fd007
commit
a24a6c2bba
|
|
@ -542,7 +542,7 @@ function locale_translate_overview_screen() {
|
|||
// Languages with at least one record in the locale table.
|
||||
$translations = db_query("SELECT COUNT(*) AS translation, t.language, s.textgroup FROM {locales_source} s INNER JOIN {locales_target} t ON s.lid = t.lid GROUP BY textgroup, language");
|
||||
foreach ($translations as $data) {
|
||||
$ratio = (!empty($groupsums[$data->textgroup]) && $data->translation > 0) ? round(($data->translation/$groupsums[$data->textgroup])*100., 2) : 0;
|
||||
$ratio = (!empty($groupsums[$data->textgroup]) && $data->translation > 0) ? round(($data->translation/$groupsums[$data->textgroup]) * 100.0, 2) : 0;
|
||||
$rows[$data->language][$data->textgroup] = $data->translation . '/' . $groupsums[$data->textgroup] . " ($ratio%)";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2583,8 +2583,8 @@ function system_update_6043() {
|
|||
// Change length of theme field in {blocks} to be consistent with module, and
|
||||
// to avoid a MySQL error regarding a too-long index. Also add new indices.
|
||||
db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''), array(
|
||||
'unique keys' => array('tmd' => array('theme', 'module', 'delta'),),
|
||||
'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'),),));
|
||||
'unique keys' => array('tmd' => array('theme', 'module', 'delta')),
|
||||
'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'))));
|
||||
db_add_index($ret, 'blocks_roles', 'rid', array('rid'));
|
||||
// Improve filter module indices.
|
||||
db_drop_index($ret, 'filters', 'weight');
|
||||
|
|
@ -2626,8 +2626,8 @@ function system_update_6043() {
|
|||
if (db_table_exists('profile_values')) {
|
||||
db_drop_index($ret, 'profile_values', 'uid');
|
||||
db_drop_index($ret, 'profile_values', 'fid');
|
||||
db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,), array('indexes' => array('fid' => array('fid'),)));
|
||||
db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,));
|
||||
db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), array('indexes' => array('fid' => array('fid'))));
|
||||
db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
|
||||
db_add_primary_key($ret, 'profile_values', array('uid', 'fid'));
|
||||
}
|
||||
// Alter a statistics module table to add an index.
|
||||
|
|
|
|||
Loading…
Reference in New Issue