Dotclear


Ignore:
Timestamp:
12/18/12 17:28:20 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Disable daInstaller plugin(s) installed outside default plugin directory as it's now distributed with DC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/dbschema/upgrade.php

    r706 r1082  
    3333                
    3434               $si = new dbStruct($core->con,$core->prefix); 
    35                $changes = $si->synchronize($_s); 
     35//             $changes = $si->synchronize($_s); 
    3636                
    3737               /* Some other upgrades 
     
    305305                    $core->con->execute($strReq); 
    306306               } 
     307 
     308               if (version_compare($version,'3.5','<=')) 
     309               { 
     310                    # Try to disable daInstaller plugin if it has been installed outside the default plugins directory 
     311                    $path = explode(PATH_SEPARATOR,DC_PLUGINS_ROOT); 
     312                    $default = path::real(dirname(__FILE__).'/../../plugins/'); 
     313                    foreach ($path as $root) 
     314                    { 
     315                         if (!is_dir($root) || !is_readable($root)) { 
     316                              continue; 
     317                         } 
     318                         if (substr($root,-1) != '/') { 
     319                              $root .= '/'; 
     320                         } 
     321                         if (($p = @dir($root)) === false) { 
     322                              continue; 
     323                         } 
     324                         if(path::real($root) == $default) { 
     325                              continue; 
     326                         } 
     327                         if (($d = @dir($root.'daInstaller')) === false) { 
     328                              continue; 
     329                         } 
     330                         $f = $root.'/daInstaller/_disabled'; 
     331                         if (!file_exists($f)) 
     332                         { 
     333                              @file_put_contents($f,''); 
     334                         } 
     335                    } 
     336               } 
    307337                
    308338               $core->setVersion('core',DC_VERSION); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map