diff --git a/admin/editAppVersion.php b/admin/editAppVersion.php index 554de6d..fe0e8bf 100644 --- a/admin/editAppVersion.php +++ b/admin/editAppVersion.php @@ -54,20 +54,8 @@ if(!empty($aClean['sSubmit'])) /* Download URL editor */ echo downloadurl::outputEditor($oVersion, "editAppVersion.php"); - /* only admins can move versions */ - if($_SESSION['current']->hasPriv("admin")) - { - // move version form - echo '
',"\n"; - echo ''; - echo ''; - echo html_frame_start("Move version to another application","90%","",0); - echo '
',"\n"; - echo html_frame_end(); - } - echo html_back_link(1,$oVersion->objectMakeUrl()); - + echo "\n"; apidb_footer(); diff --git a/admin/moveAppVersion.php b/admin/moveAppVersion.php deleted file mode 100644 index 3fa80eb..0000000 --- a/admin/moveAppVersion.php +++ /dev/null @@ -1,76 +0,0 @@ -hasPriv("admin")) - util_show_error_page_and_exit("Insufficient Privileges!"); - -if(!empty($aClean['sAction'])) -{ - /* move this version to the given application */ - $oVersion = new Version($aClean['iVersionId']); - $oVersion->iAppId = $aClean['iAppId']; - $oVersion->update(); - $oApp = new application($aClean['iAppId']); - - /* redirect to the application we just moved this version to */ - util_redirect_and_exit($oApp->objectMakeUrl()); -} else /* or display the webform for making changes */ -{ -?> - -iAppId); - - apidb_header("Choose application to move this version under"); - - echo "\n"; - echo html_frame_start("Move ".$oApp->sName." ".$oVersion->sName, "90%","",0); - echo ''; - echo ''; - - - /* build a table of applications and their versions */ - echo html_table_begin("align=\"center\" style=\"border-collapse: collapse;\""); - - // NOTE: the left join here is expensive and takes some 5x as long as a normal select from appFamily and appVersion would take - // although this cheaper select leaves out all applications that lack versions - $sQuery = "select appName, appFamily.appId, versionName, versionId from appFamily left join appVersion "; - $sQuery.= "on appVersion.appId = appFamily.appId ORDER BY appFamily.appName, appFamily.appId, appVersion.versionName;"; - $hResult = query_parameters($sQuery); - $currentAppId = 0; - while($oRow = query_fetch_object($hResult)) - { - /* if the version ids differ then we should start a row with a new application */ - /* and the version that matches with it */ - if($iCurrentAppId != $oRow->appId) - { - $oApp = new application($oRow->appId); - $iCurrentAppId = $oRow->appId; - echo ''; - $sUrl = $oApp->objectMakeUrl(); - echo ''.substr($oRow->appName, 0, 30).' - '.$oRow->appId.''; - echo "Move here"; - echo ''.$oRow->versionName.''; - } else /* just add another version */ - { - echo ''.$oRow->versionName.''; - } - echo "\n"; - } - - echo html_table_end(); - echo html_frame_end(); - echo "
"; - echo html_back_link(1, $oVersion->objectMakeUrl()); - apidb_footer(); -} -?>