<aclass="el"href="module__glue_8inc_8php.html">module_glue.inc.php</a> Main hotglue module<p>
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 <aclass="el"href="module__glue_8inc_8php.html#1dc65b69a920ac4ebc8f7c1df305060b">revisions_info()</a><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$a array to compare </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$b array to compare </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>int comparison result </dd></dl>
delete a file in the shared directory of a page<p>
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. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$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) </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>array response true if the file got deleted for good, false if not </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$args arguments key 'name' is the object name (i.e. page.rev.obj) </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>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 </dd></dl>
remove one or more attributes from an object in the content directory<p>
this function takes the object lock. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$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 </td></tr>
the function also appends the resulting string to the output in <aclass="el"href="html_8inc_8php.html">html.inc.php</a>. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$args arguments string 'name' is the object name (i.e. page.rev.obj) bool 'edit' are we editing or not </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>array response html </dd></dl>
the function also appends the resulting string to the output in <aclass="el"href="html_8inc_8php.html">html.inc.php</a>. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$args arguments key 'page' is the page (i.e. page.rev) key 'edit' are we editing or not </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>array response html </dd></dl>
return an array with informations about all revisions of a page<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$args arguments key 'pagename' is the pagename (i.e. page) key 'sort' can be either 'time' (descending) or 'name' (ascending, the default) </td></tr>
use <aclass="el"href="module__glue_8inc_8php.html#4aed316adcde13b40c9fc1b35e6537a4">update_object()</a> whenever possible as we want to preserve any object metadata that is stored in as attributes. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$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 </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$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) </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>array response (holding the page of the newly created revision if successful) </dd></dl>
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. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$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 </td></tr>
list all objects referencing a certain file in the shared directory<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>array</em> </td><td>$args arguments key 'pagename' is the pagename (i.e. page) key 'file' filename of file in the shared directory key 'stop_after' n references </td></tr>
</table>
</dl>
<dlclass="return"compact><dt><b>Returns:</b></dt><dd>array response array of objects (i.e. page.rev.obj) </dd></dl>
</div>
</div><p>
</div>
<hrsize="1"><addressstyle="text-align: right;"><small>Generated on Thu Dec 2 16:37:34 2010 for hotglue by