Conjunto de cambios 49072ea en sipes para modules_contrib/pathauto/pathauto.install


Ignorar:
Fecha y hora:
26/05/2016 18:10:02 (hace 8 años)
Autor:
José Gregorio Puentes <jpuentes@…>
Branches:
stable, version-3.0
Children:
2efe680
Parents:
cd414e9
Mensaje:

se actualizo el modulo

Fichero:
1 editado

Leyenda

No modificado
Añadido
Eliminado
  • modules_contrib/pathauto/pathauto.install

    r177a560 r49072ea  
    11<?php
    2 // $Id: pathauto.install,v 1.13.2.1 2009/10/17 17:37:27 greggles Exp $
    32
    43/**
     
    109
    1110/**
    12  * Implementation of hook_install().
     11 * Implements hook_install().
    1312 */
    1413function pathauto_install() {
    15   // Check to see if taxonomy module is enabled before we set those variables
    16   if (module_exists('taxonomy')) {
    17     variable_set('pathauto_modulelist', array('node', 'user', 'taxonomy'));
    18     variable_set('pathauto_taxonomy_supportsfeeds', '0/feed');
    19     variable_set('pathauto_taxonomy_pattern', 'category/[vocab-raw]/[catpath-raw]');
    20     variable_set('pathauto_taxonomy_bulkupdate', FALSE);
    21     variable_set('pathauto_taxonomy_applytofeeds', FALSE);
    22     variable_set('pathauto_taxonomy_2_pattern', '');
    23     variable_set('pathauto_taxonomy_1_pattern', '');
    24   }
    25   else {
    26     // Node and user are required so we don't have to check
    27     variable_set('pathauto_modulelist', array('node', 'user'));
    28   }
    29   // Set the rest of the pathauto default variables
    30   variable_set('pathauto_ignore_words', 'a,an,as,at,before,but,by,for,from,is,in,into,like,of,off,on,onto,per,since,than,the,this,that,to,up,via,with');
    31   variable_set('pathauto_indexaliases', FALSE);
    32   variable_set('pathauto_indexaliases_bulkupdate', FALSE);
    33   variable_set('pathauto_max_component_length', '100');
    34   variable_set('pathauto_max_length', '100');
    35   variable_set('pathauto_node_bulkupdate', FALSE);
    36   variable_set('pathauto_node_forum_pattern', '');
    37   variable_set('pathauto_node_image_pattern', '');
    38   variable_set('pathauto_node_page_pattern', '');
     14  // Set some default variables necessary for the module to perform.
    3915  variable_set('pathauto_node_pattern', 'content/[title-raw]');
    40   variable_set('pathauto_node_story_pattern', '');
    41   variable_set('pathauto_punctuation_quotes', 0);
    42   variable_set('pathauto_separator', '-');
    43   variable_set('pathauto_update_action', '2');
    44   variable_set('pathauto_user_bulkupdate', FALSE);
     16  variable_set('pathauto_taxonomy_pattern', '[vocab-raw]/[catpath-raw]');
     17  variable_set('pathauto_forum_pattern', '[vocab-raw]/[catpath-raw]');
    4518  variable_set('pathauto_user_pattern', 'users/[user-raw]');
    46   variable_set('pathauto_user_supportsfeeds', NULL);
    47   variable_set('pathauto_verbose', FALSE);
    48   variable_set('pathauto_node_applytofeeds', '');
     19  variable_set('pathauto_blog_pattern', 'blogs/[user-raw]');
    4920
    50   // Make sure we "replace hyphen with separator" by default
    51   variable_set('pathauto_punctuation_hyphen', 1); // 1 is replace
     21  // Set the default separator character to replace instead of remove (default).
     22  variable_set('pathauto_punctuation_hyphen', 1);
    5223
    5324  // Set the weight to 1
    54   db_query("UPDATE {system} SET weight = 1 WHERE name = 'pathauto'");
    55 
    56   // Clear the cache to get these to take effect.
    57   cache_clear_all();
     25  db_query("UPDATE {system} SET weight = 1 WHERE type = 'module' AND name = 'pathauto'");
    5826}
    5927
    6028/**
    61  * Implementation of hook_uninstall().
     29 * Implements hook_uninstall().
    6230 */
    6331function pathauto_uninstall() {
     
    7240function pathauto_update_1() {
    7341  $ret = array();
    74   $ret[] = update_sql("UPDATE {system} SET weight = 1 WHERE name = 'pathauto'");
     42  $ret[] = update_sql("UPDATE {system} SET weight = 1 WHERE type = 'module' AND name = 'pathauto'");
    7543  return $ret;
    7644}
     
    10977  return $ret;
    11078}
     79
     80/**
     81 * Remove the unsupported user/%/contact and user/%/tracker pattern variables.
     82 */
     83function pathauto_update_6200() {
     84  variable_del('pathauto_contact_bulkupdate');
     85  variable_del('pathauto_contact_pattern');
     86  variable_del('pathauto_contact_supportsfeeds');
     87  variable_del('pathauto_contact_applytofeeds');
     88  variable_del('pathauto_tracker_bulkupdate');
     89  variable_del('pathauto_tracker_pattern');
     90  variable_del('pathauto_tracker_supportsfeeds');
     91  variable_del('pathauto_tracker_applytofeeds');
     92  return array();
     93}
     94
     95/**
     96 * Remove obsolete variables since batch API is now used.
     97 */
     98function pathauto_update_6201() {
     99  variable_del('pathauto_max_bulk_update');
     100  variable_del('pathauto_node_bulkupdate');
     101  variable_del('pathauto_taxonomy_bulkupdate');
     102  variable_del('pathauto_forum_bulkupdate');
     103  variable_del('pathauto_user_bulkupdate');
     104  variable_del('pathauto_blog_bulkupdate');
     105  variable_del('pathauto_modulelist');
     106  variable_del('pathauto_indexaliases');
     107  variable_del('pathauto_indexaliases_bulkupdate');
     108  return array();
     109}
     110
     111/**
     112 * Remove obsolete variables for removed feed handling.
     113 */
     114function pathauto_update_6202() {
     115  variable_del('pathauto_node_supportsfeeds');
     116  variable_del('pathauto_node_applytofeeds');
     117  variable_del('pathauto_taxonomy_supportsfeeds');
     118  variable_del('pathauto_taxonomy_applytofeeds');
     119  variable_del('pathauto_forum_supportsfeeds');
     120  variable_del('pathauto_forum_applytofeeds');
     121  variable_del('pathauto_user_supportsfeeds');
     122  variable_del('pathauto_user_applytofeeds');
     123  variable_del('pathauto_blog_supportsfeeds');
     124  variable_del('pathauto_blog_applytofeeds');
     125  return array();
     126}
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.