Dotclear

Changeset 2298


Ignore:
Timestamp:
06/05/10 23:59:16 (14 years ago)
Author:
JcDenis
Message:

pacKman 0.5

  • Switched to DC 2.2
  • Changed admin interface (easy, light, fast)
  • Added direct download button on repository (closes #449)
Location:
plugins/pacKman
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • plugins/pacKman/_admin.php

    r1570 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1919     'index.php?pf=pacKman/icon.png', 
    2020     preg_match('/plugin.php\?p=pacKman(&.*)?$/',$_SERVER['REQUEST_URI']), 
    21      $core->auth->isSuperAdmin()); 
     21     $core->auth->isSuperAdmin() 
     22); 
    2223 
    2324# Plugins tab 
    24 if ($core->blog->settings->packman_menu_plugins && $core->auth->isSuperAdmin()) 
     25if ($core->blog->settings->pacKman->packman_menu_plugins && $core->auth->isSuperAdmin()) 
     26{ 
    2527     $core->addBehavior('pluginsToolsTabs','packmanPluginsToolsTabs'); 
    26  
     28} 
    2729function packmanPluginsToolsTabs($core) 
    2830{ 
  • plugins/pacKman/_define.php

    r1570 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1717     /* Description*/         "Manage your Dotclear packages", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '0.4', 
     19     /* Version */            '0.5', 
    2020     /* Permissions */        null 
    2121); 
    22      /* date */          #20091010 
     22     /* date */          #20100605 
    2323?> 
  • plugins/pacKman/_install.php

    r1570 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    2020try 
    2121{ 
    22      if (!version_compare(DC_VERSION,'2.1.5','>=')) 
     22     if (version_compare(DC_VERSION,'2.2-beta','<')) 
    2323     { 
    24           throw new Exception('pacKman plugin requires Dotclear 2.1.5'); 
     24          throw new Exception('pacKman requires Dotclear 2.2'); 
    2525     } 
    26      $s =& $core->blog->settings; 
    27      $s->setNameSpace('pacKman'); 
    28      $s->put('packman_menu_plugins',false,'boolean','Add link to pacKman in plugins page',false,true); 
    29      $s->put('packman_pack_overwrite',false,'boolean','Overwrite existing package',false,true); 
    30      $s->put('packman_pack_filename','%type%-%id%','string','Name of package',false,true); 
    31      $s->put('packman_secondpack_filename','%type%-%id%-%version%','string','Name of second package',false,true); 
    32      $s->put('packman_pack_repository','','string','Path to package repository',false,true); 
    33      $s->put('packman_pack_excludefiles','*.zip,*.tar,*.tar.gz','string','Extra files to exclude from package',false,true); 
    34      $s->setNameSpace('system'); 
    35  
    36      $core->setVersion('pacKman',$core->plugins->moduleInfo('pacKman','version')); 
    37  
     26      
     27     $core->blog->settings->addNamespace('pacKman'); 
     28     $core->blog->settings->pacKman->put('packman_menu_plugins',false,'boolean','Add link to pacKman in plugins page',false,true); 
     29     $core->blog->settings->pacKman->put('packman_pack_overwrite',false,'boolean','Overwrite existing package',false,true); 
     30     $core->blog->settings->pacKman->put('packman_pack_filename','%type%-%id%','string','Name of package',false,true); 
     31     $core->blog->settings->pacKman->put('packman_secondpack_filename','%type%-%id%-%version%','string','Name of second package',false,true); 
     32     $core->blog->settings->pacKman->put('packman_pack_repository','','string','Path to package repository',false,true); 
     33     $core->blog->settings->pacKman->put('packman_pack_excludefiles','*.zip,*.tar,*.tar.gz,.directory','string','Extra files to exclude from package',false,true); 
     34      
     35     $core->setVersion('pacKman',$new_version); 
     36      
    3837     return true; 
    3938} 
  • plugins/pacKman/_prepend.php

    r1570 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/pacKman/_uninstall.php

    r1570 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    3939     /* action */ 'delete_all', 
    4040     /* ns */ 'packman', 
    41      /* description */ __('delete all pacKman settings') 
     41     /* description */ sprintf(__('delete all %s settings'),'pacKman') 
    4242); 
    4343 
     
    4646     /* action */ 'delete', 
    4747     /* ns */ 'pacKman', 
    48      /* description */ __('delete pacKman plugin files') 
     48     /* description */ sprintf(__('delete %s plugin files'),'pacKman') 
    4949); 
    5050 
     
    5353     /* action */ 'delete', 
    5454     /* ns */ 'pacKman', 
    55      /* description */ __('delete pacKman version number') 
     55     /* description */ sprintf(__('delete %s version number'),'pacKman') 
    5656); 
    5757 
  • plugins/pacKman/inc/class.dc.packman.php

    r1737 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    2929     { 
    3030          $res = array(); 
    31  
     31           
    3232          $cache = self::getCache().'/'; 
    3333          if (!is_dir($root) || !is_readable($root)) return $res; 
    34  
     34           
    3535          $files = files::scanDir($root); 
    3636          $zip_files = array(); 
     
    4040               $zip_files[] = $file; 
    4141          } 
    42  
     42           
    4343          if (empty($zip_files)) return $res; 
    44  
     44           
    4545          $modules = new dcModules($core); 
    46  
     46           
    4747          $i = 0; 
    4848          foreach($zip_files AS $zip_file) 
    4949          { 
    5050               $zip = new fileUnzip($root.'/'.$zip_file); 
    51  
     51                
    5252               $zip_root_dir = $zip->getRootDir(); 
    53  
     53                
    5454               if ($zip_root_dir != false) 
    5555               { 
     
    6262                    $has_define = $zip->hasFile($define); 
    6363               } 
    64  
     64                
    6565               if (!$has_define) continue; 
    66  
     66                
    6767               $zip->unzip($define,$cache.'/_define.php'); 
    68  
     68                
    6969               $modules->requireDefine($cache,$zip_root_dir); 
    7070               $res[$i] = $modules->getModules($zip_root_dir); 
    7171               $res[$i]['id'] = $zip_root_dir; 
    7272               $res[$i]['root'] = $root.'/'.$zip_file; 
    73  
     73                
    7474               unlink($cache.'_define.php'); 
    7575               $i++; 
     
    7777          return $res; 
    7878     } 
    79  
     79      
    8080     public static function pack($info,$root,$files,$overwrite=false,$exclude=array()) 
    8181     { 
     
    8383          if (!($root = self::getRoot($root))) return false; 
    8484          $exclude = self::getExclude($exclude); 
    85  
     85           
    8686          foreach($files as $file) 
    8787          { 
    8888               if (!($file = self::getFile($file,$info))) continue; 
    8989               if (!($dest = self::getOverwrite($overwrite,$root,$file))) continue; 
    90  
     90                
    9191               @set_time_limit(300); 
    9292               $fp = fopen($dest,'wb'); 
    9393               $zip = new fileZip($fp); 
    94  
     94                
    9595               foreach($exclude AS $e) 
    9696               { 
     
    9898               } 
    9999               $zip->addDirectory(path::real($info['root']),$info['id'],true); 
    100  
     100                
    101101               $zip->write(); 
    102102               $zip->close(); 
     
    105105          return true; 
    106106     } 
    107  
     107      
    108108     private function getRoot($root) 
    109109     { 
     
    116116          return $root; 
    117117     } 
    118  
     118      
    119119     private function getInfo($info) 
    120120     { 
     
    126126          return $info; 
    127127     } 
    128  
     128      
    129129     private function getExclude($exclude) 
    130130     { 
     
    132132          return self::quote_exclude($exclude); 
    133133     } 
    134  
     134      
    135135     private function getFile($file,$info) 
    136136     { 
    137137          if (empty($file) || empty($info)) return null; 
    138  
     138           
    139139          $file = str_replace( 
    140140               array( 
     
    161161          return implode('/',$parts).'.zip'; 
    162162     } 
    163  
     163      
    164164     private function getOverwrite($overwrite,$root,$file) 
    165165     { 
     
    173173          return $path; 
    174174     } 
    175  
     175      
    176176     private static function getCache() 
    177177     { 
     
    189189     } 
    190190} 
    191  
    192191?> 
  • plugins/pacKman/inc/lib.packman.php

    r1570 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    2424     } 
    2525 
    26      public static function tab($modules,$type=null,$redir=null) 
     26     public static function tab($modules,$type=null,$redir=null,$extern=true) 
    2727     { 
    2828          $type = $type == 'themes' ? 'themes' : 'plugins'; 
    29  
    30           echo  
    31           '<div class="multi-part" id="packman-'.$type.'" title="'. 
    32           sprintf(__('Pack up %s'),__($type)).'">'; 
     29           
     30          if ($extern) 
     31          { 
     32               echo '<div class="multi-part" id="packman-'.$type.'" title="'. 
     33               sprintf(__('Pack up %s'),__($type)). 
     34               '">'; 
     35          } 
     36          else 
     37          { 
     38               echo '<div id="packman-'.$type.'">'. 
     39               '<h3>'.sprintf(__('Pack up %s'),__($type)).'</h3>'; 
     40          } 
    3341 
    3442          if (isset($_REQUEST['packupdone'])) 
     43          { 
    3544               echo '<p class="message">'.__('Package successfully created').'</p>'; 
    36  
    37           if (!empty($modules) && is_array($modules)) { 
     45          } 
     46           
     47          if (!empty($modules) && is_array($modules)) 
     48          { 
    3849               echo 
    3950               '<form action="plugin.php" method="post">'. 
     
    4556               '<th class="nowrap">'.__('Author').'</th>'. 
    4657               '</tr>'; 
    47  
    48                foreach ($modules as $id => $module) {   
     58                
     59               foreach ($modules as $id => $module) 
     60               {     
    4961                    echo 
    5062                    '<tr class="line">'. 
     
    6274               '<p><input type="hidden" name="p" value="pacKman" />'. 
    6375               '<input type="hidden" name="type" value="'.$type.'" />'; 
    64  
     76                
    6577               if ($redir) 
     78               { 
    6679                    echo '<input type="hidden" name="redir" value="'.html::escapeHTML($redir).'" />'; 
    67  
     80               } 
     81                
    6882               echo 
    6983               '<input type="hidden" name="action" value="packup" />'. 
     
    7185               $GLOBALS['core']->formNonce().'</p>'. 
    7286               '</form>'; 
    73           } else 
     87          } 
     88          else 
     89          { 
    7490               echo '<p><strong>'.__('No available module').'</strong></p>'; 
    75  
     91          } 
    7692          echo '</div>'; 
    7793     } 
    78  
     94      
    7995     public static function repo($modules,$type) 
    8096     { 
    8197          if (!in_array($type,array('plugins','themes','repository'))) return; 
    8298 
    83           echo '<h2>'.sprintf(__('Package available in %s directory'),__($type)).'</h2>'; 
     99          echo '<fieldset id="repo-'.$type.'">'. 
     100          '<legend>'.sprintf(__('Package available in %s directory'),__($type)).'</legend>'; 
    84101 
    85102          if (isset($_REQUEST['deletedone']) && $_REQUEST['deletedone'] == $type) 
     103          { 
    86104               echo '<p class="message">'.__('Package successfully deleted').'</p>'; 
    87  
     105          } 
    88106          if (isset($_REQUEST['copydone']) && $_REQUEST['copydone'] == $type) 
     107          { 
    89108               echo '<p class="message">'.__('Package successfully copied').'</p>'; 
    90  
     109          } 
    91110          if (isset($_REQUEST['movedone']) && $_REQUEST['movedone'] == $type) 
     111          { 
    92112               echo '<p class="message">'.__('Package successfully moved').'</p>'; 
    93  
     113          } 
    94114          if (isset($_REQUEST['installdone']) && $_REQUEST['installdone'] == $type) 
     115          { 
    95116               echo '<p class="message">'.__('Package successfully installed').'</p>'; 
    96  
     117          } 
    97118          if (empty($modules) || !is_array($modules)) 
     119          { 
    98120               echo '<p><strong>'.__('No available module').'</strong></p>'; 
    99  
    100           else { 
     121          } 
     122          else 
     123          { 
    101124               $combo_action = array(__('delete')=>'delete'); 
    102  
     125                
    103126               if ($type == 'plugins' || $type == 'themes') 
     127               { 
    104128                    $combo_action[__('install')] = 'install'; 
    105  
    106                if ($type != 'plugins') { 
     129               } 
     130               if ($type != 'plugins') 
     131               { 
    107132                    $combo_action[sprintf(__('copy to %s directory'),__('plugins'))] = 'copy_to_plugins'; 
    108133                    $combo_action[sprintf(__('move to %s directory'),__('plugins'))] = 'move_to_plugins'; 
    109134               } 
    110                if ($type != 'themes') { 
     135               if ($type != 'themes') 
     136               { 
    111137                    $combo_action[sprintf(__('copy to %s directory'),__('themes'))] = 'copy_to_themes'; 
    112138                    $combo_action[sprintf(__('move to %s directory'),__('themes'))] = 'move_to_themes'; 
    113139               } 
    114                if ($type != 'repository') { 
     140               if ($type != 'repository') 
     141               { 
    115142                    $combo_action[sprintf(__('copy to %s directory'),__('repository'))] = 'copy_to_repository'; 
    116143                    $combo_action[sprintf(__('move to %s directory'),__('repository'))] = 'move_to_repository'; 
    117144               } 
    118  
     145                
    119146               echo  
    120147               '<form action="plugin.php" method="post">'. 
    121148               '<table class="clear"><tr>'. 
     149               '<th class="nowrap">'.__('Id').'</th>'. 
     150               '<th class="nowrap">'.__('Version').'</th>'. 
    122151               '<th class="nowrap">'.__('File').'</th>'. 
    123152               '<th class="nowrap">'.__('Name').'</th>'. 
    124                '<th class="nowrap">'.__('Version').'</th>'. 
    125                '<th class="nowrap">'.__('Id').'</th>'. 
    126153               '<th class="nowrap">'.__('Description').'</th>'. 
    127154               '<th class="nowrap">'.__('Author').'</th>'. 
    128155               '</tr>'; 
    129  
    130                foreach($modules AS $module) { 
     156                
     157               $dup = array(); 
     158               foreach($modules AS $module) 
     159               { 
     160                    if (isset($dup[$module['root']])) continue; 
     161                    $dup[$module['root']] = 1; 
     162                     
    131163                    echo 
    132164                    '<tr class="line">'. 
    133165                    '<td class="nowrap"><label class="classic" title="'. 
    134                     html::escapeHTML($module['root']). 
    135                     '">'. 
     166                    html::escapeHTML($module['root']).'">'. 
    136167                    form::checkbox(array('modules['.html::escapeHTML($module['id']).']'),$module['root']). 
    137                     basename($module['root']).'</label></td>'. 
     168                    html::escapeHTML($module['id']).'</label></td>'. 
     169                    '<td class="nowrap">'.html::escapeHTML($module['version']).'</td>'. 
     170                    '<td class="nowrap">'. 
     171                    '<a class="packman-download" href="plugin.php?p=pacKman&amp;package='.basename($module['root']).'&amp;repo='.$type.'" title="'.__('Download').'">'. 
     172                    html::escapeHTML(basename($module['root'])).'</a></td>'. 
    138173                    '<td class="nowrap">'.__(html::escapeHTML($module['name'])).'</td>'. 
    139                     '<td class="nowrap">'.html::escapeHTML($module['version']).'</td>'. 
    140                     '<td class="nowrap">'.html::escapeHTML($module['id']).'</td>'. 
    141174                    '<td class="maximal">'.html::escapeHTML($module['desc']).'</td>'. 
    142175                    '<td class="nowrap">'.html::escapeHTML($module['author']).'</td>'. 
    143176                    '</tr>'; 
    144177               } 
    145  
     178                
    146179               echo 
    147180               '</table>'. 
     
    159192               '</form>'; 
    160193          } 
     194          echo '</fieldset>'; 
    161195     } 
    162196} 
  • plugins/pacKman/index.php

    r2039 r2298  
    33# This file is part of pacKman, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009 JC Denis and contributors 
     5# Copyright (c) 2009-2010 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1717# Init vars 
    1818$p_url = 'plugin.php?p=pacKman'; 
    19 $default_tab = isset($_REQUEST['tab']) ? $_REQUEST['tab'] : 'settings'; 
     19$default_tab = isset($_REQUEST['tab']) ? $_REQUEST['tab'] : ''; 
    2020$action = isset($_POST['action']) ? $_POST['action'] : ''; 
    2121$type = isset($_POST['type']) && in_array($_POST['type'], 
     
    2323 
    2424# Settings 
    25 $s =& $core->blog->settings; 
    26 $packman_menu_plugins = $s->packman_menu_plugins; 
    27 $packman_pack_overwrite = $s->packman_pack_overwrite; 
    28 $packman_pack_filename = $s->packman_pack_filename; 
    29 $packman_secondpack_filename = $s->packman_secondpack_filename; 
    30 $packman_pack_repository = $s->packman_pack_repository; 
    31 $packman_pack_excludefiles = $s->packman_pack_excludefiles; 
     25$core->blog->settings->addNamespace('pacKman'); 
     26$packman_menu_plugins = $core->blog->settings->pacKman->packman_menu_plugins; 
     27$packman_pack_overwrite = $core->blog->settings->pacKman->packman_pack_overwrite; 
     28$packman_pack_filename = $core->blog->settings->pacKman->packman_pack_filename; 
     29$packman_secondpack_filename = $core->blog->settings->pacKman->packman_secondpack_filename; 
     30$packman_pack_repository = $core->blog->settings->pacKman->packman_pack_repository; 
     31$packman_pack_excludefiles = $core->blog->settings->pacKman->packman_pack_excludefiles; 
    3232 
    3333# Load class 
     
    4949try 
    5050{ 
     51     # Download 
     52     if (isset($_REQUEST['package']) && empty($type)) 
     53     { 
     54          $modules = array(); 
     55          if ($type == 'plugins') 
     56          { 
     57               $modules = dcPackman::getPackages($core,$plugins_path); 
     58          } 
     59          elseif ($type == 'themes') 
     60          { 
     61               $modules = dcPackman::getPackages($core,$themes_path); 
     62          } 
     63          else 
     64          { 
     65               $modules = array_merge( 
     66                    dcPackman::getPackages($core,dirname($repo_path.'/'.$packman_pack_filename)), 
     67                    dcPackman::getPackages($core,dirname($repo_path.'/'.$packman_secondpack_filename)) 
     68               ); 
     69          } 
     70          if (empty($modules)) 
     71          { 
     72               # Not found 
     73               header('Content-Type: text/plain'); 
     74               http::head(404,'Not Found'); 
     75               exit; 
     76          } 
     77          foreach($modules as $f) 
     78          { 
     79               if (preg_match('/'.preg_quote($_REQUEST['package']).'$/',$f['root']) 
     80                && is_file($f['root']) && is_readable($f['root'])) 
     81               { 
     82                     
     83                    # --BEHAVIOR-- packmanBeforeDownloadPackage 
     84                    $core->callBehavior('packmanBeforeDownloadPackage',$f,$type); 
     85                     
     86                    header('Content-Type: application/zip'); 
     87                    header('Content-Length: '.filesize($f['root'])); 
     88                    header('Content-Disposition: attachment; filename="'.basename($f['root']).'"'); 
     89                    readfile($f['root']); 
     90                     
     91                    # --BEHAVIOR-- packmanAfterDownloadPackage 
     92                    $core->callBehavior('packmanAfterDownloadPackage',$f,$type); 
     93                     
     94                    exit; 
     95               } 
     96          } 
     97          # Not found 
     98          header('Content-Type: text/plain'); 
     99          http::head(404,'Not Found'); 
     100          exit; 
     101     } 
     102      
    51103     # Reset settings 
    52104     if (isset($_POST['reset_settings'])) 
    53105     { 
    54           $s->setNamespace('pacKman'); 
    55  
    56           $s->put('packman_menu_plugins',false); 
    57           $s->put('packman_pack_overwrite',false); 
    58           $s->put('packman_pack_filename','%type%-%id%-%version%'); 
    59           $s->put('packman_secondpack_filename','%type%-%id%'); 
    60           $s->put('packman_pack_repository', 
    61                path::real(path::fullFromRoot($s->public_path,DC_ROOT))); 
    62           $s->put('packman_pack_excludefiles','*.zip,*.tar,*.tar.gz'); 
    63           $s->setNamespace('system'); 
     106          $core->blog->settings->pacKman->put('packman_menu_plugins',false); 
     107          $core->blog->settings->pacKman->put('packman_pack_overwrite',false); 
     108          $core->blog->settings->pacKman->put('packman_pack_filename','%type%-%id%-%version%'); 
     109          $core->blog->settings->pacKman->put('packman_secondpack_filename','%type%-%id%'); 
     110          $core->blog->settings->pacKman->put('packman_pack_repository', 
     111               path::real(path::fullFromRoot($core->blog->settings->system->public_path,DC_ROOT)) 
     112          ); 
     113          $core->blog->settings->pacKman->put('packman_pack_excludefiles','*.zip,*.tar,*.tar.gz'); 
    64114 
    65115          http::redirect($p_url.'&tab=settings&setupdone=1'); 
    66116     } 
    67  
     117      
    68118     # Save settings 
    69119     if (isset($_POST['save_settings'])) 
    70120     { 
    71121          if (!is_writable($_POST['packman_pack_repository'])) 
     122          { 
    72123               throw new Exception(__('Path to repository is not writable')); 
    73  
     124          } 
    74125          if (empty($_POST['packman_pack_filename'])) 
     126          { 
    75127               throw new Exception(__('You must specify the name of package to export')); 
    76  
     128          } 
    77129          if (!is_writable(dirname($_POST['packman_pack_repository'].'/'.$_POST['packman_pack_filename']))) 
     130          { 
    78131               throw new Exception(__('Path to first export package is not writable')); 
    79  
     132          } 
    80133          if (!empty($_POST['packman_secondpack_filename'])  
    81           && !is_writable(dirname($_POST['packman_pack_repository'].'/'.$_POST['packman_secondpack_filename']))) 
     134           && !is_writable(dirname($_POST['packman_pack_repository'].'/'.$_POST['packman_secondpack_filename']))) 
     135          { 
    82136               throw new Exception(__('Path to second export package is not writable')); 
    83  
     137          } 
     138           
    84139          $packman_menu_plugins = !empty($_POST['packman_menu_plugins']); 
    85140          $packman_pack_overwrite = !empty($_POST['packman_pack_overwrite']); 
     
    88143          $packman_pack_repository = path::real($_POST['packman_pack_repository']); 
    89144          $packman_pack_excludefiles = $_POST['packman_pack_excludefiles']; 
    90  
    91           $s->setNamespace('pacKman'); 
    92           $s->put('packman_menu_plugins',$packman_menu_plugins); 
    93           $s->put('packman_pack_overwrite',$packman_pack_overwrite); 
    94           $s->put('packman_pack_filename',$packman_pack_filename); 
    95           $s->put('packman_secondpack_filename',$packman_secondpack_filename); 
    96           $s->put('packman_pack_repository',$packman_pack_repository); 
    97           $s->put('packman_pack_excludefiles',$packman_pack_excludefiles); 
    98           $s->setNamespace('system'); 
    99  
     145           
     146          $core->blog->settings->pacKman->put('packman_menu_plugins',$packman_menu_plugins); 
     147          $core->blog->settings->pacKman->put('packman_pack_overwrite',$packman_pack_overwrite); 
     148          $core->blog->settings->pacKman->put('packman_pack_filename',$packman_pack_filename); 
     149          $core->blog->settings->pacKman->put('packman_secondpack_filename',$packman_secondpack_filename); 
     150          $core->blog->settings->pacKman->put('packman_pack_repository',$packman_pack_repository); 
     151          $core->blog->settings->pacKman->put('packman_pack_excludefiles',$packman_pack_excludefiles); 
     152           
    100153          http::redirect($p_url.'&tab=settings&setupdone=1'); 
    101154     } 
    102  
     155      
    103156     # Pack 
    104      if ($action == 'packup') { 
    105  
     157     if ($action == 'packup') 
     158     { 
    106159          if ($type == '' || empty($_POST['modules']) || !is_array($_POST['modules'])) 
     160          { 
    107161               throw new Exception('Nothing to pack'); 
    108  
     162          } 
     163           
    109164          $modules = array_keys($_POST['modules']); 
    110  
    111           foreach ($modules as $module) { 
    112  
     165           
     166          foreach ($modules as $module) 
     167          { 
    113168               if (!${$type}->moduleExists($module)) 
     169               { 
    114170                    throw new Exception('No such module '.$module); 
    115  
     171               } 
     172                
    116173               $info = ${$type}->getModules($module); 
    117174               $info['id'] = $module; 
    118175               $info['type'] = $type == 'themes' ? 'theme' : 'plugin'; 
    119  
     176                
    120177               $root = $packman_pack_repository; 
    121178               $files = array($packman_pack_filename,$packman_secondpack_filename); 
    122179               $overwrite = $packman_pack_overwrite; 
    123180               $exclude = explode(',',$packman_pack_excludefiles); 
    124  
    125  
     181                
    126182               # --BEHAVIOR-- packmanBeforeCreatePackage 
    127183               $core->callBehavior('packmanBeforeCreatePackage',$info,$root,$files,$overwrite,$exclude); 
    128  
    129  
     184                
    130185               dcPackman::pack($info,$root,$files,$overwrite,$exclude); 
    131  
    132  
     186                
    133187               # --BEHAVIOR-- packmanAfterCreatePackage 
    134188               $core->callBehavior('packmanAfterCreatePackage',$info,$root,$files,$overwrite,$exclude); 
    135  
    136  
    137           } 
    138  
    139           if (!empty($_POST['redir'])) { 
    140  
     189                
     190          } 
     191           
     192          if (!empty($_POST['redir'])) 
     193          { 
    141194               $redir = $_POST['redir']; 
    142  
    143                if (preg_match('!^plugins.php$!',$redir)) { 
    144  
     195                
     196               if (preg_match('!^plugins.php$!',$redir)) 
     197               { 
    145198                    $qa = array('tab' => 'packman-plugins', 'packupdone' => '1'); 
    146199                    $redir .= '?'.http_build_query($qa,'','&'); 
     
    150203          http::redirect($p_url.'&tab=packman-'.$type.'&packupdone=1'); 
    151204     } 
    152  
     205      
    153206     # Delete 
    154      if ($action == 'delete') { 
    155  
     207     if ($action == 'delete') 
     208     { 
    156209          if ($type == '' || empty($_POST['modules']) || !is_array($_POST['modules'])) 
     210          { 
    157211               throw new Exception('Nothing to delete'); 
    158  
     212          } 
    159213          if ($type == 'plugins')  
     214          { 
    160215               $proot = $plugins_path; 
    161  
     216          } 
    162217          elseif ($type == 'themes') 
     218          { 
    163219               $proot == $themes_path; 
    164  
     220          } 
    165221          else 
     222          { 
    166223               $proot == 'repository'; 
    167  
    168           foreach ($_POST['modules'] as $module => $root) { 
    169  
     224          } 
     225           
     226          foreach ($_POST['modules'] as $module => $root) 
     227          { 
    170228               if (!file_exists($root) || !files::isDeletable($root)) 
     229               { 
    171230                    throw new Exception('Undeletable file: '.$root); 
    172  
     231               } 
    173232               unlink($root); 
    174233          } 
    175234          http::redirect($p_url.'&tab=repository&deletedone='.$type); 
    176235     } 
    177  
     236      
    178237     # Install  
    179      if ($action == 'install') { 
    180  
     238     if ($action == 'install') 
     239     { 
    181240          if ($type == '' || empty($_POST['modules']) || !is_array($_POST['modules'])) 
     241          { 
    182242               throw new Exception('Nothing to install'); 
    183  
    184           foreach ($_POST['modules'] as $id => $root) { 
    185  
    186  
     243          } 
     244           
     245          foreach ($_POST['modules'] as $id => $root) 
     246          { 
     247                
    187248               # --BEHAVIOR-- packmanBeforeInstallPackage 
    188249               $core->callBehavior('packmanBeforeInstallPackage',$type,$id,$root); 
    189  
    190  
     250                
    191251               if ($type == 'plugins') 
     252               { 
    192253                    $ret_code = $plugins->installPackage($root,$plugins); 
    193  
     254               } 
    194255               if ($type == 'themes') 
     256               { 
    195257                    $ret_code = $themes->installPackage($root,$themes); 
    196  
    197  
     258               } 
     259                
    198260               # --BEHAVIOR-- packmanAfterInstallPackage 
    199261               $core->callBehavior('packmanAfterInstallPackage',$type,$id,$root); 
    200  
    201  
     262                
    202263          } 
    203264          http::redirect($p_url.'&tab=repository&installdone='.$type); 
    204265     } 
    205  
     266      
    206267     # Copy 
    207268     if ($action == 'copy_to_plugins' 
    208269      || $action == 'copy_to_themes'  
    209       || $action == 'copy_to_repository') { 
    210  
     270      || $action == 'copy_to_repository') 
     271     { 
    211272          if ($type == '' || empty($_POST['modules']) || !is_array($_POST['modules'])) 
     273          { 
    212274               throw new Exception('Nothing to copy'); 
    213  
     275          } 
    214276          if ($action == 'copy_to_plugins') 
     277          { 
    215278               $dest = $plugins_path; 
    216  
     279          } 
    217280          elseif ($action == 'copy_to_themes') 
     281          { 
    218282               $dest = $themes_path; 
    219  
     283          } 
    220284          elseif ($action == 'copy_to_repository') 
     285          { 
    221286               $dest = $repo_path; 
    222  
    223           foreach ($_POST['modules'] as $id => $root) { 
    224  
     287          } 
     288           
     289          foreach ($_POST['modules'] as $id => $root) 
     290          { 
    225291               file_put_contents($dest.'/'.basename($root),file_get_contents($root)); 
    226292          } 
    227293          http::redirect($p_url.'&tab=repository&copydone='.$type); 
    228294     } 
    229  
     295      
    230296     # Move 
    231297     if ($action == 'move_to_plugins' 
    232298      || $action == 'move_to_themes'  
    233       || $action == 'move_to_repository') { 
    234  
     299      || $action == 'move_to_repository') 
     300     { 
    235301          if ($type == '' || empty($_POST['modules']) || !is_array($_POST['modules'])) 
     302          { 
    236303               throw new Exception('Nothing to move'); 
    237  
     304          } 
    238305          if ($action == 'move_to_plugins') 
     306          { 
    239307               $dest = $plugins_path; 
    240  
     308          } 
    241309          elseif ($action == 'move_to_themes') 
     310          { 
    242311               $dest = $themes_path; 
    243  
     312          } 
    244313          elseif ($action == 'move_to_repository') 
     314          { 
    245315               $dest = $repo_path; 
    246  
    247           foreach ($_POST['modules'] as $id => $root) { 
    248  
     316          } 
     317           
     318          foreach ($_POST['modules'] as $id => $root) 
     319          { 
    249320               file_put_contents($dest.'/'.basename($root),file_get_contents($root)); 
    250321               unlink($root); 
     
    253324     } 
    254325} 
    255 catch(Exception $e) { 
     326catch(Exception $e) 
     327{ 
    256328     $core->error->add($e->getMessage()); 
    257329} 
     330 
     331$iswritable = libPackman::is_writable($packman_pack_repository,$packman_pack_filename); 
     332if ($default_tab == '') 
     333{ 
     334     $default_tab = $iswritable ? 'repository' : 'settings'; 
     335} 
     336 
    258337 
    259338# Display 
    260339echo ' 
    261340<html><head><title>'.__('pacKman').'</title> 
    262 '.dcPage::jsLoad('js/_posts_list.js').dcPage::jsPageTabs($default_tab); 
    263  
     341'.dcPage::jsLoad('js/_posts_list.js'). 
     342'<link rel="stylesheet" type="text/css" href="index.php?pf=pacKman/style.css" />'; 
    264343 
    265344# --BEHAVIOR-- packmanAdminHeader 
    266345$core->callBehavior('packmanAdminHeader',$core,$default_tab); 
    267346 
    268  
    269347echo ' 
    270348</head><body> 
    271 <h2>'.html::escapeHTML($core->blog->name).' &rsaquo;  
    272 pac<img alt="'.__('pacKman').'" src="index.php?pf=pacKman/icon.png" />man</h2>'; 
    273  
    274 if (libPackman::is_writable($packman_pack_repository,$packman_pack_filename)) 
     349<h2>pac<img alt="'.__('pacKman').'" src="index.php?pf=pacKman/icon.png" />man'. 
     350' - <a class="button" href="'.$p_url.'&amp;tab=packman-plugins">'.__('Plugins').'</a>'. 
     351' - <a class="button" href="'.$p_url.'&amp;tab=packman-themes">'.__('Themes').'</a>'; 
     352if ($iswritable) 
     353{ 
     354     echo ' - <a class="button" href="'.$p_url.'&amp;tab=repository">'.__('Repositories').'</a>'; 
     355} 
     356echo  
     357'</h2><hr class="clear" />'; 
     358 
     359if ($default_tab == 'packman-plugins' && $iswritable) 
     360{ 
     361     libPackman::tab($plugins->getModules(),'plugins',null,false); 
     362} 
     363elseif ($default_tab == 'packman-themes' && $iswritable) 
     364{ 
     365     libPackman::tab($themes->getModules(),'themes',null,false); 
     366} 
     367elseif ($default_tab == 'repository' && $iswritable) 
    275368{ 
    276369     $repo_path_modules = array_merge( 
     
    278371          dcPackman::getPackages($core,dirname($repo_path.'/'.$packman_secondpack_filename)) 
    279372     ); 
    280  
    281      libPackman::tab($plugins->getModules(),'plugins'); 
    282      libPackman::tab($themes->getModules(),'themes'); 
    283  
    284      echo '<div class="multi-part" id="repository" title="'. __('Repository').'">'; 
    285  
    286      libPackman::repo(dcPackman::getPackages($core,$plugins_path),'plugins'); 
    287      libPackman::repo(dcPackman::getPackages($core,$themes_path),'themes'); 
    288      libPackman::repo($repo_path_modules,'repository'); 
    289  
     373     $plugins_path_modules = dcPackman::getPackages($core,$plugins_path); 
     374     $themes_path_modules = dcPackman::getPackages($core,$themes_path); 
     375      
     376     echo '<div id="repository"><h3>'. __('Repositories of packages').'</h3>'; 
     377      
     378     if (empty($plugins_path_modules) && empty($themes_path_modules) && empty($repo_path_modules)) 
     379     { 
     380          echo '<p>'.__('There is no package').'</p>'; 
     381     } 
     382     if (!empty($plugins_path_modules)) 
     383     { 
     384          libPackman::repo($plugins_path_modules,'plugins'); 
     385     } 
     386     if (!empty($themes_path_modules)) 
     387     { 
     388          libPackman::repo($themes_path_modules,'themes'); 
     389     } 
     390     if (!empty($repo_path_modules)) 
     391     { 
     392          libPackman::repo($repo_path_modules,'repository'); 
     393     } 
     394      
    290395     echo '</div>'; 
     396} 
     397else 
     398{ 
     399     echo '<div id="settings"><h3>'. __('Settings').'</h3>'; 
     400      
     401     if (!is_writable(DC_TPL_CACHE)) 
     402     { 
     403          echo '<p class="error">'.__('Cache directory is not writable, packman repository functions are unavailable').'</p>'; 
     404     } 
     405     if (isset($_REQUEST['setupdone'])) 
     406     { 
     407          echo '<p class="message">'.__('Configuration successfully saved').'</p>'; 
     408     } 
     409     echo ' 
     410     <form method="post" action="'.$p_url.'"> 
     411     <fieldset id="setting-behavior"><legend>'.__('Behaviors').'</legend> 
     412     <p><label class="classic">'. 
     413     form::checkbox(array('packman_menu_plugins'),'1',$packman_menu_plugins).' '. 
     414     __('Enable menu on extensions page').'</label></p> 
     415     <p><label class="classic">'. 
     416     form::checkbox(array('packman_pack_overwrite'),'1',$packman_pack_overwrite).' '. 
     417     __('Overwrite existing package').'</label></p> 
     418     </fieldset> 
     419      
     420     <fieldset id="setting-file"><legend>'.__('Packages').'</legend> 
     421     <p><label class="classic">'.__('Name of exported package').'<br />'. 
     422     form::field(array('packman_pack_filename'),65,255,$packman_pack_filename).'</label></p> 
     423     <p><label class="classic">'.__('Name of second exported package').'<br />'. 
     424     form::field(array('packman_secondpack_filename'),65,255,$packman_secondpack_filename).'</label></p> 
     425     <p><label class="classic">'.__('Path to repository').'<br />'. 
     426     form::field(array('packman_pack_repository'),65,255,$packman_pack_repository).'</label></p>'; 
     427     if ($core->blog->public_path) 
     428     { 
     429          echo'<p class="form-note">'.sprintf(__('Public directory is: %s'),$core->blog->public_path).'</p>'; 
     430     } 
     431     echo ' 
     432     <p><label class="classic">'.__('Extra files to exclude from package').'<br />'. 
     433     form::field(array('packman_pack_excludefiles'),65,255,$packman_pack_excludefiles).'</label></p> 
     434     </fieldset> 
     435      
     436     <p class="clear"> 
     437     <input type="submit" name="save_settings" value="'.__('save').'" />  
     438     <input type="submit" name="reset_settings" value="'.__('Reset settings').'" />'. 
     439     $core->formNonce(). 
     440     form::hidden(array('tab'),'settings'). 
     441     form::hidden(array('p'),'pacKman').' 
     442     </p> 
     443     </form> 
     444     </div>'; 
    291445} 
    292446 
     
    294448$core->callBehavior('packmanAdminTabs',$core,$default_tab); 
    295449 
    296  
    297 echo '<div class="multi-part" id="settings" title="'. __('Settings').'">'; 
    298  
    299 if (!is_writable(DC_TPL_CACHE)) 
    300      echo '<p class="error">'.__('Cache directory is not writable, packman repository functions are unavailable').'</p>'; 
    301  
    302 if (isset($_REQUEST['setupdone'])) 
    303      echo '<p class="message">'.__('Configuration successfully saved').'</p>'; 
    304  
    305 echo ' 
    306 <form method="post" action="'.$p_url.'"> 
    307 <h2>'.__('Options').'</h2> 
    308 <p><label class="classic">'. 
    309 form::checkbox(array('packman_menu_plugins'),'1',$packman_menu_plugins).' '. 
    310 __('Enable menu on extensions page').'</label></p> 
    311 <p><label class="classic">'. 
    312 form::checkbox(array('packman_pack_overwrite'),'1',$packman_pack_overwrite).' '. 
    313 __('Overwrite existing package').'</label></p> 
    314 <h2>'.__('Files').'</h2> 
    315 <p><label class="classic">'.__('Name of exported package').'<br />'. 
    316 form::field(array('packman_pack_filename'),65,255,$packman_pack_filename).'</label></p> 
    317 <p><label class="classic">'.__('Name of second exported package').'<br />'. 
    318 form::field(array('packman_secondpack_filename'),65,255,$packman_secondpack_filename).'</label></p> 
    319 <p><label class="classic">'.__('Path to repository').'<br />'. 
    320 form::field(array('packman_pack_repository'),65,255,$packman_pack_repository).'</label></p>'; 
    321 if ($core->blog->public_path) { 
    322      echo'<p class="form-note">'.sprintf(__('Public directory is: %s'),$core->blog->public_path).'</p>'; 
    323 } 
    324 echo ' 
    325 <p><label class="classic">'.__('Extra files to exclude from package').'<br />'. 
    326 form::field(array('packman_pack_excludefiles'),65,255,$packman_pack_excludefiles).'</label></p> 
    327 <p class="clear"> 
    328 <input type="submit" name="save_settings" value="'.__('save').'" />  
    329 <input type="submit" name="reset_settings" value="'.__('Reset settings').'" />'. 
    330 $core->formNonce(). 
    331 form::hidden(array('tab'),'settings'). 
    332 form::hidden(array('p'),'pacKman').' 
    333 </p> 
    334 </form> 
    335 </div> 
    336 '.dcPage::helpBlock('pacKman').' 
    337 <hr class="clear"/> 
    338 <p class="right"> 
     450dcPage::helpBlock('pacKman'); 
     451 
     452echo '<hr class="clear"/><p class="right"> 
     453<a class="button" href="'.$p_url.'&amp;tab=setting">'.__('Settings').'</a> -  
    339454pacKman - '.$core->plugins->moduleInfo('pacKman','version').'&nbsp; 
    340455<img alt="'.__('pacKman').'" src="index.php?pf=pacKman/icon.png" /> 
  • plugins/pacKman/locales/fr/main.lang.php

    r1570 r2298  
    11<?php 
    2 # -- BEGIN LICENSE BLOCK ---------------------------------- 
    3 # This file is part of pacKman, a plugin for Dotclear 2. 
    4 #  
    5 # Copyright (c) 2009 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
    7 #  
    8 # Licensed under the GPL version 2.0 license. 
    9 # A copy of this license is available in LICENSE file or at 
    10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    11 # -- END LICENSE BLOCK ------------------------------------ 
     2// Language: Français  
     3// Module: pacKman - 0.5 
     4// Date: 2010-06-05 10:04:17  
     5// Translated with dcTranslater - 1.4  
    126 
    13 // Language: français  
    14 // Module: pacKman - 0.4 
    15 // Date: 2009-10-10 21:18:35  
    16 // Translated with dcTranslater - 1.2  
    17  
    18 #inc/lib.packman.php:32 
     7#inc/lib.packman.php:33 
     8#inc/lib.packman.php:39 
    199$GLOBALS['__l10n']['Pack up %s'] = 'Emballer des %s'; 
    2010 
    21 #inc/lib.packman.php:35 
     11#inc/lib.packman.php:44 
    2212$GLOBALS['__l10n']['Package successfully created'] = 'Paquetage créé avec succès'; 
    2313 
    24 #inc/lib.packman.php:70 
     14#inc/lib.packman.php:52 
     15#inc/lib.packman.php:150 
     16$GLOBALS['__l10n']['Name'] = 'Nom'; 
     17 
     18#inc/lib.packman.php:84 
    2519$GLOBALS['__l10n']['Pack up selected modules'] = 'Emballer les modules sélectionnés'; 
    2620 
    27 #inc/lib.packman.php:98 
     21#inc/lib.packman.php:90 
     22#inc/lib.packman.php:120 
    2823$GLOBALS['__l10n']['No available module'] = 'Pas de module disponible'; 
    2924 
    30 #inc/lib.packman.php:83 
     25#inc/lib.packman.php:100 
    3126$GLOBALS['__l10n']['Package available in %s directory'] = 'Paquetage disponible dans le repertoire des %s'; 
    3227 
    33 #inc/lib.packman.php:86 
     28#inc/lib.packman.php:104 
    3429$GLOBALS['__l10n']['Package successfully deleted'] = 'Paquetage supprimé avec succès'; 
    3530 
    36 #inc/lib.packman.php:89 
     31#inc/lib.packman.php:108 
    3732$GLOBALS['__l10n']['Package successfully copied'] = 'Paquetage copié avec succès'; 
    3833 
    39 #inc/lib.packman.php:92 
     34#inc/lib.packman.php:112 
    4035$GLOBALS['__l10n']['Package successfully moved'] = 'Paquetage déplacé avec succès'; 
    4136 
    42 #inc/lib.packman.php:95 
     37#inc/lib.packman.php:116 
    4338$GLOBALS['__l10n']['Package successfully installed'] = 'Paquetage installé avec succès'; 
    4439 
    45 #inc/lib.packman.php:104 
     40#inc/lib.packman.php:128 
    4641$GLOBALS['__l10n']['install'] = 'installer'; 
    4742 
    48 #inc/lib.packman.php:115 
     43#inc/lib.packman.php:132 
     44#inc/lib.packman.php:137 
     45#inc/lib.packman.php:142 
    4946$GLOBALS['__l10n']['copy to %s directory'] = 'copier dans le répertoire des %s'; 
    5047 
    51 #inc/lib.packman.php:108 
     48#inc/lib.packman.php:132 
     49#inc/lib.packman.php:133 
    5250$GLOBALS['__l10n']['plugins'] = 'extensions'; 
    5351 
    54 #inc/lib.packman.php:116 
     52#inc/lib.packman.php:133 
     53#inc/lib.packman.php:138 
     54#inc/lib.packman.php:143 
    5555$GLOBALS['__l10n']['move to %s directory'] = 'déplacer dans le repertoire des %s'; 
    5656 
    57 #inc/lib.packman.php:112 
     57#inc/lib.packman.php:137 
     58#inc/lib.packman.php:138 
    5859$GLOBALS['__l10n']['themes'] = 'thèmes'; 
    5960 
    60 #inc/lib.packman.php:116 
    61 $GLOBALS['__l10n']['repository'] = 'dépôts'; 
     61#inc/lib.packman.php:142 
     62#inc/lib.packman.php:143 
     63$GLOBALS['__l10n']['repository'] = 'dépôt'; 
    6264 
    63 #inc/lib.packman.php:122 
     65#inc/lib.packman.php:149 
    6466$GLOBALS['__l10n']['File'] = 'Fichier'; 
    6567 
    66 #inc/lib.packman.php:150 
     68#inc/lib.packman.php:171 
     69$GLOBALS['__l10n']['Download'] = 'Télécharger'; 
     70 
     71#inc/lib.packman.php:184 
    6772$GLOBALS['__l10n']['Selected modules action:'] = 'Action sur les modules sélectionnés :'; 
    6873 
    69 #index.php:282 
    70 $GLOBALS['__l10n']['Repository'] = 'Dépôt'; 
     74#index.php:123 
     75$GLOBALS['__l10n']['Path to repository is not writable'] = 'Le chemin vers le dépôt n\'est pas accessible en écriture'; 
    7176 
    72 #index.php:295 
     77#index.php:127 
     78$GLOBALS['__l10n']['You must specify the name of package to export'] = 'Vous devez un spécifier un nom de paquetage pour l\'export'; 
     79 
     80#index.php:131 
     81$GLOBALS['__l10n']['Path to first export package is not writable'] = 'Le premier chemin d\'export de paquetage n\'est pas accessible en écriture'; 
     82 
     83#index.php:136 
     84$GLOBALS['__l10n']['Path to second export package is not writable'] = 'Le second chemin d\'export de paquetage n\'est pas accessible en écriture'; 
     85 
     86#index.php:354 
     87$GLOBALS['__l10n']['Repositories'] = 'Dépôts'; 
     88 
     89#index.php:376 
     90$GLOBALS['__l10n']['Repositories of packages'] = 'Dépôts de paquetages'; 
     91 
     92#index.php:380 
     93$GLOBALS['__l10n']['There is no package'] = 'Il n\'y a pas de paquetage'; 
     94 
     95#index.php:399 
     96#index.php:453 
    7397$GLOBALS['__l10n']['Settings'] = 'Paramètres'; 
    7498 
    75 #index.php:298 
    76 $GLOBALS['__l10n']['Cache directory is not writable, packman repository functions are unavailable'] = 'Le repertoire cache n\'est pas accessible en écriture, les functions de dépôt de packman ne sont pas disponibles'; 
     99#index.php:403 
     100$GLOBALS['__l10n']['Cache directory is not writable, packman repository functions are unavailable'] = 'Le repertoire cache n\'est pas accessible en écriture, les fonctions de dépôt de Packman ne sont pas disponibles'; 
    77101 
    78 #index.php:301 
     102#index.php:407 
    79103$GLOBALS['__l10n']['Configuration successfully saved'] = 'Configuration sauvergardée avec succès'; 
    80104 
    81 #index.php:308 
     105#index.php:411 
     106$GLOBALS['__l10n']['Behaviors'] = 'Comportements'; 
     107 
     108#index.php:414 
    82109$GLOBALS['__l10n']['Enable menu on extensions page'] = 'Activer le menu sur la page des extensions'; 
    83110 
    84 #index.php:311 
     111#index.php:417 
    85112$GLOBALS['__l10n']['Overwrite existing package'] = 'Écraser les paquetages existants'; 
    86113 
    87 #index.php:312 
    88 $GLOBALS['__l10n']['Files'] = 'Fichiers'; 
     114#index.php:420 
     115$GLOBALS['__l10n']['Packages'] = 'Paquetages'; 
    89116 
    90 #index.php:313 
     117#index.php:421 
    91118$GLOBALS['__l10n']['Name of exported package'] = 'Nom du paquetage exporté'; 
    92119 
    93 #index.php:315 
     120#index.php:423 
    94121$GLOBALS['__l10n']['Name of second exported package'] = 'Nom du second paquetage exporté'; 
    95122 
    96 #index.php:317 
     123#index.php:425 
    97124$GLOBALS['__l10n']['Path to repository'] = 'Chemin vers le dépôt'; 
    98125 
    99 #index.php:319 
    100 $GLOBALS['__l10n']['Extra files to exclude from package'] = 'Fichiers suplémentaires à exclure du paquetage'; 
     126#index.php:429 
     127$GLOBALS['__l10n']['Public directory is: %s'] = 'Le repertoire publique est: %s'; 
    101128 
    102 #index.php:323 
    103 $GLOBALS['__l10n']['Reset settings'] = 'Remise à zero'; 
     129#index.php:432 
     130$GLOBALS['__l10n']['Extra files to exclude from package'] = 'Fichiers supplémentaires à exclure du paquetage'; 
     131 
     132#index.php:438 
     133$GLOBALS['__l10n']['Reset settings'] = 'Remise à zéro'; 
    104134 
    105135?> 
  • plugins/pacKman/locales/fr/main.po

    r1762 r2298  
    1 # Language: français 
    2 # Module: pacKman - 0.4 
    3 # Date: 2009-10-10 21:18:35 
    4 # Translated with dcTranslater - 1.2 
     1# Language: Français 
     2# Module: pacKman - 0.5 
     3# Date: 2010-06-05 10:04:17 
     4# Translated with translater 1.4 
     5 
    56msgid "" 
    67msgstr "" 
    78"Content-Type: text/plain; charset=UTF-8\n" 
    8 "Project-Id-Version: \n" 
     9"Project-Id-Version: pacKman 0.5\n" 
    910"POT-Creation-Date: \n" 
    10 "PO-Revision-Date: \n" 
    11 "Last-Translator: Kozlika <kozlika@free.fr>\n" 
     11"PO-Revision-Date: 2010-06-05T10:04:17+00:00\n" 
     12"Last-Translator: JC Denis\n" 
    1213"Language-Team: \n" 
    1314"MIME-Version: 1.0\n" 
    1415"Content-Transfer-Encoding: 8bit\n" 
    1516 
    16 #: inc/lib.packman.php:32 
     17#: inc/lib.packman.php:33 
     18#: inc/lib.packman.php:39 
    1719msgid "Pack up %s" 
    1820msgstr "Emballer des %s" 
    1921 
    20 #: inc/lib.packman.php:35 
     22#: inc/lib.packman.php:44 
    2123msgid "Package successfully created" 
    2224msgstr "Paquetage créé avec succès" 
    2325 
    24 #: inc/lib.packman.php:70 
     26#: inc/lib.packman.php:52 
     27#: inc/lib.packman.php:150 
     28msgid "Name" 
     29msgstr "Nom" 
     30 
     31#: inc/lib.packman.php:84 
    2532msgid "Pack up selected modules" 
    2633msgstr "Emballer les modules sélectionnés" 
    2734 
    28 #: inc/lib.packman.php:98 
     35#: inc/lib.packman.php:90 
     36#: inc/lib.packman.php:120 
    2937msgid "No available module" 
    3038msgstr "Pas de module disponible" 
    3139 
    32 #: inc/lib.packman.php:83 
     40#: inc/lib.packman.php:100 
    3341msgid "Package available in %s directory" 
    3442msgstr "Paquetage disponible dans le repertoire des %s" 
    3543 
    36 #: inc/lib.packman.php:86 
     44#: inc/lib.packman.php:104 
    3745msgid "Package successfully deleted" 
    3846msgstr "Paquetage supprimé avec succès" 
    3947 
    40 #: inc/lib.packman.php:89 
     48#: inc/lib.packman.php:108 
    4149msgid "Package successfully copied" 
    4250msgstr "Paquetage copié avec succès" 
    4351 
    44 #: inc/lib.packman.php:92 
     52#: inc/lib.packman.php:112 
    4553msgid "Package successfully moved" 
    4654msgstr "Paquetage déplacé avec succès" 
    4755 
    48 #: inc/lib.packman.php:95 
     56#: inc/lib.packman.php:116 
    4957msgid "Package successfully installed" 
    5058msgstr "Paquetage installé avec succès" 
    5159 
    52 #: inc/lib.packman.php:104 
     60#: inc/lib.packman.php:128 
    5361msgid "install" 
    5462msgstr "installer" 
    5563 
    56 #: inc/lib.packman.php:115 
     64#: inc/lib.packman.php:132 
     65#: inc/lib.packman.php:137 
     66#: inc/lib.packman.php:142 
    5767msgid "copy to %s directory" 
    5868msgstr "copier dans le répertoire des %s" 
    5969 
    60 #: inc/lib.packman.php:108 
     70#: inc/lib.packman.php:132 
     71#: inc/lib.packman.php:133 
    6172msgid "plugins" 
    6273msgstr "extensions" 
    6374 
    64 #: inc/lib.packman.php:116 
     75#: inc/lib.packman.php:133 
     76#: inc/lib.packman.php:138 
     77#: inc/lib.packman.php:143 
    6578msgid "move to %s directory" 
    6679msgstr "déplacer dans le repertoire des %s" 
    6780 
    68 #: inc/lib.packman.php:112 
     81#: inc/lib.packman.php:137 
     82#: inc/lib.packman.php:138 
    6983msgid "themes" 
    7084msgstr "thèmes" 
    7185 
    72 #: inc/lib.packman.php:116 
     86#: inc/lib.packman.php:142 
     87#: inc/lib.packman.php:143 
    7388msgid "repository" 
    7489msgstr "dépôt" 
    7590 
    76 #: inc/lib.packman.php:122 
     91#: inc/lib.packman.php:149 
    7792msgid "File" 
    7893msgstr "Fichier" 
    7994 
    80 #: inc/lib.packman.php:150 
     95#: inc/lib.packman.php:171 
     96msgid "Download" 
     97msgstr "Télécharger" 
     98 
     99#: inc/lib.packman.php:184 
    81100msgid "Selected modules action:" 
    82101msgstr "Action sur les modules sélectionnés :" 
    83102 
    84 #: index.php:282 
    85 msgid "Repository" 
    86 msgstr "Dépôt" 
     103#: index.php:123 
     104msgid "Path to repository is not writable" 
     105msgstr "Le chemin vers le dépôt n'est pas accessible en écriture" 
    87106 
    88 #: index.php:295 
     107#: index.php:127 
     108msgid "You must specify the name of package to export" 
     109msgstr "Vous devez un spécifier un nom de paquetage pour l'export" 
     110 
     111#: index.php:131 
     112msgid "Path to first export package is not writable" 
     113msgstr "Le premier chemin d'export de paquetage n'est pas accessible en écriture" 
     114 
     115#: index.php:136 
     116msgid "Path to second export package is not writable" 
     117msgstr "Le second chemin d'export de paquetage n'est pas accessible en écriture" 
     118 
     119#: index.php:354 
     120msgid "Repositories" 
     121msgstr "Dépôts" 
     122 
     123#: index.php:376 
     124msgid "Repositories of packages" 
     125msgstr "Dépôts de paquetages" 
     126 
     127#: index.php:380 
     128msgid "There is no package" 
     129msgstr "Il n'y a pas de paquetage" 
     130 
     131#: index.php:399 
     132#: index.php:453 
    89133msgid "Settings" 
    90134msgstr "Paramètres" 
    91135 
    92 #: index.php:298 
     136#: index.php:403 
    93137msgid "Cache directory is not writable, packman repository functions are unavailable" 
    94138msgstr "Le repertoire cache n'est pas accessible en écriture, les fonctions de dépôt de Packman ne sont pas disponibles" 
    95139 
    96 #: index.php:301 
     140#: index.php:407 
    97141msgid "Configuration successfully saved" 
    98142msgstr "Configuration sauvergardée avec succès" 
    99143 
    100 #: index.php:308 
     144#: index.php:411 
     145msgid "Behaviors" 
     146msgstr "Comportements" 
     147 
     148#: index.php:414 
    101149msgid "Enable menu on extensions page" 
    102150msgstr "Activer le menu sur la page des extensions" 
    103151 
    104 #: index.php:311 
     152#: index.php:417 
    105153msgid "Overwrite existing package" 
    106154msgstr "Écraser les paquetages existants" 
    107155 
    108 #: index.php:312 
    109 msgid "Files" 
    110 msgstr "Fichiers" 
     156#: index.php:420 
     157msgid "Packages" 
     158msgstr "Paquetages" 
    111159 
    112 #: index.php:313 
     160#: index.php:421 
    113161msgid "Name of exported package" 
    114162msgstr "Nom du paquetage exporté" 
    115163 
    116 #: index.php:315 
     164#: index.php:423 
    117165msgid "Name of second exported package" 
    118166msgstr "Nom du second paquetage exporté" 
    119167 
    120 #: index.php:317 
     168#: index.php:425 
    121169msgid "Path to repository" 
    122170msgstr "Chemin vers le dépôt" 
    123171 
    124 #: index.php:319 
     172#: index.php:429 
     173msgid "Public directory is: %s" 
     174msgstr "Le repertoire publique est: %s" 
     175 
     176#: index.php:432 
    125177msgid "Extra files to exclude from package" 
    126178msgstr "Fichiers supplémentaires à exclure du paquetage" 
    127179 
    128 #: index.php:323 
     180#: index.php:438 
    129181msgid "Reset settings" 
    130182msgstr "Remise à zéro" 
  • plugins/pacKman/release.txt

    r1570 r2298  
     10.5 20100605 
     2 * Switched to DC 2.2 
     3 * Changed admin interface (easy, light, fast) 
     4 * Added direct download button on repository (closes #449) 
     5 
    160.4 20091010 
    27 * Fixed second package management 
Note: See TracChangeset for help on using the changeset viewer.

Sites map