summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/locale.inc4
-rw-r--r--modules/book/book.module3
-rw-r--r--modules/forum/forum.module6
-rw-r--r--modules/system/system.install4
-rw-r--r--modules/taxonomy/taxonomy.admin.inc2
-rw-r--r--modules/taxonomy/taxonomy.pages.inc4
6 files changed, 14 insertions, 9 deletions
diff --git a/includes/locale.inc b/includes/locale.inc
index 31b9769f2..2ca8636a2 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -603,14 +603,14 @@ function locale_translate_import_form() {
if (!count($names)) {
$languages = _locale_prepare_predefined_list();
- $default = array_shift(array_keys($languages));
+ $default = key($languages);
}
else {
$languages = array(
t('Already added languages') => $names,
t('Languages not yet added') => _locale_prepare_predefined_list()
);
- $default = array_shift(array_keys($names));
+ $default = key($names);
}
$form = array();
diff --git a/modules/book/book.module b/modules/book/book.module
index b5790ce4a..835d214bc 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -625,7 +625,8 @@ function book_prev($book_link) {
// The previous page in the book may be a child of the previous visible link.
if ($prev['depth'] == $book_link['depth'] && $prev['has_children']) {
// The subtree will have only one link at the top level - get its data.
- $data = array_shift(book_menu_subtree_data($prev));
+ $tree = book_menu_subtree_data($prev);
+ $data = array_shift($tree);
// The link of interest is the last child - iterate to find the deepest one.
while ($data['below']) {
$data = end($data['below']);
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 9f9d2d7a2..13ccfda3d 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -227,8 +227,10 @@ function forum_nodeapi_prepare($node) {
if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
if (empty($node->nid)) {
// New topic
- $node->taxonomy[arg(3)]->vid = $vid;
- $node->taxonomy[arg(3)]->tid = arg(3);
+ $node->taxonomy[arg(3)] = (object) array(
+ 'vid' => $vid,
+ 'tid' => arg(3),
+ );
}
}
}
diff --git a/modules/system/system.install b/modules/system/system.install
index 704f57dfa..0e9d8e4d7 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -1336,7 +1336,7 @@ function system_update_6001() {
db_add_primary_key($ret, 'term_node', array('vid', 'tid', 'nid'));
db_add_index($ret, 'term_node', 'vid', array('vid'));
- db_query('UPDATE {term_node} t SET vid = (SELECT vid FROM {node} n WHERE t.nid = n.nid)');
+ db_query('UPDATE {term_node} SET vid = (SELECT vid FROM {node} n WHERE {term_node}.nid = n.nid)');
return $ret;
}
@@ -3014,7 +3014,7 @@ function system_update_7008() {
// Add chid column and convert existing votes.
db_add_field($ret, 'poll_votes', 'chid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
db_add_index($ret, 'poll_votes', 'chid', array('chid'));
- $ret[] = update_sql("UPDATE {poll_votes} v SET chid = (SELECT chid FROM {poll_choices} c WHERE v.chorder = c.chorder AND v.nid = c.nid)");
+ $ret[] = update_sql("UPDATE {poll_votes} SET chid = (SELECT chid FROM {poll_choices} c WHERE {poll_votes}.chorder = c.chorder AND {poll_votes}.nid = c.nid)");
// Remove old chorder column.
db_drop_field($ret, 'poll_votes', 'chorder');
}
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 938a32609..10f3f74c6 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -909,7 +909,7 @@ function taxonomy_vocabulary_confirm_reset_alphabetical(&$form_state, $vid) {
* @see taxonomy_vocabulary_confirm_reset_alphabetical()
*/
function taxonomy_vocabulary_confirm_reset_alphabetical_submit($form, &$form_state) {
- db_query('UPDATE {term_data} t SET weight = 0 WHERE vid = :vid', array(':vid' => $form_state['values']['vid']));
+ db_query('UPDATE {term_data} SET weight = 0 WHERE vid = :vid', array(':vid' => $form_state['values']['vid']));
drupal_set_message(t('Reset vocabulary %name to alphabetical order.', array('%name' => $form_state['values']['name'])));
watchdog('taxonomy', 'Reset vocabulary %name to alphabetical order.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/content/taxonomy/' . $form_state['values']['vid'];
diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc
index e72c8a207..402fa2c77 100644
--- a/modules/taxonomy/taxonomy.pages.inc
+++ b/modules/taxonomy/taxonomy.pages.inc
@@ -31,7 +31,9 @@ function taxonomy_term_page($terms, $depth = 0, $op = 'page') {
switch ($op) {
case 'page':
// Build breadcrumb based on first hierarchy of first term:
- $current->tid = $tids[0];
+ $current = (object) array(
+ 'tid' => $tids[0],
+ );
$breadcrumb = array();
while ($parents = taxonomy_get_parents($current->tid)) {
$current = array_shift($parents);