diff --git a/include/application.php b/include/application.php index b48492b..c6fdfa2 100644 --- a/include/application.php +++ b/include/application.php @@ -40,6 +40,7 @@ class Application { AND appFamily.appId = ".$iAppId; if($hResult = query_appdb($sQuery)) { + $this->aVersionsIds = array(); while($oRow = mysql_fetch_object($hResult)) { if(!$this->iAppId) @@ -205,7 +206,7 @@ class Application { LIMIT 1"; if($hResult = query_appdb($sQuery)) { - foreach($aVersionsIds as $iVersionId) + foreach($this->aVersionsIds as $iVersionId) { $oVersion = new Version($iVersionId); $oVersion->delete($bSilent); diff --git a/include/version.php b/include/version.php index 02a09f1..17fb55c 100644 --- a/include/version.php +++ b/include/version.php @@ -60,6 +60,7 @@ class Version { /* * We fetch notesIds. */ + $this->aNotesIds = array(); $sQuery = "SELECT noteId FROM appNotes WHERE versionId = ".$iVersionId; @@ -89,6 +90,8 @@ class Version { /* * We fetch screenshotsIds and urlsIds. */ + $this->aScreenshotsIds = array(); + $this->aUrlsIds = array(); $sQuery = "SELECT id, type FROM appData WHERE versionId = ".$iVersionId; @@ -100,7 +103,7 @@ class Version { if($oRow->type="image") $this->aScreenshotsIds[] = $oRow->id; else - $this->aNotesIds[] = $oRow->id; + $this->aUrlsIds[] = $oRow->id; } } }