gustafn
committed
on 02 Mar 22
Improve robustness of upgrade script for legacy applications

In case, an installation has the legacy view (must be from very old installati… Show more
Improve robustness of upgrade script for legacy applications

In case, an installation has the legacy view (must be from very old installations)

in place, it is necessary to drop it before registered_users, otherwise

PostgreSQL will complain that it cannot drop view registered_users because

other objects depend on it.

Many thanks to Franz Penz to report this potential problem for old sites.

Show less

/tcl/xowiki-applet-procs.tcl (+11 -5)
2 2   Procedures to supports xowiki as an dotlrn applet
3 3
4 4   @creation-date 2008-02-26
5 5   @author Gustaf Neumann
6 6   @cvs-id $Id$
7 7 }
8 8
9 9 #
10 10 # This is the first approach to make the applets
11 11 #
12 12 #  (a) in an oo-style (the object below contains everything
13 13 #      for the management of the portlet) and
14 14 #  (b) independent from the database layer
15 15 #      (supposed to work under postgres and Oracle)
16 16 #
17 17 # In the next steps, it would make sense to define a ::dotlrn::Applet
18 18 # class, which provides some of the common behavior defined here...
19 19 #
20 20
21 21 Object xowiki_applet
22   xowiki_applet proc applet_key {} {
  22 xowiki_applet ad_proc applet_key {
  23 } {
  24   @return package key
  25 } {
23 26   return "dotlrn_xowiki"
24 27 }
25 28
26   xowiki_applet proc my_package_key {} {
  29 xowiki_applet ad_proc my_package_key {
  30 } {
  31   @return package key
  32 } {
27 33   return "dotlrn-xowiki"
28 34 }
29 35
30 36 xowiki_applet ad_proc package_key {
31 37 } {
32 38   What package do I deal with?
33 39 } {
34 40   return "xowiki"
35 41 }
36 42
37 43 xowiki_applet ad_proc node_name {
38 44 } {
39     returns the node name
  45   @return node name
40 46 } {
41 47   return "xowiki"
42 48 }
43 49
44 50 xowiki_applet ad_proc pretty_name {
45 51 } {
46     returns the pretty name
  52   @return pretty name
47 53 } {
48 54   return "XoWiki"
49 55 }
50 56
51 57 xowiki_applet ad_proc add_applet {
52 58 } {
53 59   One time init - must be repeatable!
54 60 } {
55 61   dotlrn_applet::add_applet_to_dotlrn \
56 62       -applet_key [:applet_key] \
57 63       -package_key [:my_package_key]
58 64 }
59 65
60 66 xowiki_applet ad_proc remove_applet {
61 67 } {
62 68   One time destroy.
63 69 } {
64 70   ad_return_complaint 1 "[:applet_key] remove_applet not implemented!"
65 71 }
66 72