- Removing whitespace
parent
1001b7079d
commit
d7e9371e94
|
|
@ -1518,7 +1518,7 @@ function _system_update_utf8($tables) {
|
||||||
$list = &$_SESSION['update_utf8'];
|
$list = &$_SESSION['update_utf8'];
|
||||||
|
|
||||||
$ret = update_convert_table_utf8(array_shift($list));
|
$ret = update_convert_table_utf8(array_shift($list));
|
||||||
|
|
||||||
// Are we done?
|
// Are we done?
|
||||||
if (count($list) == 0) {
|
if (count($list) == 0) {
|
||||||
unset($_SESSION['update_utf8']);
|
unset($_SESSION['update_utf8']);
|
||||||
|
|
|
||||||
|
|
@ -166,34 +166,34 @@ function forum_confirm_delete_submit($form_id, $form_values) {
|
||||||
*/
|
*/
|
||||||
function forum_form_container($edit = array()) {
|
function forum_form_container($edit = array()) {
|
||||||
$form['name'] = array(
|
$form['name'] = array(
|
||||||
'#title' => t('Container name'),
|
'#title' => t('Container name'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#default_value' => $edit['name'],
|
'#default_value' => $edit['name'],
|
||||||
'#maxlength' => 64,
|
'#maxlength' => 64,
|
||||||
'#description' => t('The container name is used to identify related forums.'),
|
'#description' => t('The container name is used to identify related forums.'),
|
||||||
'#required' => TRUE
|
'#required' => TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['description'] = array(
|
$form['description'] = array(
|
||||||
'#type' => 'textarea',
|
'#type' => 'textarea',
|
||||||
'#title' => t('Description'),
|
'#title' => t('Description'),
|
||||||
'#default_value' => $edit['description'],
|
'#default_value' => $edit['description'],
|
||||||
'#description' => t('The container description can give users more information about the forums it contains.')
|
'#description' => t('The container description can give users more information about the forums it contains.')
|
||||||
);
|
);
|
||||||
$form['parent']['#tree'] = TRUE;
|
$form['parent']['#tree'] = TRUE;
|
||||||
$form['parent'][0] = _forum_parent_select($edit['tid'], t('Parent'), 'container');
|
$form['parent'][0] = _forum_parent_select($edit['tid'], t('Parent'), 'container');
|
||||||
$form['weight'] = array(
|
$form['weight'] = array(
|
||||||
'#type' => 'weight',
|
'#type' => 'weight',
|
||||||
'#title' => t('Weight'),
|
'#title' => t('Weight'),
|
||||||
'#default_value' => $edit['weight'],
|
'#default_value' => $edit['weight'],
|
||||||
'#description' => t('When listing containers, those with with light (small) weights get listed before containers with heavier (larger) weights. Containers with equal weights are sorted alphabetically.')
|
'#description' => t('When listing containers, those with with light (small) weights get listed before containers with heavier (larger) weights. Containers with equal weights are sorted alphabetically.')
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['vid'] = array(
|
$form['vid'] = array(
|
||||||
'#type' => 'hidden',
|
'#type' => 'hidden',
|
||||||
'#value' => _forum_get_vid());
|
'#value' => _forum_get_vid());
|
||||||
$form['submit'] = array(
|
$form['submit'] = array(
|
||||||
'#type' => 'submit',
|
'#type' => 'submit',
|
||||||
'#value' => t('Submit')
|
'#value' => t('Submit')
|
||||||
);
|
);
|
||||||
if ($edit['tid']) {
|
if ($edit['tid']) {
|
||||||
|
|
|
||||||
|
|
@ -166,34 +166,34 @@ function forum_confirm_delete_submit($form_id, $form_values) {
|
||||||
*/
|
*/
|
||||||
function forum_form_container($edit = array()) {
|
function forum_form_container($edit = array()) {
|
||||||
$form['name'] = array(
|
$form['name'] = array(
|
||||||
'#title' => t('Container name'),
|
'#title' => t('Container name'),
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#default_value' => $edit['name'],
|
'#default_value' => $edit['name'],
|
||||||
'#maxlength' => 64,
|
'#maxlength' => 64,
|
||||||
'#description' => t('The container name is used to identify related forums.'),
|
'#description' => t('The container name is used to identify related forums.'),
|
||||||
'#required' => TRUE
|
'#required' => TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['description'] = array(
|
$form['description'] = array(
|
||||||
'#type' => 'textarea',
|
'#type' => 'textarea',
|
||||||
'#title' => t('Description'),
|
'#title' => t('Description'),
|
||||||
'#default_value' => $edit['description'],
|
'#default_value' => $edit['description'],
|
||||||
'#description' => t('The container description can give users more information about the forums it contains.')
|
'#description' => t('The container description can give users more information about the forums it contains.')
|
||||||
);
|
);
|
||||||
$form['parent']['#tree'] = TRUE;
|
$form['parent']['#tree'] = TRUE;
|
||||||
$form['parent'][0] = _forum_parent_select($edit['tid'], t('Parent'), 'container');
|
$form['parent'][0] = _forum_parent_select($edit['tid'], t('Parent'), 'container');
|
||||||
$form['weight'] = array(
|
$form['weight'] = array(
|
||||||
'#type' => 'weight',
|
'#type' => 'weight',
|
||||||
'#title' => t('Weight'),
|
'#title' => t('Weight'),
|
||||||
'#default_value' => $edit['weight'],
|
'#default_value' => $edit['weight'],
|
||||||
'#description' => t('When listing containers, those with with light (small) weights get listed before containers with heavier (larger) weights. Containers with equal weights are sorted alphabetically.')
|
'#description' => t('When listing containers, those with with light (small) weights get listed before containers with heavier (larger) weights. Containers with equal weights are sorted alphabetically.')
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['vid'] = array(
|
$form['vid'] = array(
|
||||||
'#type' => 'hidden',
|
'#type' => 'hidden',
|
||||||
'#value' => _forum_get_vid());
|
'#value' => _forum_get_vid());
|
||||||
$form['submit'] = array(
|
$form['submit'] = array(
|
||||||
'#type' => 'submit',
|
'#type' => 'submit',
|
||||||
'#value' => t('Submit')
|
'#value' => t('Submit')
|
||||||
);
|
);
|
||||||
if ($edit['tid']) {
|
if ($edit['tid']) {
|
||||||
|
|
|
||||||
|
|
@ -822,7 +822,7 @@ function _search_parse_query(&$word, &$scores, $not = false) {
|
||||||
* (optional) Extra SQL arguments belonging to the second query parameter.
|
* (optional) Extra SQL arguments belonging to the second query parameter.
|
||||||
*
|
*
|
||||||
* @param $sort_parameters
|
* @param $sort_parameters
|
||||||
* (optional) SQL arguments for sorting the final results.
|
* (optional) SQL arguments for sorting the final results.
|
||||||
* Default: 'ORDER BY score DESC'
|
* Default: 'ORDER BY score DESC'
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -1199,7 +1199,7 @@ function theme_search_item($item, $type) {
|
||||||
*/
|
*/
|
||||||
function theme_search_page($results, $type) {
|
function theme_search_page($results, $type) {
|
||||||
$output = '<dl class="search-results">';
|
$output = '<dl class="search-results">';
|
||||||
|
|
||||||
foreach ($results as $entry) {
|
foreach ($results as $entry) {
|
||||||
$output .= theme('search_item', $entry, $type);
|
$output .= theme('search_item', $entry, $type);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -822,7 +822,7 @@ function _search_parse_query(&$word, &$scores, $not = false) {
|
||||||
* (optional) Extra SQL arguments belonging to the second query parameter.
|
* (optional) Extra SQL arguments belonging to the second query parameter.
|
||||||
*
|
*
|
||||||
* @param $sort_parameters
|
* @param $sort_parameters
|
||||||
* (optional) SQL arguments for sorting the final results.
|
* (optional) SQL arguments for sorting the final results.
|
||||||
* Default: 'ORDER BY score DESC'
|
* Default: 'ORDER BY score DESC'
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -1199,7 +1199,7 @@ function theme_search_item($item, $type) {
|
||||||
*/
|
*/
|
||||||
function theme_search_page($results, $type) {
|
function theme_search_page($results, $type) {
|
||||||
$output = '<dl class="search-results">';
|
$output = '<dl class="search-results">';
|
||||||
|
|
||||||
foreach ($results as $entry) {
|
foreach ($results as $entry) {
|
||||||
$output .= theme('search_item', $entry, $type);
|
$output .= theme('search_item', $entry, $type);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -476,7 +476,7 @@ function update_finished_page($success) {
|
||||||
$links[] = '<a href="'. base_path() .'?q=admin">administration pages</a>';
|
$links[] = '<a href="'. base_path() .'?q=admin">administration pages</a>';
|
||||||
|
|
||||||
if ($success) {
|
if ($success) {
|
||||||
$output = '<p>Updates were attempted. If you see no failures below, you may proceed happily to the <a href="index.php?q=admin">administration pages</a>. Otherwise, you may need to update your database manually. All errors have been <a href="index.php?q=admin/logs">logged</a>.</p>';
|
$output = '<p>Updates were attempted. If you see no failures below, you may proceed happily to the <a href="index.php?q=admin">administration pages</a>. Otherwise, you may need to update your database manually. All errors have been <a href="index.php?q=admin/logs">logged</a>.</p>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$output = '<p class="error">The update process did not complete. All errors have been <a href="index.php?q=admin/logs">logged</a>. You may need to check the <code>watchdog</code> table manually.';
|
$output = '<p class="error">The update process did not complete. All errors have been <a href="index.php?q=admin/logs">logged</a>. You may need to check the <code>watchdog</code> table manually.';
|
||||||
|
|
@ -582,7 +582,7 @@ function update_fix_access_table() {
|
||||||
// Convert access table to UTF-8 if needed.
|
// Convert access table to UTF-8 if needed.
|
||||||
$result = db_fetch_array(db_query('SHOW CREATE TABLE `access`'));
|
$result = db_fetch_array(db_query('SHOW CREATE TABLE `access`'));
|
||||||
if (!preg_match('/utf8/i', array_pop($result))) {
|
if (!preg_match('/utf8/i', array_pop($result))) {
|
||||||
update_convert_table_utf8('access');
|
update_convert_table_utf8('access');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't run again
|
// Don't run again
|
||||||
|
|
@ -633,7 +633,7 @@ function update_convert_table_utf8($table) {
|
||||||
// Convert binary columns to UTF-8
|
// Convert binary columns to UTF-8
|
||||||
$ret[] = update_sql('ALTER TABLE {'. $table .'} '. implode(', ', $convert_to_utf8));
|
$ret[] = update_sql('ALTER TABLE {'. $table .'} '. implode(', ', $convert_to_utf8));
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some unavoidable errors happen because the database is not yet up to date.
|
// Some unavoidable errors happen because the database is not yet up to date.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue