phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] filemanager/inc db.inc.php, 1.6 class.sofilemanager.i


From: ceb
Subject: [Phpgroupware-cvs] filemanager/inc db.inc.php, 1.6 class.sofilemanager.inc.php, 1.2 class.sophpwebhosting.inc.php, 1.4 class.uifilemanager.inc.php, 1.10 class.uiaction_base.inc.php, 1.2 class.bofilemanager.inc.php, 1.7
Date: Thu, 24 Feb 2005 15:06:45 -0000

Update of filemanager/inc

Removed Files:
     Branch: MAIN
            db.inc.php
            class.sofilemanager.inc.php
            class.sophpwebhosting.inc.php
Modified Files:
     Branch: MAIN
            class.uifilemanager.inc.php lines: +118 -151
            class.uiaction_base.inc.php lines: +1 -2
            class.bofilemanager.inc.php lines: +20 -17

Log Message:
update

====================================================
Index: filemanager/inc/class.uifilemanager.inc.php
diff -u filemanager/inc/class.uifilemanager.inc.php:1.9 
filemanager/inc/class.uifilemanager.inc.php:1.10
--- filemanager/inc/class.uifilemanager.inc.php:1.9     Thu Jan 20 01:13:30 2005
+++ filemanager/inc/class.uifilemanager.inc.php Fri Jan 21 01:41:05 2005
@@ -1,23 +1,21 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * This file written by Mark A Peters (Skeeter) <address@hidden>  *
-  * Modified by Jonathon Sim <address@hidden> for Zeald Ltd                   *
-  * User interface for the filemanager app                                   *
-  * Copyright (C) 2002 Mark A Peters  (C) 2003 Zeald Ltd                     *
-  * --------------------------------------------                             *
-  *  This program is free software; you can redistribute it and/or modify it *
-  *  under the terms of the GNU General Public License as published by the   *
-  *  Free Software Foundation; either version 2 of the License, or (at your  *
-  *  option) any later version.                                              *
-  \**************************************************************************/
-  /* $Id$ */
-  define('UI_DEBUG', 0);
+       /***
+       * phpGroupWare filemanager
+       * @author Mark A Peters (Skeeter) <address@hidden>
+       * @author Jonathon Sim <address@hidden>
+       * @author Bettina Gille <address@hidden>
+       * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package filemanager
+       * @version $Id$
+       */
+
+       define('UI_DEBUG', 0);

        class uifilemanager
        {
-
-               var $public_functions = array(
+               var $public_functions = array
+               (
                        'index' => True,
                        'action'        => True,
                        'help'  => True,
@@ -26,16 +24,18 @@
                        'view_file'     => True,
                        'edit'  => True,
                        'rename' => True,
-                       'edit_comments' => True
+                       'edit_comments' => True,
+                       'update'        => True
                );
-
-               var $bo;
+
+               var $bofilemanager;
                var $nextmatchs;
                var $browser;
                var $template_dir;
                var $help_info;
-               var $mime_ico = array (
-       'application/pdf' => 'pdf',
+               var $mime_ico = array
+               (
+                       'application/pdf' => 'pdf',
        'application/postscript' => 'postscript',
        'application/msword' => 'word',
        'application/vnd.ms-excel' => 'excel',
@@ -68,7 +68,6 @@
                function uifilemanager()
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
-                       //$this->no_header();
                        $this->actions                  = 
CreateObject('filemanager.uiactions');
                        $this->bofilemanager    = 
CreateObject('filemanager.bofilemanager');
                        $this->nextmatchs               = 
CreateObject('phpgwapi.nextmatchs');
@@ -78,29 +77,6 @@
                        $this->create_home_dir();
                        $this->verify_path();
                        $this->update();
-
-               }
-
-               function load_header()
-               {
-                       unset($GLOBALS['phpgw_info']['flags']['noheader']);
-                       unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
-                       unset($GLOBALS['phpgw_info']['flags']['noappheader']);
-                       unset($GLOBALS['phpgw_info']['flags']['noappfooter']);
-                       unset($GLOBALS['phpgw_info']['flags']['noappfooter']);
-                       unset($GLOBALS['phpgw_info']['flags']['headonly']);
-                       $GLOBALS['phpgw']->xslttpl->add_file(array('widgets'));
-                       
//$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
-               }
-
-               function no_header()
-               {
-                       $GLOBALS['phpgw_info']['flags']['noheader'] = True;
-                       $GLOBALS['phpgw_info']['flags']['nonavbar'] = True;
-                       $GLOBALS['phpgw_info']['flags']['noappheader'] = True;
-                       $GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
-                       //$GLOBALS['phpgw_info']['flags']['headonly'] = True;
-                       $GLOBALS['phpgw']->xslttpl->add_file(array('widgets'));
                }

                function check_access()
@@ -245,26 +221,30 @@
                        srand((double)microtime() * 1000000);
                        if($this->bofilemanager->update || rand(0,19) == 4)
                        {
-                               $this->bofilemanager->vfs->update_real( array(
+                               $this->bofilemanager->vfs->update_real(array(
                                        'string' => $this->bofilemanager->path,
                                        'relatives' =>Array(RELATIVE_NONE)
                                        ));
                        }
                        if($this->bofilemanager->update)
                        {
-                               Header('Location: '.$GLOBALS['phpgw']->link(
-                                               '/index.php',
-                                               Array(
-                                                       'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
-                                                       'path'  => 
urlencode($this->bofilemanager->path)
-                                               )
-                                       )
-                               );
+                               
$GLOBALS['phpgw']->redirect_link('/index.php',array
+                                                                               
                                        (
+                                                                               
                                                'menuaction'    => 
'filemanager.uifilemanager.index',
+                                                                               
                                                'path'  => 
urlencode($this->bofilemanager->path)
+                                                                               
                                        )
+                                                                               
                );
                        }
                }
+
                //Dispatches various file manager actions to the appropriate 
handler
                function action()
                {
+                       $params = get_var('params',array('POST','GET'));
+                       $createfile = get_var('createfile',array('POST','GET'));
+                       //_debug_array($params);
+                       //echo 'createfile: '. $createfile;
+
                        if (UI_DEBUG)
                        {
                                echo " Debug mode <br>";
@@ -273,7 +253,7 @@
                                die();

                        }
-                       $actions = Array(
+                       /*$actions = Array(
                                'rename'        => lang('rename'),
                                'delete'        => lang('delete'),
                                'go'    => lang('go to'),
@@ -293,7 +273,7 @@
                        $local_functions = array(
                                'rename',
                                'edit_comments'
-                       );
+                       );*/
                        $bo_functions = array(
                                'apply_edit_comment',
                                'apply_edit_name',
@@ -311,25 +291,18 @@
                                exit();
                        }
                        //If the action is a "uiaction" (ie it has its own 
seperate interface), this will run it
-                       $this->actions->dispatch($this);
-                       @reset($actions);
-                       while(list($function,$text) = each($actions))
+                       //$this->actions->dispatch($this);
+                       //@reset($actions);
+
+                       if(is_array($params))
                        {
-                               if(isset($this->bofilemanager->$function) && 
!empty($this->bofilemanager->$function) && 
trim(strtolower($this->bofilemanager->$function)) == strtolower($text))
+                               foreach($params as $action => $true)
                                {
-                                       //If the action is provided by this 
class, this'l do it
-                                       if (in_array($function, 
$local_functions))
-                                       {
-                                               //echo " uifunction $function ";
-                                               //Header('Location: 
'.$GLOBALS['phpgw']->link('/index.php',$var));
-                                               $this->$function();
-                                               exit();
-                                       } //For actions provided by the 
back-end, with no gui
-                                       elseif (in_array($function, 
$bo_functions))
+                                       if(in_array($action,$bo_functions))
                                        {
                                                //echo " bofunction $function ";
-                                               $f_function = 'f_'.$function;
-                                               $errors = implode("\n", 
$this->bofilemanager->$f_function());
+                                               $f_function = 'f_'.$action;
+                                               $errors = 
implode("\n",$this->bofilemanager->$f_function());
                                                $var = Array(
                                                        'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
                                                        'path'  => 
urlencode($this->bofilemanager->path)
@@ -337,27 +310,27 @@
                                                if($function == 'newfile')
                                                {
                                                        $var = Array(
-                                                               'menuaction'    
=> $this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.action',
-                                                               'uiaction' => 
'edit',
-                                                               'path'  => 
urlencode($this->bofilemanager->path),
-                                                               'file'  => 
urlencode($this->bofilemanager->createfile)
+                                                               'menuaction'    
=> $this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
+                                                               'path'          
        => urlencode($this->bofilemanager->path),
+                                                               'createfile'    
=> urlencode($this->bofilemanager->createfile)
                                                        );
                                                }
                                                elseif(strlen($errors))
                                                {
                                                        $var['errors'] = 
$errors;
                                                }
-                                               Header('Location: 
'.$GLOBALS['phpgw']->link('/index.php',$var));
-                                               exit();
-                                       }
-                               }
-
-                       }
-                       Header('Location: 
'.$GLOBALS['phpgw']->link('/index.php',Array(
+                                               
$GLOBALS['phpgw']->redirect_link('/index.php',$var);
+                                       }
+                                       else
+                                       {
+                                               
$GLOBALS['phpgw']->redirect_link('/index.php',Array(
                                                        'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
                                                        'path'  => 
urlencode($this->bofilemanager->path),
                                                        'errors' => 
lang('unknown action!')
-                                               )));
+                                               ));
+                                       }
+                               }
+                       }
                }

                /**TODO : xslt-ise this */
@@ -554,38 +527,6 @@
                                                                                
        'value' => lang('download'),
                                                                                
        'caption' => $this->build_help('download')
                                                                                
        ));
-                               $var[] = array('widget' => array( 'type' => 
'seperator' ));
-                               $var[]  = array('widget' => array('type' => 
'text',
-                                                                               
                 'name' => 'createdir',
-                                                                               
                 'maxlength' => '255',
-                                                                               
                 'size' => '15'
-                                                                               
                 ));
-                               $var[]  = array('widget' => array('type' => 
'submit',
-                                                                               
                        'name' => 'newdir',
-                                                                               
                        'value' => lang('create folder'),
-                                                                               
                        'caption' => $this->build_help('create_folder')
-                                                                               
                ));
-                               $var[] = array('widget' => array( 'type' => 
'seperator' ));
-                       }
-       /*              $var[] = array('widget' => array('type' => 'submit',
-                                                                               
        'name' => 'update',
-                                                                               
        'value' => lang('update'),
-                                                                               
        'caption' => $this->build_help('update')
-                                                                               
));
-*/
-                       if($this->bofilemanager->path != '/' && 
$this->bofilemanager->path != $this->bofilemanager->fakebase)
-                       {
-                               $var[] = array('widget' => array( 'type' => 
'text',
-                                                                               
                'name' => 'createfile',
-                                                                               
                'maxlength' => '255',
-                                                                               
                'size' => '15'
-                                                                               
        ));
-                               $var[] = array('widget' => array('type' => 
'submit',
-                                                                               
                 'name' => 'newfile',
-                                                                               
                 'value' => lang('create file'),
-                                                                               
                 'caption' => $this->build_help('create_file')
-                                                                               
                ));
-                               $var[] = array('widget' => array( 'type' => 
'seperator' ));
                        }

                        if($this->bofilemanager->settings['show_command_line'])
@@ -661,17 +602,6 @@
 */
                function display_uploads()
                {
-
-                       $var_head[] = array('widget' => array('type' => 'label',
-                               'caption' => 
lang('file').$this->build_help('upload_file')
-                               ));
-
-
-                       $var_head[] = array('widget' => array('type' => 'label',
-                               'caption' => 
lang('comment').$this->build_help('upload_comment')
-                               ));
-                       $table_head [] =array('table_col' => $var_head);
-               //      $var[] = array('widget' => array('type' => 
'seperator'));
                        
for($i=0;$i<$this->bofilemanager->show_upload_boxes;$i++)
                        {
                                        $var = array();
@@ -684,29 +614,17 @@
                                                         'name' => 
'upload_comment[]'
                                                         ));

-/*                                     $var[] = array('widget' => array('type' 
=> 'label',
-                                                                       
'caption' => $input_file.$input_comment
-                                                               ));     */
-                                       $table_rows [] = array('table_col' => 
$var);
+                                       $var[] = array('widget' => array('type' 
=> 'empty'));
+                                       $table_rows[] = array('table_col' => 
$var);
                        }
                        $var = array();
-                       $var[] =  array('widget' => array('type' =>'submit',
-                                                                               
        'name' => 'upload',
-                                                                               
        'value' => lang('upload Files'),
-                                                                               
        'caption' => $this->build_help('upload_files')
-                                                                               
        ));
-
                        $var[] = array('widget' => array('type' => 'hidden',
                                                         'name' => 
'show_upload_boxes',
                                                         'value' => 
$this->bofilemanager->show_upload_boxes
                                                         ));
-
-                       $table_rows [] = array('table_col' => $var);

-
-                       return array('table' => array('table_head' 
=>$table_head ,
-                                               'table_row' => $table_rows)
-                                               );
+                       $table_rows[] = array('table_col' => $var);
+                       return array('table_row' => $table_rows);
                }

                function dirs_first($files_array)
@@ -733,6 +651,7 @@
                function index( $edit=array())
                {
                        $files_array = $this->bofilemanager->load_files();
+                       //echo 'createfile: ' . $_GET['createfile'];

                        $usage = 0;
                        $files_array = $this->dirs_first($files_array);
@@ -860,7 +779,7 @@
                                        'error'         => 
(isset($this->bofilemanager->errors) && 
is_array(unserialize(base64_decode($this->bofilemanager->errors)))?$GLOBALS['phpgw']->common->error_list(unserialize(base64_decode($this->bofilemanager->errors)),'Results'):''),
                                        'img_up'        => array('widget' => 
array('type' => 'img',
                                                                                
        'src' => 
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'up'),
-                                                                               
        'alt' => lang('up'),
+                                                                               
        'title' => lang('up'),
                                                                                
        'link' => $GLOBALS['phpgw']->link('/index.php',Array(
                                                                                
                        'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
                                                                                
                        'path'          => 
urlencode($this->bofilemanager->lesspath)
@@ -869,22 +788,39 @@
                                        'help_up'       => 
$this->build_help('up'),
                                        'img_home'      => array('widget' => 
array('type' => 'img',
                                                                                
        'src' => 
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'folder_home'),
-                                                                               
        'alt' => lang('folder'),
+                                                                               
        'title' => lang('go to your home directory'),
                                                                                
        'link' => $GLOBALS['phpgw']->link('/index.php',Array(
                                                                                
                        'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
                                                                                
                        'path' => urlencode($this->bofilemanager->homedir)
                                                                                
                ))
                                                                                
        )),
-                                       'dir'           => 
$this->bofilemanager->path,
                                        'img_dir'       => array('widget' => 
array('type' => 'img',
                                                                                
        'src' => 
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'folder_large'),
-                                                                               
        'alt' => lang('folder'),                                                
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
+                                                                               
        'title' => lang('folder'),                                              
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
                                                                                
        'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
                                                                                
        'path' => urlencode($this->bofilemanager->path)
-                                                                               
                ))
+                                                                               
                ))
+                                                                               
        )),
+                                       'current_dir'   => 
$this->bofilemanager->path,
+                                       'help_home'             => 
$this->build_help('home'),
+                                       'img_upload'    => array('widget' => 
array('type' => 'img',
+                                                                               
        'src' => 
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'1uparrow'),
+                                                                               
        'title' => lang('upload files'),
+                                                                               
        'link' => $GLOBALS['phpgw']->link('/index.php',Array(
+                                                                               
                        'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
+                                                                               
                        'path'          => urlencode($this->bofilemanager->path)
+                                                                               
                ))
                                                                                
        )),
-                                       'help_home'     => 
$this->build_help('home'),
-                                       'add_moz_sidebar' => array
+                                       'img_refresh'   => array('widget' => 
array('type' => 'img',
+                                                                               
        'src' => 
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'reload'),
+                                                                               
        'title' => lang('refresh'),
+                                                                               
        'link' => $GLOBALS['phpgw']->link('/index.php',Array(
+                                                                               
                        'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.update',
+                                                                               
                        'path'          => urlencode($this->bofilemanager->path)
+                                                                               
                ))
+                                                                               
        ))
+
+                                       /*'add_moz_sidebar' => array
                                        (
                                                'url'                   => 
$GLOBALS['phpgw']->link('/index.php',array(
                                                                                
                                                                                
                'menuaction'    => 
$this->bofilemanager->appname.'.ui'.$this->bofilemanager->appname.'.index',
@@ -892,9 +828,37 @@
                                                                                
                                                                                
        )),
                                                'label'                 => 
lang('phpgroupware files'),
                                                'link_label'    => lang('add 
mozilla/netscape sidebar tab')
-                                       )
+                                       )*/
                                );

+                               if($this->bofilemanager->path != '/' && 
$this->bofilemanager->path != $this->bofilemanager->fakebase)
+                               {
+                                       $data['create_folder']  = 
array('widget' => array('type' => 'text',
+                                                                               
                                                'name' => 'createdir',
+                                                                               
                                                'maxlength' => '255',
+                                                                               
                                                'size' => '15'
+                                                                               
        ));
+                                       $data['img_create_folder']      = 
array('widget' => array('type' => 'img',
+                                                                               
                                                        'src' => 
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'folder_new'),
+                                                                               
                                                        'title' => lang('create 
folder'),
+                                                                               
                                                        'name'  => 
'params[newdir]',
+                                                                               
                                                        'caption' => 
$this->build_help('create_folder')
+                                                                               
                ));
+                                       $data['lang_create_folder']     = 
lang('create folder');
+                                       $data['create_file']            = 
array('widget' => array('type' => 'text',
+                                                                               
                                                'name' => 'createfile',
+                                                                               
                                                'maxlength' => '255',
+                                                                               
                                                'size' => '15'
+                                                                               
        ));
+                                       $data['img_create_file']        = 
array('widget' => array('type' => 'img',
+                                                                               
                                                        'src' => 
$GLOBALS['phpgw']->common->image($this->bofilemanager->appname,'filenew'),
+                                                                               
                                                        'title' => lang('create 
file'),
+                                                                               
                                                        'name'  => 
'params[newfile]',
+                                                                               
                                                        'caption' => 
$this->build_help('create_file')
+                                                                               
                ));
+                                       $data['lang_create_file']       = 
lang('create file');
+                               }
+
                                if (strlen($this->bofilemanager->errors))
                                {
                                        $data['errors'] = 
$this->bofilemanager->errors;
@@ -943,8 +907,11 @@
                                        $data['uploads'] = 
$this->display_uploads();
                                }

-                               $data['lang_show']      = lang('show');
+                               $data['lang_show']                      = 
lang('show');
                                $data['lang_upload_fields']     = lang('upload 
fields');
+                               $data['lang_upload_files']      = lang('upload 
files');
+                               $data['lang_file']                      = 
lang('file');
+                               $data['lang_comment']           = 
lang('comment');

                                $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('index' => $data));
                        }

====================================================
Index: filemanager/inc/class.uiaction_base.inc.php
diff -u filemanager/inc/class.uiaction_base.inc.php:1.1 
filemanager/inc/class.uiaction_base.inc.php:1.2
--- filemanager/inc/class.uiaction_base.inc.php:1.1     Tue Mar  4 00:04:06 2003
+++ filemanager/inc/class.uiaction_base.inc.php Fri Jan 21 01:41:05 2005
@@ -8,7 +8,6 @@
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
                        unset($GLOBALS['phpgw_info']['flags']['noappheader']);
                        unset($GLOBALS['phpgw_info']['flags']['noappfooter']);
-                       //$GLOBALS['phpgw']->common->phpgw_header();
                }

                function action_link($action)
@@ -25,4 +24,4 @@
        }


-?>
\ No newline at end of file
+?>

====================================================
Index: filemanager/inc/class.bofilemanager.inc.php
diff -u filemanager/inc/class.bofilemanager.inc.php:1.6 
filemanager/inc/class.bofilemanager.inc.php:1.7
--- filemanager/inc/class.bofilemanager.inc.php:1.6     Mon May 26 21:35:46 2003
+++ filemanager/inc/class.bofilemanager.inc.php Fri Jan 21 01:41:05 2005
@@ -6,7 +6,8 @@

        class bofilemanager
        {
-               var $public_functions = array(
+               var $public_functions = array
+               (
                        'delete'        => True
                );

@@ -32,9 +33,9 @@
                var $move;
                var $download;
                var $createdir;
-               var $newdir;
                var $createfile;
-               var $newfile;
+
+               var $params = array();

                var $fileman = Array();
                var $changes = Array();
@@ -55,12 +56,11 @@
                var $now;
                var $matches;

-//             var $debug = True;
+       //      var $debug = True;
                var $debug = False;

                function bofilemanager()
                {
-
                        $this->vfs = CreateObject('phpgwapi.vfs');
                        $to_decode = Array(
                                /*
@@ -99,10 +99,11 @@
                                'copy',
                                'move',
                                'download',
-                               'newfile',
+                               //'newfile',
                                'createfile',
-                               'newdir',
-                               'createdir'
+                               //'newdir',
+                               'createdir',
+                               'params'
                        );

                        $c_to_decode = count($to_decode);
@@ -115,7 +116,8 @@
                        $this->fakebase = $this->vfs->fakebase;
                        $this->appname = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->settings = 
$GLOBALS['phpgw_info']['user']['preferences'][$this->appname];
-
+                       $this->so       = 
CreateObject('filemanager.sofilemanager');
+
                        if(stristr($this->rootdir,PHPGW_SERVER_ROOT))
                        {
                                $this->filesdir = 
substr($this->rootdir,strlen(PHPGW_SERVER_ROOT));
@@ -135,9 +137,8 @@
                                define('NULL','');
                        }

-                       $this->so = CreateObject('filemanager.sofilemanager');
-
-                       $this->file_attributes = Array(
+                       $this->file_attributes = Array
+                       (
                                'name' => 'Filename',
                                'deletable' => 'Deletable',
                                'mime_type' => 'MIME Type',
@@ -267,7 +268,7 @@

                function initialize_vars($name)
                {
-                       $var = get_var($name,Array('GET','POST'));
+                       $var = get_var($name,Array('GET','POST','POST'));

                        //to get the file uploads, without requiring 
register_globals in php.ini
                        if(phpversion() >= '4.2.0')
@@ -288,6 +289,8 @@
                        }
                        if(is_array($this->$name) && $var)
                        {
+                               //_debug_array($var);
+
                                $temp = Array();
                                while(list($varkey,$varvalue) = each($var))
                                {
@@ -308,6 +311,7 @@
                        if(isset($temp))
                        {
                                $this->$name = $temp;
+                               //_debug_array($this->$name);
                        }
                }

@@ -666,9 +670,9 @@
                function f_newfile()
                {
                        $result = Array();
-                       //echo "newfile: ".$this->newfile ." createfile: 
".$this->createfile;
+                       //echo "newfile: ".$this->params['newfile'] ." 
createfile: ".$this->createfile;
                        //die();
-                       if ($this->newfile && $this->createfile)
+                       if ($this->params['newfile'] && $this->createfile)
                        {
                                if($badchar = 
$this->bad_chars($this->createfile,True,True))
                                {
@@ -693,12 +697,11 @@
                        }
                        else
                        {
-
                                $result[] = lang('filename not provided!');
                        }
                        return $result;
                }
-
+
                function f_upload()
                {
                        $result = Array();






reply via email to

[Prev in Thread] Current Thread [Next in Thread]