Commit Graph

55 Commits

Author SHA1 Message Date
Ralf Becker
8d8f89d171 * Filemanager: fix since PHP 5.5.18 not longer working non-ascii chars in filenames, eg. German umlauts or accents 2014-10-23 13:39:21 +00:00
Ralf Becker
7666292284 no need to manually (un)serialize vfs_fstab and detect old php serialize and new json_encoded values 2014-06-27 07:48:44 +00:00
Ralf Becker
48fd2113f3 some long running operations, eg. merge-print, run into situation that DB closes our separate sqlfs connection, we try now to reconnect once 2013-08-05 14:59:31 +00:00
Ralf Becker
7e8db9b2fe urlencode password to cope with url special chars like forward slash or @ in passwords 2013-06-03 19:32:26 +00:00
Ralf Becker
4c060a5889 * Filemanager: introduced maximum symlink depth of 10, to stop infinit recursion in circular symlinks (eg. two symlinks pointing to each other) 2013-01-24 14:26:02 +00:00
Ralf Becker
89a10f6234 * Filemanager/WebDAV: fixed not working Subscribtions (Notifications) when using WebDAV, caused by PHPs internal stat-cache 2012-08-14 13:55:02 +00:00
Ralf Becker
1e4c845aab call notification hook for unlink/rmdir only after successful removal, but with (not longer existing) stat data 2012-04-19 13:18:00 +00:00
Ralf Becker
7d8347cd34 * Filemanager: allow WebDAVs (https) via PEAR HTTP_WebDAV_Client 2012-01-11 21:24:54 +00:00
Klaus Leithoff
39fc5ab48e mending Warnings: Cannot use a scalar value as an array 2011-12-20 15:52:27 +00:00
Ralf Becker
8ab9b0d2f2 allow to use homedirectory attribute from LDAP or ADS authentication for VFS mounts 2011-11-15 12:43:59 +00:00
Ralf Becker
08aca8ff51 allow to use LDAP homeDirectory attribute as $home in mount-url 2011-11-15 06:56:32 +00:00
Ralf Becker
389486793d - config is now cached on instance level
- arrays in $GLOBALS[egw_info][server] are now automatically serialized and unserialized
- new static method to check if user is export-limit excepted
--> saves to query it on each request (for non-phpgwapi, which was already cached in the session)
2011-08-26 13:50:20 +00:00
Ralf Becker
bd7407ed88 - fixed bug in egw_vfs::check_access for a user different from current one: need to clear the stat-cache after the call too, as the next call might be the regular user again!
- new method egw_vfs::copy_uploaded() to copy a file into vfs and set properties (eg. the comment), while treating the whole operation notification-wise atomar (one notification about an added file).
- using that method for egw_link too
- fixed egw_link not displaying comments
2011-06-28 20:43:47 +00:00
Ralf Becker
7282d42f52 - added hooks to general vfs methods to allow apps to monitore file access, creating, modification, removal
- new $user parameter for egw_vfs::check_access($path, $check, $stat=null, $user=null) to check access to a file for a user, who is NOT the current user
2011-06-23 18:34:47 +00:00
Ralf Becker
34ada0535c fixing problem under windows: dirname("/something") === "\\", with which EGroupware VFS can NOT work, using now egw_vfs::dirname 2011-06-14 07:31:33 +00:00
Ralf Becker
2777c78d74 new mount option for filesystem streamwrapper to specify a download url, to be used instead of default webdav.php download, eg. if mounted directory is already in the docroot or mapped via an alias 2010-09-07 11:05:20 +00:00
Ralf Becker
2181c9ca9e fixing the fix: for mountpoints we have to check the url or what is mounted and not the url of the mountpoint 2010-06-15 10:33:39 +00:00
Ralf Becker
dc0cee3d95 also remove mountpoints the user has no read access to from directory listings, eg. enabling versioning for an other user 2010-06-14 13:04:08 +00:00
Ralf Becker
6fd418b27e fixed PHP Fatal error: Declaration of vfs_stream_wrapper::url_stat() must be compatible with that of iface_stream_wrapper::url_stat() 2010-05-22 11:00:54 +00:00
Ralf Becker
aedaf485b3 fixed bug egw.stylite.de#8079: new symlinks in /apps not visible on same request 2010-05-22 08:41:26 +00:00
Andreas Stöckel
892db7c0f2 Resolved problem with some directories that cannot be opened if they contain a symlink, due to a problem with vfs_stream_wrapper::check_symlink_components, which returned that a path doesn't have a symlink in it caused by to the vfs_stream_wrapper internal symlink_cache 2010-05-19 09:01:53 +00:00
Ralf Becker
b59a688fbb - fixed not working rename in entry directories in /apps (eg. rename of
an infolog attachment), was caused by use of url_stat from sqlfs
  instead of links stream wrapper
- fixed wrong mime type / icon in files stored via netdrive from msword
  (the first use the extension .tmp, before renaming file to .doc:
  sqlfs "detects" mime type only from the extension and did not recheck
  it if a file gets renamed, that's now fixed)
2009-12-01 14:51:13 +00:00
Ralf Becker
691cc6bb3e we need to first check if the constant is defined, as we get a fatal error in php5.3 otherwise 2009-11-30 20:29:01 +00:00
Ralf Becker
c8b795fe83 if file is moved from one filesystem / wrapper to an other --> copy it
(rename fails cross wrappers)
2009-11-28 15:23:26 +00:00
Ralf Becker
078edd98fd Fixed SQL error now giving an exception: it's caused by
vfs_stream_wrapper::get_path() returning an url without path
(sqlfs://default <-- no trailing slash), which causes
sqlfs_stream_wrapper::url_stat() to be called for an empty path, which
gives the sql error.
2009-07-01 18:03:46 +00:00
Ralf Becker
09c0854173 "$stat[url] contains the reloved symlink" 2009-05-11 20:45:29 +00:00
Ralf Becker
b296a97e31 always remove only our own scheme, as mounts require the other schemes to be kept 2009-04-30 11:21:56 +00:00
Ralf Becker
ecd9354d1d "fixed failed move or rename via WebDAV (eg. NetDrive on Windows):
trailing slashes added to all collections caused a rename to an empty filename
--> all training slashes get now removed prior to calling any backend functions"
2009-04-30 07:46:53 +00:00
Ralf Becker
6f556a23df "remove trailing slash, eg. from webdav" 2009-04-27 13:08:42 +00:00
Ralf Becker
f12a0dc307 making whole mime_magic class static, for easier use and better caching by byte code caches 2009-04-17 06:25:33 +00:00
Ralf Becker
bd8ba08bc3 allowing stream-wrappers to specify an other mime-type for directories 2009-04-08 09:54:13 +00:00
Ralf Becker
fcb8f3497c Finally fixed creation and rename of home directories:
- egw_vfs::stat and egw_vfs_stream_wrapper::url_stat now both have a
  parameter $try_create_home=false, which do not create a non-existing
  home-directory by default.
- filemanger_ui calls egw_vfs::stat($path,true) to create an evtl.
  missing home dir (in case it does not exist because of previous
  problems)
--> fixes not working home-dir creation or rename, because url_stat
    already tried to create the home-dir
2009-04-06 13:46:45 +00:00
Ralf Becker
b1f0863d81 A scheme is not allowed to contain an underscore, but allows a dot and a
class names only allow or need underscores, but no dots
--> we replace dots in scheme with underscored to get the class-name
2009-04-01 14:08:20 +00:00
Ralf Becker
637b6557fb "- symlinkCache_resolve failed on other mounted dir (eg. from the filesystem stream-wrapper), as it removed the scheme
--> now done only for vfs scheme
- quitened readlink to not complain if backend does not support links"
2009-03-31 08:43:12 +00:00
Ralf Becker
873ee33dc7 "- fixed not working symlinks to other symlinks
- added a symlink cache (only per request) to cut down db accesses"
2009-03-30 11:18:58 +00:00
Ralf Becker
881225849d "fixed not shown comments and other properties, if path contained a symlink" 2009-03-27 19:03:29 +00:00
Ralf Becker
b54d0dab25 "fixed invinit recursion (causing a segfault) when trying to create a home directory" 2009-03-27 17:39:37 +00:00
Ralf Becker
5501dd0fc3 "fixed some problem with the new symlinks (specially between different stream-wrappers) and added a permanent loggin facility" 2009-03-24 13:58:01 +00:00
Ralf Becker
55d2aaa3ee Implemented symlinks for eGW's VFS:
- sqlfs can store now symlinks (implements symlink and readlink)
- vfs resolves symlinks before calling a mounted stream-wrapper
--> symlinks can be between different mount-points
- filemanger can create symlinks and follows them
- etemplate vfs_widget displays symlinks (to be improved)
Happy testing :-)
2009-03-19 20:12:35 +00:00
Klaus Leithoff
be859fa1f6 fixing various webdav problems, regarding pathbuilding 2009-01-29 18:58:52 +00:00
Ralf Becker
2e66d3b093 "use a default for the host in resolve_url, as we otherwise get an invalid url (scheme:///path/to/something)!
"
2008-10-14 14:57:35 +00:00
Ralf Becker
0a7d4f9782 Comment and custom fields for filemanager / sqlfs 2008-10-05 17:07:36 +00:00
Ralf Becker
e76f20f665 New stream-wrapper to mount the regular filesystem into the vfs while
allowing to set an arbitrary uid, gid and mode for the vfs (like
mounting a dos Filesystem under Linux).
Can be used to mount eg. an upload dir writable only by Admins:
filemanger/cli.php mount --user root_admin --password whatever \
        filesystem://dummy/var/www/html/uploads?group=Admins&mode=075 \
        /uploads
Please note that you can NOT use filesystem:/something!
Fixed the vfs-classes to deal correctly with get-parameters used as
mount-options.
2008-09-30 11:52:56 +00:00
Ralf Becker
48352f6963 "dont return mountpoints (like eg. /apps) twice" 2008-05-10 21:47:16 +00:00
Ralf Becker
b08b584a76 silently add home dirs, if they dont exist (they get now created by a hook, when a user/group get added 2008-04-19 09:46:58 +00:00
Ralf Becker
13cf2edabb use default fstab, also for an empty one 2008-04-19 09:13:50 +00:00
Ralf Becker
501df49cbb stream wrapper interface is now eGW VFS interface
- if you already run the 1.5.003 update (AND modified anything in the VFS), you have to re-run it, to not loose your modifications or risk an inconsistent VFS (DB does not match filesystem)
- to re-run the 1.5.003 update (only if your version is already 1.5.003 or bigger!) run the following sql:
UPDATE egw_applications SET app_version=1.5.002 WHERE app_name=phpgwapi
- the new vfs supports now an extended ACL, if that is supported by the backend (sqlfs only currently)
- eacl allows to set separate recursive acl rights for different users or groups on a directory (and subdirs)
- former group grants of group dirs are converted to eacl, thought we only support read or read+write access (no extra add or delete)
- attachments via the links class now also use a stream wrapper interface (links_stream_wrapper) and WebDAV as download handler (which requires no longer filemanager run rights)
2008-04-14 05:52:24 +00:00
Ralf Becker
b98808f87f "added todo's (concept) for extended ACL, WebDAV properties and locks" 2008-03-18 13:17:13 +00:00
Ralf Becker
b638e9117b set old vfs as default again for easier testing of the new UI 2008-03-03 12:17:08 +00:00
Ralf Becker
4df4fd9f06 first work on UI for a new filemanager and some vfs bugfixes and improvments 2008-03-02 21:44:15 +00:00