diff --git a/include/appData.php b/include/appData.php index a4cbe2a..a831acd 100644 --- a/include/appData.php +++ b/include/appData.php @@ -94,25 +94,18 @@ class appData return TRUE; } - function update($bSilent = FALSE) + function update() { if(!$this->canEdit()) return FALSE; - $sQuery = "UPDATE appData SET versionId = '?', appId = '?', sDescription = '?' + $sQuery = "UPDATE appData SET versionId = '?', appId = '?', description = '?' WHERE id = '?'"; - $hResult = query_parameters($this->iVersionId, $this->iAppId, + $hResult = query_parameters($sQuery, $this->iVersionId, $this->iAppId, $this->sDescription, $this->iId); if(!$hResult) - { - if(!$bResult) - addmsg("Failed to update add data", "red"); return FALSE; - } - - if(!$bSilent) - addmsg("Updated app data successfully", "green"); return TRUE; } diff --git a/include/screenshot.php b/include/screenshot.php index 9f7da6e..611b83b 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -669,14 +669,13 @@ class screenshot function getOutputEditorValues($aClean) { - /* STUB: No update possible, reply text fetched from $aClean */ - return TRUE; + $this->sDescription = $aClean['sDescription']; } function update() { - /* STUB: No updating possible at the moment */ - return TRUE; + $oAppData = new appData($this->iScreenshotId, null, $this); + return $oAppData->update(); } function objectHideDelete()