Add inline javascript to the output buffer.
string
addInlineScript
(string $script)
-
string
$script: The script text to add.
Generate the backend selection list for use in the menu.
string
backendSelect
()
Can we log in without a login screen for the requested backend key?
boolean
canAutoLogin
([string $key = null], [boolean $force = false])
-
string
$key: The backend key to check. Defaults to Gollem::getPreferredBackend().
-
boolean
$force: If true, check the backend key even if there is more than one backend.
Changes the current directory of the Gollem session based on the 'dir' form field.
mixed
changeDir
()
Change permissions on files using the current Gollem session settings.
mixed
changePermissions
(string $dir, string $name, string $permission)
-
string
$dir: The directory name.
-
string
$name: The filename to change permissions on.
-
string
$permission: The permission mode to set.
Check Gollem authentication and change to the currently active directory. Redirects to login page on authentication/session failure.
boolean
checkAuthentication
([string $mode = null], [boolean $redirect = true])
-
string
$mode: The authentication mode we are using.
-
boolean
$redirect: Redirect to the logout page if authentication is unsuccessful?
Checks if a user has the specified permissions on the selected backend.
boolean
checkPermissions
(string $filter, [integer $permission = PERMS_READ], [string $backend = null])
-
string
$filter: What are we checking for.
-
integer
$permission: What permission to check for.
-
string
$backend: The backend to check. If empty, check the current backend.
Copies a file using the current Gollem session settings.
mixed
copyFile
(string $backend_f, string $dir, string $name, string $backend_t, string $newdir)
-
string
$backend_f: The backend to copy the file from.
-
string
$dir: The directory name of the original file.
-
string
$name: The original filename.
-
string
$backend_t: The backend to copy the file to.
-
string
$newdir: The directory to copy the file to.
Create a folder using the current Gollem session settings.
mixed
createFolder
(string $dir, string $name)
-
string
$dir: The directory path.
-
string
$name: The folder to create.
Delete a file using the current Gollem session settings.
mixed
deleteFile
(string $dir, string $name)
-
string
$dir: The directory name.
-
string
$name: The filename to delete.
Delete a folder using the current Gollem session settings.
mixed
deleteFolder
(string $dir, string $name)
-
string
$dir: The subdirectory name.
-
string
$name: The folder name to delete.
Produces a directory link used for navigation.
string
directoryNavLink
(string $currdir, string $url)
-
string
$currdir: The current directory string.
-
string
$url: The URL to link to.
Parse the 'columns' preference.
array
displayColumns
()
Expire a folder cache entry.
void
expireCache
(string $dir)
-
string
$dir: The directory name.
Get the authentication ID to use for autologins based on the value of the 'hordeauth' parameter.
string
getAutologinID
(string $backend)
-
string
$backend: The backend to login to.
Get a list of the available backends for permissions setup.
array
&getBackends
([string $perms = 'all'])
-
string
$perms: 'all' - Return all backends. 'perms' - Return backends which have perms set. 'noperms' - Return backends which have no perms set.
Get the current directory of the Gollem session.
mixed
getDir
()
Generate the display path (the path with any root information stripped out).
string
getDisplayPath
(string $path)
-
string
$path: The path to display.
Get the home directory of the Gollem session.
string
getHome
()
Build Gollem's list of menu items.
mixed
getMenu
([string $returnType = 'object'])
-
string
$returnType: Either 'object' or 'string'.
Get the current preferred backend key.
string
getPreferredBackend
()
Get the root directory of the Gollem session.
string
getRoot
()
Return a Horde_VFS object for the given backend.
object The
&getVFSOb
(string $backend_key, [ $params = array()])
-
string
$backend_key: The backend_key VFS object to return.
-
$params
Take a fully qualified and break off the file or directory name.
This pair is used for the input to many VFS library functions.
array
getVFSPath
(string $fullpath)
-
string
$fullpath: Path to be split.
List the current folder.
array
listFolder
(string $dir)
-
string
$dir: The directory name.
Load the backends list into the global $gollem_backends variable.
void
loadBackendList
()
Generate an URL to the logout screen that includes any known information, such as username, server, etc., that can be filled in on the login form.
string
logoutUrl
()
Outputs Gollem's menu to the current output stream.
void
menu
()
Moves a file using the current Gollem session settings.
mixed
moveFile
(string $backend_f, string $dir, string $name, string $backend_t, string $newdir)
-
string
$backend_f: The backend to move the file from.
-
string
$dir: The directory name of the original file.
-
string
$name: The original filename.
-
string
$backend_t: The backend to move the file to.
-
string
$newdir: The directory to move the file to.
Print inline javascript to the output buffer.
string
outputInlineScript
()
Convert a Gollem path into a URL encoded string, but keep '/'.
This allows for proper PATH_INFO path parsing. Special care is taken to handle "+" and " ".
string
pathEncode
(string $path)
-
string
$path: Path to be urlencode()d.
Returns the canonical path of the string. Like PHP's built-in realpath() except the directory need not exist on the local server.
Algorithim loosely based on code from the Perl File::Spec::Unix module (version 1.5).
TODO: Remove once Gollem requires a minimum version of Horde that containts Util::realPath().
string
realPath
(string $path)
-
string
$path: A file path.
Rename files using the current Gollem session settings.
mixed
renameItem
(string $oldDir, string $old, string $newDir, $new)
-
string
$oldDir: Old directory name.
-
string
$old: New file name.
-
string
$newDir: New directory name.
-
$new
Changes the current directory of the Gollem session to the supplied value.
mixed
setDir
(string $dir)
-
string
$dir: Directory name.
Outputs Gollem's status/notification bar.
void
status
()
Cleans a path presented to Gollem's browse API call.
This will remove:
- leading '/'
- leading 'gollem'
- trailing '/'
The desired end result is the path including VFS backend.
string
stripAPIPath
(string $path)
-
string
$path: Path as presented to Gollem API.
Generate correct subdirectory links.
string
subdirectory
(string $base, string $dir)
-
string
$base: The base directory.
-
string
$dir: The directory string.
This function verifies whether a given directory is below the root.
boolean
verifyDir
(string $dir)
-
string
$dir: The directory to check.
Write an uploaded file to the VFS backend.
mixed
writeFile
(string $dir, string $name, string $filename)
-
string
$dir: The directory name.
-
string
$name: The filename to create.
-
string
$filename: The local file containing the file data.