summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-05-06 05:59:31 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-05-06 05:59:31 +0000
commited86172814c02747b7036745f0411e34998c6f4a (patch)
tree6246e7451a458ec832aefa9404675709e78e982a /modules/taxonomy
parent526558401680f5d8b402823dbd5d40fd17620980 (diff)
downloadbrdo-ed86172814c02747b7036745f0411e34998c6f4a.tar.gz
brdo-ed86172814c02747b7036745f0411e34998c6f4a.tar.bz2
#331951 by aspilicious, sun, jhodgdon, Morbus, et al: Figure out and apply coding standard for casting.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.admin.inc16
-rw-r--r--modules/taxonomy/taxonomy.module4
2 files changed, 10 insertions, 10 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index e1dfdec2f..4ae0e5182 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -101,7 +101,7 @@ function theme_taxonomy_overview_vocabularies($variables) {
*/
function taxonomy_form_vocabulary($form, &$form_state, $edit = array()) {
if (!is_array($edit)) {
- $edit = (array)$edit;
+ $edit = (array) $edit;
}
$edit += array(
'name' => '',
@@ -352,7 +352,7 @@ function taxonomy_overview_terms($form, &$form_state, $vocabulary) {
// Build the actual form.
foreach ($current_page as $key => $term) {
// Save the term for the current page so we don't have to load it a second time.
- $form[$key]['#term'] = (array)$term;
+ $form[$key]['#term'] = (array) $term;
if (isset($term->parents)) {
$form[$key]['#term']['parent'] = $term->parent = $term->parents[0];
unset($form[$key]['#term']['parents'], $term->parents);
@@ -444,7 +444,7 @@ function taxonomy_overview_terms_submit($form, &$form_state) {
// Build a list of all terms that need to be updated on previous pages.
$weight = 0;
- $term = (array)$tree[0];
+ $term = (array) $tree[0];
while ($term['tid'] != $form['#first_tid']) {
if ($term['parents'][0] == 0 && $term['weight'] != $weight) {
$term['parent'] = $term['parents'][0];
@@ -453,7 +453,7 @@ function taxonomy_overview_terms_submit($form, &$form_state) {
}
$weight++;
$hierarchy = $term['parents'][0] != 0 ? 1 : $hierarchy;
- $term = (array)$tree[$weight];
+ $term = (array) $tree[$weight];
}
// Renumber the current page weights and assign any new parents.
@@ -486,7 +486,7 @@ function taxonomy_overview_terms_submit($form, &$form_state) {
// Build a list of all terms that need to be updated on following pages.
for ($weight; $weight < count($tree); $weight++) {
- $term = (array)$tree[$weight];
+ $term = (array) $tree[$weight];
if ($term['parents'][0] == 0 && $term['weight'] != $weight) {
$term['parent'] = $term['parents'][0];
$term['weight'] = $weight;
@@ -497,7 +497,7 @@ function taxonomy_overview_terms_submit($form, &$form_state) {
// Save all updated terms.
foreach ($changed_terms as $changed) {
- $term = (object)$changed;
+ $term = (object) $changed;
// Update term_hierachy and term_data directly since we don't have a
// fully populated term object to save.
db_update('taxonomy_term_hierarchy')
@@ -619,7 +619,7 @@ function theme_taxonomy_overview_terms($variables) {
function taxonomy_form_term($form, &$form_state, $edit = array(), $vocabulary = NULL) {
if (!isset($vocabulary) && is_object($edit)) {
$vocabulary = taxonomy_vocabulary_load($edit->vid);
- $edit = (array)$edit;
+ $edit = (array) $edit;
}
$edit += array(
'name' => '',
@@ -839,7 +839,7 @@ function taxonomy_form_term_submit_builder($form, &$form_state) {
$term = (object) $form_state['values'];
field_attach_submit('taxonomy_term', $term, $form, $form_state);
- $form_state['term'] = (array)$term;
+ $form_state['term'] = (array) $term;
$form_state['rebuild'] = TRUE;
return $term;
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index ac46898db..b61a83dd1 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -432,7 +432,7 @@ function taxonomy_check_vocabulary_hierarchy($vocabulary, $changed_term) {
foreach ($tree as $term) {
// Update the changed term with the new parent value before comparison.
if ($term->tid == $changed_term['tid']) {
- $term = (object)$changed_term;
+ $term = (object) $changed_term;
$term->parents = $term->parent;
}
// Check this term's parent count.
@@ -614,7 +614,7 @@ function template_preprocess_taxonomy_term(&$variables) {
$variables['page'] = taxonomy_term_is_page($term);
// Flatten the term object's member fields.
- $variables = array_merge((array)$term, $variables);
+ $variables = array_merge((array) $term, $variables);
// Helpful $content variable for templates.
foreach (element_children($variables['elements']) as $key) {