Changeset 881

Show
Ignore:
Timestamp:
09/03/08 01:02:42 (3 months ago)
Author:
MattRead
Message:

plugin:hpm random updates

Location:
plugins/hpm/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • plugins/hpm/trunk/dunzip2.php

    r216 r881  
    1 <? 
     1<?php 
    22// 15/07/2006 (2.6) 
    33// - Changed the algorithm to parse the ZIP file.. Now, the script will try to mount the compressed 
  • plugins/hpm/trunk/habaripackage.php

    r581 r881  
    193193    private function build_install_profile() 
    194194    { 
     195        if ( ! $this->archive->get_file_list() ) { 
     196            throw new Exception( "Archive does not contain any files" ); 
     197        } 
     198         
    195199        $install_profile= array(); 
    196200        foreach ( $this->archive->get_file_list() as $file ) { 
  • plugins/hpm/trunk/habaripackages.php

    r581 r881  
    221221    public static function tempnam() 
    222222    { 
    223         return tempnam( HABARI_PATH . '/system/cache', 'HPM-' ); 
     223        return tempnam( HABARI_PATH . '/3rdparty/hpm', 'HPM-' ); 
    224224    } 
    225225     
     
    227227    { 
    228228        $tmp_dir = 'HPM-' . md5( UUID::get() ); 
    229         if ( is_writable( HABARI_PATH . "/system/cache" ) ) { 
    230             $tmp_dir = HABARI_PATH . "/system/cache/$tmp_dir"; 
     229        if ( is_writable( HABARI_PATH . "/3rdparty/hpm" ) ) { 
     230            $tmp_dir = HABARI_PATH . "/3rdparty/hpm/$tmp_dir"; 
    231231        } 
    232232        else { 
  • plugins/hpm/trunk/hpm.plugin.php

    r560 r881  
    33class HPM extends Plugin 
    44{ 
    5     const VERSION= '0.1'; 
     5    const VERSION= '0.2'; 
     6    const DB_VERSION = 001; 
    67     
    78    function info() 
     
    910        return array ( 
    1011            'name' => 'HPM', 
    11             'version' => '0.1', 
     12            'version' => '0.2.alpha', 
    1213            'author' => 'Habari Community', 
    1314            'license' => 'Apache License 2.0', 
     
    1718    public function action_init() 
    1819    { 
    19         Plugins::act( 'hpm_init' ); 
    2020    } 
    2121     
     
    2424        Update::add( 'hpm', '693E59D6-2B5F-11DD-A23A-9E6C56D89593',  $this->info->version ); 
    2525    } 
    26  
     26     
     27    /** 
     28     * @todo fix this schema!!!! 
     29     */ 
    2730    public function action_plugin_activation( $file ) 
    2831    { 
     
    130133    public function action_admin_theme_get_hpm( $handler, $theme ) 
    131134    { 
     135        Plugins::act( 'hpm_init' ); 
     136         
    132137        if ( isset( $handler->handler_vars['action'] ) ) { 
    133138            $action= $handler->handler_vars['action']; 
     
    136141            } 
    137142            else { 
    138                 Plugins::act( "hpm_$action", $handler, $theme ); 
     143                Plugins::act( "hpm_act_$action", $handler, $theme ); 
    139144            } 
    140145        } 
     
    144149        } 
    145150         
    146         if ( !is_writable( HabariPackages::tempnam() ) || !is_writable( HABARI_PATH . '/3rdparty' ) ) { 
     151        if ( !is_writable( HabariPackages::tempdir() ) || !is_writable( HABARI_PATH . '/3rdparty' ) ) { 
    147152            $theme->notice = 'permissions'; 
    148153            $theme->display('hpm_notice'); 
  • plugins/hpm/trunk/tarreader.php

    r216 r881  
    7070    private $filename; 
    7171    private $tar_file; 
    72     private $filelist= array(); 
    73     private $files; 
     72    private $filelist = array(); 
     73    private $files = array(); 
    7474    private $directories; 
    7575     
  • plugins/hpm/trunk/templates/hpm_notice.php

    r560 r881  
    77            <p>HPM requires the temporary folder and install location to be writable by the server. Please make the following changes.</p> 
    88             
    9             <?php if ( !is_writable( HabariPackages::tempnam() ) ) : ?> 
     9            <?php if ( !is_writable( HabariPackages::tempdir() ) ) : ?> 
    1010                <h3>Temporary Folder</h3> 
    11                 <p>Please make <?php echo HabariPackages::tempnam(); ?> writable by the server</p> 
     11                <p>Please make <?php echo HabariPackages::tempdir(); ?> writable by the server</p> 
    1212                <p>...explain the process here...</p>  
    1313            <?php endif; ?>