\hyperlink{module__glue_8inc_8php}{module\_\-glue.inc.php} Main hotglue module
Copyright Gottfried Haider, Danja Vasiliev 2010. This source code is licensed under the GNU General Public License. See the file COPYING for more details. helper function for \hyperlink{module__glue_8inc_8php_1dc65b69a920ac4ebc8f7c1df305060b}{revisions\_\-info()}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em array}]\$a array to compare \item[{\em array}]\$b array to compare \end{description}
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. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em 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) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]array response true if the file got deleted for good, false if not \end{Desc}
\item[{\em array}]\$args arguments key 'name' is the object name (i.e. page.rev.obj) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]array response key 'data' either has the target as object name, an empty string if the target is outside the content directory or false if the object is no symlink \end{Desc}
remove one or more attributes from an object in the content directory
this function takes the object lock. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em 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 \end{description}
return an array with informations about all revisions of a page
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em array}]\$args arguments key 'pagename' is the pagename (i.e. page) key 'sort' can be either 'time' (descending) or 'name' (ascending, the default) \end{description}
use \hyperlink{module__glue_8inc_8php_4aed316adcde13b40c9fc1b35e6537a4}{update\_\-object()} whenever possible as we want to preserve any object metadata that is stored in as attributes. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em 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 \end{description}
\item[{\em 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) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]array response (holding the page of the newly created revision if successful) \end{Desc}
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. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em 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 \end{description}
list all objects referencing a certain file in the shared directory
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em 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 \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]array response array of objects (i.e. page.rev.obj) \end{Desc}