Dotclear

Changeset 2649


Ignore:
Timestamp:
09/20/10 17:32:14 (13 years ago)
Author:
JcDenis
Message:

tweakURLs 0.8.1

  • Quick fixed category parent bug
  • Added bug on category having chidren (not change urls of children)
Location:
plugins/tweakurls
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/tweakurls/_admin.php

    r2641 r2649  
    7878     } 
    7979 
    80      public static function adminAfterCategorySave ($cur,$id=null) 
     80     public static function adminAfterCategorySave ($cur,$id) 
    8181     { 
    8282          global $core; 
     
    8787          if (isset($_POST['cat_url'])||empty($_REQUEST['id'])) 
    8888          { 
    89                $cur->cat_url = tweakUrls::tweakBlogURL($cur->cat_url,$caturltransform); 
    90                $core->blog->updCategory($id,$cur); 
     89               // if it is a sub-category, change only last part of its url 
     90               $urls = explode('/',$cur->cat_url); 
     91               $cat_url = array_pop($urls); 
     92               $urls[] = tweakUrls::tweakBlogURL($cat_url,$caturltransform); 
     93               $urls = implode('/',$urls); 
     94                
     95               $new_cur = $core->con->openCursor($core->prefix.'category'); 
     96               $new_cur->cat_url = $urls; 
     97               $new_cur->update('WHERE cat_id = '.$id); 
     98                
     99               // todo: check children urls 
    91100          } 
    92101     } 
  • plugins/tweakurls/_define.php

    r2641 r2649  
    2121     /* Description*/         "Tweaks you posts URLs", 
    2222     /* Author */             "xave", 
    23      /* Version */            '0.8', 
     23     /* Version */            '0.8.1', 
    2424     /* Permissions */        'admin' 
    2525); 
  • plugins/tweakurls/release.txt

    r2641 r2649  
     10.8.1 
     2 * Quick fixed category parent bug 
     3 * Added bug on category having chidren (not change urls of children) 
     4 
    150.8 20100911 
    26 * Added static class to share tweakurls functions 
Note: See TracChangeset for help on using the changeset viewer.

Sites map