phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] filemanager/inc hook_preferences.inc.php, 1.12 hook_d


From: ceb
Subject: [Phpgroupware-cvs] filemanager/inc hook_preferences.inc.php, 1.12 hook_deleteaccount.inc.php, 1.4 hook_admin.inc.php, 1.4 class.uifilemanager.inc.php, 1.7 hook_add_def_pref.inc.php, 1.8
Date: Thu, 24 Feb 2005 14:55:14 -0000

Update of filemanager/inc

Modified Files:
     Branch: MAIN
            hook_preferences.inc.php lines: +8 -10
            hook_deleteaccount.inc.php lines: +14 -48
            hook_admin.inc.php lines: +1 -6
            class.uifilemanager.inc.php lines: +9 -11
            hook_add_def_pref.inc.php lines: +17 -17

Log Message:
update to last head version, need to merge the changes from 16

====================================================
Index: filemanager/inc/hook_preferences.inc.php
diff -u filemanager/inc/hook_preferences.inc.php:1.11 
filemanager/inc/hook_preferences.inc.php:1.12
--- filemanager/inc/hook_preferences.inc.php:1.11       Thu Dec 30 09:17:57 2004
+++ filemanager/inc/hook_preferences.inc.php    Tue Jan 18 16:47:53 2005
@@ -1,9 +1,5 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * http://www.phpgroupware.org                                              *
-  * Written by Joseph Engo <address@hidden>                          *
-  * --------------------------------------------                             *
+  /**************************************************************************\ 
                  *
   *  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  *
@@ -12,12 +8,14 @@

   /* $Id$ */
 {
-// Only Modify the $file and $title variables.....
-       $title = $appname;
+
        $file = Array(
-               lang('Preferences')     => 
$GLOBALS['phpgw']->link('/filemanager/preferences.php')
+                       'Preferences' => 
$GLOBALS['phpgw']->link('/preferences/preferences.php',array(
+                               'appname' =>$appname,
+                               'type' => 'user')
+                       )
        );
 //Do not modify below this line
-       display_section($appname,$title,$file);
+       display_section($appname,$file);
 }
 ?>

====================================================
Index: filemanager/inc/hook_deleteaccount.inc.php
diff -u filemanager/inc/hook_deleteaccount.inc.php:1.3 
filemanager/inc/hook_deleteaccount.inc.php:1.4
--- filemanager/inc/hook_deleteaccount.inc.php:1.3      Thu Dec 30 09:17:57 2004
+++ filemanager/inc/hook_deleteaccount.inc.php  Tue Jan 18 16:47:53 2005
@@ -9,54 +9,20 @@
   *  option) any later version.                                              *
   \**************************************************************************/
        /* $Id$ */
-
-       /* Needs more work - skwashd
-       $GLOBALS['phpgw']->vfs = createObject('phpgwapi.vfs');
-
-       $GLOBALS['phpgw']->vfs->fakebase        = 
$GLOBALS['phpgw_info']['server']['files_dir'];
-       $GLOBALS['phpgw']->vfs->working_id      = $_POST['account_id'];
-       $GLOBALS['phpgw']->vfs->working_lid     = 
$GLOBALS['phpgw']->accounts->id2name($_POST['account_id']);
+       /*
+       global $phpgw;
+       global $account_id;
+       */
+       /* NOTE: This is untested */
+       /* WIP: it should get all files owned by $account_id, not just in 
/home/account_id */
+       /* Should also be capable of transfering files to another user */

-
-       if(false)// @isset($_POST['new_owner']) && intval($_POST['new_owner']) )
+/*
+       $phpgw->vfs->working_id = $account_id;
+       $ls_array = $phpgw->vfs->ls ($phpgw->vfs->fakebase . "/" . $account_id, 
array (RELATIVE_NONE));
+       while (list ($num, $entry) = each ($ls_array))
        {
-               $ls_array = array();
-               $ls_array = $GLOBALS['phpgw']->vfs->ls(
-                       array(
-                               'string'        => '/',
-                               'checksubdirs'  => True,
-                               'relatives'     => array (RELATIVE_ROOT)
-                       )
-               );
-
-               if( count($ls_array) > 1 )//root dir is 1
-               {
-                       foreach ($ls_array as $num => $entry)
-                       {
-                               if( $entry['owner_id'] == 
$GLOBALS['account_id'] )
-                               {
-                                       echo "<pre>$num => "; print_r($entry); 
echo "</pre><br />\n";
-                                       $ok = 
$GLOBALS['phpgw']->vfs->set_attributes(
-                                               array(
-                                                       'string'        => 
$entry['directory'] .'/'
-                                                                               
. $entry['name'],
-                                                       'attributes'    => 
array('owner_id' => $_POST['new_owner']),
-                                                       'relatives'     => 
array(RELATIVE_ROOT)
-                                               )
-                                       );
-                                       if(!$ok)
-                                       {
-                                               echo 'NQR changing: ' . 
$entry['directory'] .'/'. $entry['name'] . "<br />\n";
-                                       }
-                               }
-                       }
-               }
+               $phpgw->vfs->rm ($entry["dir"] . "/" . $entry["name"], array 
(RELATIVE_NONE));
        }
-       else
-       {
-               //delete from journal but not from disk - too many risks - 
skwashd
-               $GLOBALS['phpgw']->db->query('DELETE FROM phpgw_vfs'
-                                       . ' WHERE owner_id = ' .  
intval($_POST['account_id']), __LINE__, __FILE__);
-       }
-       */
+*/
 ?>

====================================================
Index: filemanager/inc/hook_admin.inc.php
diff -u filemanager/inc/hook_admin.inc.php:1.3 
filemanager/inc/hook_admin.inc.php:1.4
--- filemanager/inc/hook_admin.inc.php:1.3      Thu Dec 30 09:17:57 2004
+++ filemanager/inc/hook_admin.inc.php  Tue Jan 18 16:47:53 2005
@@ -1,8 +1,3 @@
 <?php
-  $title = $appname;
-       $file = Array(
-               'edit quota' => 
$GLOBALS['phpgw']->link('/filemanager/admin.php')
-       );
-//Do not modify below this line
-       display_section($appname,$title,$file);
+
 ?>

====================================================
Index: filemanager/inc/class.uifilemanager.inc.php
diff -u filemanager/inc/class.uifilemanager.inc.php:1.6 
filemanager/inc/class.uifilemanager.inc.php:1.7
--- filemanager/inc/class.uifilemanager.inc.php:1.6     Tue Apr  8 20:47:38 2003
+++ filemanager/inc/class.uifilemanager.inc.php Tue Jan 18 16:47:52 2005
@@ -11,8 +11,6 @@
   *  Free Software Foundation; either version 2 of the License, or (at your  *
   *  option) any later version.                                              *
   \**************************************************************************/
-
-
   /* $Id$ */
   define('UI_DEBUG', 0);

@@ -69,7 +67,8 @@

                function uifilemanager()
                {
-                       $this->no_header();
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
+                       //$this->no_header();
                        $this->actions = CreateObject('filemanager.uiactions');
                        $this->bo = CreateObject('filemanager.bofilemanager');
                        $this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
@@ -91,20 +90,19 @@
                        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'));
-
+                       
//$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_info']['flags']['headonly'] = True;
                        $GLOBALS['phpgw']->xslttpl->add_file(array('widgets'));
-
-
                }
+
                function check_access()
                {
                        if($this->bo->path != $this->bo->homedir && 
$this->bo->path != $this->bo->fakebase && $this->bo->path != '/' && 
!$this->bo->vfs->acl_check(array(
@@ -737,13 +735,13 @@
                        //This lets you use an alternate xslt by appending 
&template=<name> to the url
                        if (!($template = get_var('template', array('GET', 
'POST'))) )
                        {
-                               
$GLOBALS['phpgw']->xslttpl->add_file(array('index',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                               
$GLOBALS['phpgw']->xslttpl->add_file(array('index',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','base')
 . SEP . 'app_header'));
                        }
                        else
                        {
                                $GLOBALS['phpgw']->xslttpl->add_file($template);
                        }
-
+
                        $files_array = $this->bo->load_files();

                        $usage = 0;

====================================================
Index: filemanager/inc/hook_add_def_pref.inc.php
diff -u filemanager/inc/hook_add_def_pref.inc.php:1.7 
filemanager/inc/hook_add_def_pref.inc.php:1.8
--- filemanager/inc/hook_add_def_pref.inc.php:1.7       Thu Dec 30 09:17:57 2004
+++ filemanager/inc/hook_add_def_pref.inc.php   Tue Jan 18 16:47:53 2005
@@ -2,22 +2,22 @@

 global $pref;

-$pref->change ("filemanager", "name", "True");
-$pref->change ("filemanager", "mime_type", "True");
-$pref->change ("filemanager", "size", "True");
-$pref->change ("filemanager", "created", "True");
-$pref->change ("filemanager", "modified", "True");
-//$pref->change ("filemanager", "owner", "False");
-$pref->change ("filemanager", "createdby_id", "True");
-$pref->change ("filemanager", "modifiedby_id", "True");
-//$pref->change ("filemanager", "app", "False");
-$pref->change ("filemanager", "comment", "True");
-//$pref->change ("filemanager", "viewinnewwin", "False");
-//$pref->change ("filemanager", "viewonserver", "False");
-$pref->change ("filemanager", "viewtextplain", True);
-//$pref->change ("filemanager", "dotdot", "False");
-//$pref->change ("filemanager", "dotfiles", "False");
-//$pref->change ("filemanager", "show_help", "False");
-$pref->change ("filemanager", "show_upload_boxes", "5");
+$pref->change ('filemanager', 'name', True);
+$pref->change ('filemanager', 'mime_type', False);
+$pref->change ('filemanager', 'size', True);
+$pref->change ('filemanager', 'created', True);
+$pref->change ('filemanager', 'modified', True);
+//$pref->change ('filemanager', 'owner', False);
+$pref->change ('filemanager', 'createdby_id', True);
+$pref->change ('filemanager', 'modifiedby_id', True);
+//$pref->change ('filemanager', 'app', False);
+$pref->change ('filemanager', 'comment', True);
+//$pref->change ('filemanager', 'viewinnewwin', False);
+//$pref->change ('filemanager', 'viewonserver', False);
+$pref->change ('filemanager', 'viewtextplain', True);
+//$pref->change ('filemanager', 'dotdot', False);
+//$pref->change ('filemanager', 'dotfiles', False);
+//$pref->change ('filemanager', 'show_help', False);
+$pref->change ('filemanager', 'show_upload_boxes', '5');

 ?>






reply via email to

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