~ubuntu-fr/ubuntu-fr-website/www.dev

« back to all changes in this revision

Viewing changes to sites/all/modules/pathauto/pathauto.module

  • Committer: Vincent Liefooghe
  • Date: 2010-11-16 20:51:54 UTC
  • Revision ID: vl@ubuntovo-20101116205154-fuyfka524rm2zgni
Mise à jour des modules Backup & Migrate, Image API, Token et Pathauto

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: pathauto.module,v 1.118.2.29 2010/08/11 19:38:26 davereid Exp $
 
2
// $Id: pathauto.module,v 1.118.2.30 2010/09/27 15:52:58 greggles Exp $
3
3
 
4
4
/**
5
5
 * @defgroup pathauto Pathauto: Automatically generates aliases for content
166
166
        $parents = taxonomy_get_parents_all($object->tid);
167
167
        $catpath = $catpath_raw = array();
168
168
        foreach ($parents as $parent) {
169
 
          $term_name_cleaned = pathauto_cleanstring($parent->name);
170
 
          array_unshift($catpath, check_plain($term_name_cleaned));
171
 
          array_unshift($catpath_raw, $term_name_cleaned);
 
169
          array_unshift($catpath, check_plain($parent->name));
 
170
          array_unshift($catpath_raw, $parent->name);
172
171
        }
173
 
        $values[$label . 'path'] = implode('/', $catpath);
174
 
        $values[$label . 'path-raw'] = implode('/', $catpath_raw);
 
172
        $values[$label . 'path'] = !empty($options['pathauto']) ? $catpath : implode('/', $catpath);
 
173
        $values[$label . 'path-raw'] = !empty($options['pathauto']) ? $catpath_raw : implode('/', $catpath_raw);
175
174
 
176
175
        // Token [catalias-raw] and [catalias].
177
176
        $values[$label . 'alias-raw'] = drupal_get_path_alias(taxonomy_term_path($object));