ChangeSet ID: 31332
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/08/21 21:52:08
Modified files:
include : objectManager.php
Log message:
Chris Morgan <cmorgan(a)alum.wpi.edu>
Add a 'move children' link to the object editing pages, if we have permission to move the
entries
Patch: http://cvs.winehq.org/patch.py?id=31332
Old revision New revision Changes Path
1.47 1.48 +16 -8 appdb/include/objectManager.php
Index: appdb/include/objectManager.php
diff -u -p appdb/include/objectManager.php:1.47 appdb/include/objectManager.php:1.48
--- appdb/include/objectManager.php:1.47 22 Aug 2007 2:52: 8 -0000
+++ appdb/include/objectManager.php 22 Aug 2007 2:52: 8 -0000
@@ -296,6 +296,9 @@ class ObjectManager
echo html_frame_end();
} else
{
+ // display the move children entry
+ $this->displayMoveChildren($oObject);
+
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
echo '<input name="sSubmit" type="submit" value="Submit" class="button">'.
' ',"\n";
@@ -461,25 +464,30 @@ class ObjectManager
"now</a>, it only takes a few seconds.");
}
-
- /* View an entry */
- function view($sBackLink)
+ function displayMoveChildren($oObject)
{
- $this->checkMethods(array("display"));
-
- $oObject = new $this->sClass($this->iId);
-
/* Display a link to the move child objects page if the class has the necessary
functions and the user has edit rights. Not all classes have child objects. */
if(method_exists($oObject, "objectMoveChildren") &&
method_exists($oObject, "objectGetId") && $oObject->canEdit())
{
echo "<a href=\"".$this->makeUrl("showMoveChildren", $this->iId,
- "Move Child Objects")."\">Move child objects</a><br /><br />\n";
+ "Move Child Objects")."\">Move child objects</a>\n";
}
+ }
+
+ /* View an entry */
+ function view($sBackLink)
+ {
+ $this->checkMethods(array("display"));
+
+ $oObject = new $this->sClass($this->iId);
$oObject->display();
+ // display the move children entry
+ $this->displayMoveChildren($oObject);
+
echo html_back_link(1, $sBackLink);
}