From f7ae814cbb89303625cf0e2d3b70e61e6dd67330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sat, 12 May 2007 16:34:28 +0000 Subject: [PATCH] Implement vendor::objectMoveChildren() --- include/vendor.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/vendor.php b/include/vendor.php index 62f303b..f95a7d8 100644 --- a/include/vendor.php +++ b/include/vendor.php @@ -317,6 +317,29 @@ class Vendor { { return FALSE; } + + function objectMoveChildren($iNewId) + { + /* Keep track of how many children we have modified */ + $iCount = 0; + + foreach($this->aApplicationsIds as $iAppId) + { + $oApp = new application($iAppId); + $oApp->iVendorId = $iNewId; + if($oApp->update(TRUE)) + $iCount++; + else + return FALSE; + } + + return $iCount; + } + + function objectGetId() + { + return $this->iVendorId; + } } ?>