gustafn
committed
on 19 Sep 13
- use property "doc(title)" instead of "title"
- replace deprecated "ad_permission_p" by "permission::permission_p"
- replace deprecated "te… Show more
- use property "doc(title)" instead of "title"

- replace deprecated "ad_permission_p" by "permission::permission_p"

- replace deprecated "template::util::quote_html" by "ad_quotehtml"

Show less

/postgresql/rss-generation-create.sql (+14 -2)
91 91     return 0;
92 92 end;' language 'plpgsql';
93 93
94 94 select inline_1 ();
95 95
96 96 drop function inline_1 ();
97 97
98 98 create table rss_gen_subscrs (
99 99    subscr_id                      integer
100 100                                   constraint rss_gen_subscrs_id_fk
101 101                                   references acs_objects(object_id)
102 102                                   constraint rss_gen_subscrs_id_pk
103 103                                   primary key,
104 104    impl_id                        integer
105 105                                   constraint rss_gen_subscrs_impl_nn
106 106                                   not null
107 107                                   constraint rss_gen_subscrs_impl_fk
108 108                                   references acs_sc_impls(impl_id),
109 109    summary_context_id             varchar(100)
110 110                                   constraint rss_gen_subscrs_ctx_nn
111                                     not null,
  111                                   not null
  112                                   constraint rss_gen_subscrs_ctx_fk
  113                                   references acs_objects(object_id),
112 114    timeout                        integer
113 115                                   constraint rss_gen_subscrs_timeout_nn
114 116                                   not null,
115      lastbuild                      timestamp
  117    lastbuild                      timestamp,
  118    constraint rss_gen_subscrs_impl_con_un
  119    unique (impl_id,summary_context_id)
116 120 );
117 121
118 122 comment on table rss_gen_subscrs is '
119 123    Table for storing the different parts of the site we will generate
120 124    summaries for.
121 125 ';
122 126
123 127 comment on column rss_gen_subscrs.subscr_id is '
124 128    Subscriptions are ACS objectsThey will typically inherit
125 129    permission from a package instance.
126 130 ';
127 131
128 132 comment on column rss_gen_subscrs.impl_id is '
129 133    The implementation which will provide summary information and
130 134    update status.
131 135 ';
132 136
133 137 comment on column rss_gen_subscrs.summary_context_id is '
134 138    An identifier unique to the site section whose content is to be
135 139    summarizedA context identifier need not be a package instance
 
161 165   v_subscr_id                   rss_gen_subscrs.subscr_id%TYPE;
162 166 begin
163 167         v_subscr_id := acs_object__new (
164 168                 p_subscr_id,
165 169                 p_object_type,
166 170                 p_creation_date,
167 171                 p_creation_user,
168 172                 p_creation_ip,
169 173                 p_context_id
170 174         );
171 175
172 176         insert into rss_gen_subscrs
173 177           (subscr_id, impl_id, summary_context_id, timeout, lastbuild)
174 178         values
175 179           (v_subscr_id, p_impl_id, p_summary_context_id, p_timeout, p_lastbuild);
176 180
177 181         return v_subscr_id;
178 182
179 183 end;' language 'plpgsql';
180 184
  185 create function rss_gen_subscr__name (integer)
  186 returns varchar as '
  187 declare
  188   p_subscr_id                           alias for $1;
  189 begin
  190         return ''RSS Generation Subscription #'' || p_subscr_id;
  191 end;' language 'plpgsql';
  192
181 193 create function rss_gen_subscr__delete (integer)
182 194 returns integer as '
183 195 declare
184 196   p_subscr_id                           alias for $1;
185 197 begin
186 198         delete from acs_permissions
187 199                    where object_id = p_subscr_id;
188 200
189 201         delete from rss_gen_subscrs
190 202                    where subscr_id = p_subscr_id;
191 203
192 204         raise NOTICE ''Deleting subscription...'';
193 205         PERFORM acs_object__delete(p_subscr_id);
194 206
195 207         return 0;
196 208
197 209 end;' language 'plpgsql';