Subversion Repositories DevTools

Rev

Rev 5506 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
129 ghuddy 4
'                  MAKE UNOFFICIAL
119 ghuddy 5
'               --- PROCESS FORM ---
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
129 ghuddy 11
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 12
%>
13
 
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_project.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
'------------ Constants Declaration -----------
29
'------------ Variable Init -------------------
30
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
31
'----------------------------------------------
32
%>
33
<%
34
Sub MakeUnreleased ()
129 ghuddy 35
   Dim objWSH
36
 
37
   Call Get_Pkg_Info ( Request("pv_id"), Request("rtag_id") )
38
 
5061 dpurdie 39
   If pkgInfoHash.Item("can_unofficial") <> "true" AND NOT canActionControlInProject("EditCriticalInfoForLockedPackage") Then Exit Sub
129 ghuddy 40
 
41
   OraDatabase.Parameters.Add "PV_ID",       Request("pv_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
42
   OraDatabase.Parameters.Add "RTAG_ID",       Request("rtag_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
43
   OraDatabase.Parameters.Add "USER_ID",       objAccessControl.UserId,   ORAPARM_INPUT, ORATYPE_NUMBER
44
 
45
   objEH.TryORA ( OraSession )
46
   On Error Resume Next
47
 
48
   OraDatabase.ExecuteSQL _
49
   "BEGIN "&_
50
   " PK_ENVIRONMENT.MAKE_UNRELEASE ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
51
   "END; "
52
 
53
   objEH.CatchORA ( OraSession )
54
 
55
   OraDatabase.Parameters.Remove "PV_ID"
56
   OraDatabase.Parameters.Remove "RTAG_ID"
57
   OraDatabase.Parameters.Remove "USER_ID"
58
 
59
   If objEH.LastOraFailed = FALSE Then
5172 dpurdie 60
       ' Does nothing.
61
       ' Once upon a time it would make the package writable in the package archive
62
       ' but this is no more.
129 ghuddy 63
   End If
119 ghuddy 64
End Sub
65
%>
66
<%
67
'-----------------------  MAIN LINE  ---------------------------
68
 
69
'--- Process submition ---
70
If (Request("rtag_id") <> "") AND (Request("pv_id") <> "")  Then
129 ghuddy 71
 
72
   'COMPLETE THE REQUEST...
73
   Call MakeUnreleased ( )
74
 
5957 dpurdie 75
   Call Destroy_All_Objects
129 ghuddy 76
   If Request("rfile") <> "" Then
77
      Response.Redirect ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
78
   Else
79
      Response.Redirect ( "dependencies?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
80
   End If
81
 
119 ghuddy 82
Else
1376 dpurdie 83
   Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
4955 dpurdie 84
   Response.write QSTR_FullQuery
119 ghuddy 85
End If
86
%>
87
<!-- DESTRUCTOR ------->
88
<!--#include file="common/destructor.asp"-->