Dotclear


Ignore:
Timestamp:
08/16/12 14:49:40 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
sexy
Message:

Multiple DC_PLUGINS_ROOT paths support in plugin urlhandler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/public/lib.urlhandlers.php

    r877 r878  
    503503          $file = $m[2]; 
    504504          $allow_types = array('png','jpg','jpeg','gif','css','js','swf'); 
    505           $pf = DC_PLUGINS_ROOT.'/'.path::clean($p.'/public/'.$file); 
    506           if (!$GLOBALS['core']->plugins->moduleExists($p) || 
     505          $rel_file = path::clean('public/'.$file); 
     506          $paths = explode(PATH_SEPARATOR, DC_PLUGINS_ROOT); 
     507          $p_dir = ''; 
     508          foreach ($paths as $path) { 
     509               if (is_dir($path.'/'.$p)) { 
     510                    $p_dir = $path.'/'.$p; 
     511                    break; 
     512               } 
     513          } 
     514          $pf = $p_dir.'/'.$rel_file; 
     515          if ($p_dir == '' || 
     516               !$GLOBALS['core']->plugins->moduleExists($p) || 
    507517               $pf === false || !is_file($pf) || !is_readable($pf)) { 
    508518               self::p404(); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map