Go to the source code of this file.
Functions | |
_cmp_time ($a, $b) | |
_obj_lock ($name, $wait=true) | |
_obj_unlock ($f) | |
check_auto_snapshot ($args) | |
clone_object ($args) | |
create_object ($args) | |
create_page ($args) | |
delete_object ($args) | |
delete_page ($args) | |
delete_upload ($args) | |
get_startpage ($args) | |
load_object ($args) | |
object_get_symlink ($args) | |
object_make_symlink ($args) | |
object_remove_attr ($args) | |
pagenames ($args) | |
render_object ($args) | |
render_page ($args) | |
rename_page ($args) | |
copy_page ($args) | |
revert ($args) | |
revisions ($args) | |
revisions_info ($args) | |
save_object ($args) | |
save_state ($args) | |
set_startpage ($args) | |
snapshot ($args) | |
update_object ($args) | |
upload_files ($args) | |
upload_references ($args) |
_cmp_time | ( | $ | a, | |
$ | b | |||
) |
helper function for revisions_info()
array | $a array to compare | |
array | $b array to compare |
Definition at line 33 of file module_glue.inc.php.
_obj_lock | ( | $ | name, | |
$ | wait = true | |||
) |
lock an object file
string | $name object name (i.e. page.rev.obj) | |
mixed | $wait false = give up right away, true = wait until successful, integer values = wait up to $wait ms |
Definition at line 51 of file module_glue.inc.php.
_obj_unlock | ( | $ | f | ) |
unlock an object file
mixed | $f lock handle (or anything on Win32) |
Definition at line 105 of file module_glue.inc.php.
check_auto_snapshot | ( | $ | args | ) |
create and delete auto- revisions
this function operates on a specific page and takes SNAPSHOT_MIN_AGE and SNAPSHOT_MAX_AGE into account.
array | $args arguments key 'page' is the page (i.e. page.rev) |
Definition at line 131 of file module_glue.inc.php.
clone_object | ( | $ | args | ) |
duplicate an object
array | $args arguments key 'name' name of the object to duplicate |
Definition at line 194 of file module_glue.inc.php.
copy_page | ( | $ | args | ) |
copy a page original page revisions are left out
array | $args arguments key 'old' old page (i.e. page1.rev) key 'new' new page (i.e. page2.rev) |
Definition at line 943 of file module_glue.inc.php.
create_object | ( | $ | args | ) |
create an empty object in the content directory
array | $args arguments key 'page' is the page (i.e. page.rev) |
Definition at line 235 of file module_glue.inc.php.
create_page | ( | $ | args | ) |
create a page
array | $args arguments key 'page' is the page (i.e. page.rev) |
Definition at line 276 of file module_glue.inc.php.
delete_object | ( | $ | args | ) |
delete an object from the content directory
array | $args arguments key 'name' is the object name (i.e. page.rev.obj) |
Definition at line 325 of file module_glue.inc.php.
delete_page | ( | $ | args | ) |
delete a page
array | $args arguments key 'page' is the page (i.e. page.rev) |
Definition at line 377 of file module_glue.inc.php.
delete_upload | ( | $ | args | ) |
delete a file in the shared directory of a page
this function only deletes the file when there are no references to it left. this is not meant to be called directly from the frontend, but modules should use it when implementing delete_object.
array | $args arguments key 'pagename' is the pagename (i.e. page) key 'file' filename of file in the shared directory key 'max_cnt' delete the file if there are <= max_cnt references (defaults to zero) |
Definition at line 459 of file module_glue.inc.php.
get_startpage | ( | $ | args | ) |
get the startpage
array | $args unused |
Definition at line 500 of file module_glue.inc.php.
load_object | ( | $ | args | ) |
load an object from the content directory
array | $args arguments key 'name' is the object name (i.e. page.rev.obj) |
Definition at line 520 of file module_glue.inc.php.
object_get_symlink | ( | $ | args | ) |
return the target of an object symlink
array | $args arguments key 'name' is the object name (i.e. page.rev.obj) |
Definition at line 587 of file module_glue.inc.php.
object_make_symlink | ( | $ | args | ) |
create a symlink pointing to an object in all other pagename's head revisions
array | $args arguments key 'name' is the object name (i.e. page.rev.obj) |
Definition at line 617 of file module_glue.inc.php.
object_remove_attr | ( | $ | args | ) |
remove one or more attributes from an object in the content directory
this function takes the object lock.
array | $args arguments key 'name' is the object name (i.e. page.rev.obj) key 'attr' is either a string or an array containing the attribute names (keys) to remove |
Definition at line 690 of file module_glue.inc.php.
pagenames | ( | $ | args | ) |
return an array of all pagenames in the content directory
array | $args unused |
Definition at line 742 of file module_glue.inc.php.
rename_page | ( | $ | args | ) |
rename a page
array | $args arguments key 'old' old page (i.e. page1.rev) key 'new' new page (i.e. page2.rev) |
Definition at line 896 of file module_glue.inc.php.
render_object | ( | $ | args | ) |
turn an object into an html string
the function also appends the resulting string to the output in html.inc.php.
array | $args arguments string 'name' is the object name (i.e. page.rev.obj) bool 'edit' are we editing or not |
Definition at line 780 of file module_glue.inc.php.
render_page | ( | $ | args | ) |
turn a page into an html string
the function also appends the resulting string to the output in html.inc.php.
array | $args arguments key 'page' is the page (i.e. page.rev) key 'edit' are we editing or not |
Definition at line 833 of file module_glue.inc.php.
revert | ( | $ | args | ) |
revert to a specific revision of a page
this function makes the revision the page's new head revision by copying it.
array | $args arguments key 'page' page to revert to (i.e. page.rev) |
Definition at line 1011 of file module_glue.inc.php.
revisions | ( | $ | args | ) |
return an array of all revisions of a page
array | $args arguments key 'pagename' is the pagename (i.e. page) |
Definition at line 1077 of file module_glue.inc.php.
revisions_info | ( | $ | args | ) |
return an array with information about all revisions of a page
array | $args arguments key 'pagename' is the pagename (i.e. page) key 'sort' can be either 'time' (descending) or 'name' (ascending, the default) |
Definition at line 1116 of file module_glue.inc.php.
save_object | ( | $ | args | ) |
save an object to the content directory
use update_object() whenever possible as we want to preserve any object metadata that is stored in as attributes.
array | $args arguments key 'name' is the object name (i.e. page.rev.obj) key 'content' is the object's content all other key/value pairs are treated as attributes |
Definition at line 1162 of file module_glue.inc.php.
save_state | ( | $ | args | ) |
save the state of a html element corresponding to an object to disk
this function takes the object lock.
array | $args arguments key 'html' one html element |
Definition at line 1218 of file module_glue.inc.php.
set_startpage | ( | $ | args | ) |
set the startpage
array | $args arguments key 'page' is the page (i.e. page.rev) |
Definition at line 1274 of file module_glue.inc.php.
snapshot | ( | $ | args | ) |
create a snapshot from a page
array | $args arguments key 'page' page to shapshot (i.e. page.rev) key 'rev' (optional) new revision name (i.e. rev2) (if empty or not set a revision starting with 'auto-' and the current date will be created) |
Definition at line 1304 of file module_glue.inc.php.
update_object | ( | $ | args | ) |
update an object
this function merges the attributes in $args with the object already on disk. the object need not exist before, though. this function takes the object lock.
array | $args arguments key 'name' is the object name (i.e. page.rev.obj) key 'content' is the object's content all other key/value pairs are treated as attributes |
Definition at line 1402 of file module_glue.inc.php.
upload_files | ( | $ | args | ) |
upload one or more files
array | $args arguments key 'page' page to upload the files to (i.e. page.rev) key 'preferred_module' (optional) try first to invoke the upload method on this module |
Definition at line 1442 of file module_glue.inc.php.
upload_references | ( | $ | args | ) |
list all objects referencing a certain file in the shared directory
array | $args arguments key 'pagename' is the pagename (i.e. page) key 'file' filename of file in the shared directory key 'stop_after' n references |
Definition at line 1525 of file module_glue.inc.php.