Commit | Line | Data |
---|---|---|
e2efba7d | 1 | <?php |
2 | /*************************************************************************** | |
12262f13 | 3 | * Copyright (C) 2003-2011 Polytechnique.org * |
e2efba7d | 4 | * http://opensource.polytechnique.org/ * |
5 | * * | |
6 | * This program is free software; you can redistribute it and/or modify * | |
7 | * it under the terms of the GNU General Public License as published by * | |
8 | * the Free Software Foundation; either version 2 of the License, or * | |
9 | * (at your option) any later version. * | |
10 | * * | |
11 | * This program is distributed in the hope that it will be useful, * | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |
14 | * GNU General Public License for more details. * | |
15 | * * | |
16 | * You should have received a copy of the GNU General Public License * | |
17 | * along with this program; if not, write to the Free Software * | |
18 | * Foundation, Inc., * | |
19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * | |
20 | ***************************************************************************/ | |
21 | ||
22 | class NewsletterModule extends PLModule | |
23 | { | |
24 | function handlers() | |
25 | { | |
26 | return array( | |
e5ceaa8c RB |
27 | 'nl' => $this->make_hook('nl', AUTH_COOKIE, 'user'), |
28 | 'nl/show' => $this->make_hook('nl_show', AUTH_COOKIE, 'user'), | |
29 | 'nl/search' => $this->make_hook('nl_search', AUTH_COOKIE, 'user'), | |
bfe9f4c7 SJ |
30 | 'nl/submit' => $this->make_hook('nl_submit', AUTH_PASSWD, 'user'), |
31 | 'nl/remaining' => $this->make_hook('nl_remaining', AUTH_PASSWD, 'user'), | |
32 | 'admin/nls' => $this->make_hook('admin_nl_groups', AUTH_PASSWD, 'admin'), | |
33 | 'admin/newsletter' => $this->make_hook('admin_nl', AUTH_PASSWD, 'admin'), | |
34 | 'admin/newsletter/categories' => $this->make_hook('admin_nl_cat', AUTH_PASSWD, 'admin'), | |
35 | 'admin/newsletter/edit' => $this->make_hook('admin_nl_edit', AUTH_PASSWD, 'admin'), | |
36 | 'admin/newsletter/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_PASSWD, 'admin'), | |
84163d58 | 37 | // Automatic mailing is disabled for X.org NL |
bfe9f4c7 SJ |
38 | // 'admin/newsletter/edit/cancel' => $this->make_hook('cancel', AUTH_PASSWD, 'admin'), |
39 | // 'admin/newsletter/edit/valid' => $this->make_hook('valid', AUTH_PASSWD, 'admin'), | |
e2efba7d | 40 | ); |
41 | } | |
42 | ||
84163d58 RB |
43 | /** This function should return the adequate NewsLetter object for the current module. |
44 | */ | |
45 | protected function getNl() | |
e2efba7d | 46 | { |
47 | require_once 'newsletter.inc.php'; | |
84163d58 RB |
48 | return NewsLetter::forGroup(NewsLetter::GROUP_XORG); |
49 | } | |
50 | ||
602119a2 | 51 | function handler_nl($page, $action = null, $hash = null, $issue_id = null) |
84163d58 RB |
52 | { |
53 | $nl = $this->getNl(); | |
54 | if (!$nl) { | |
55 | return PL_NOT_FOUND; | |
56 | } | |
e2efba7d | 57 | |
602119a2 | 58 | $hash = ($hash == 'nohash') ? null : $hash; |
e2efba7d | 59 | switch ($action) { |
440b8516 SJ |
60 | case 'out': |
61 | $success = $nl->unsubscribe($issue_id, $hash, $hash != null); | |
62 | if (!is_null($hash)) { | |
63 | if ($success) { | |
64 | $page->trigSuccess('La désinscription a été effectuée avec succès.'); | |
65 | } else { | |
66 | $page->trigError("La désinscription n'a été pas pu être effectuée."); | |
67 | } | |
68 | return; | |
69 | } | |
70 | break; | |
84163d58 | 71 | case 'in': $nl->subscribe(); break; |
e2efba7d | 72 | default: ; |
73 | } | |
74 | ||
440b8516 SJ |
75 | $page->changeTpl('newsletter/index.tpl'); |
76 | $page->setTitle('Lettres mensuelles'); | |
77 | ||
84163d58 RB |
78 | $page->assign_by_ref('nl', $nl); |
79 | $page->assign('nls', $nl->subscriptionState()); | |
80 | $page->assign('nl_list', $nl->listSentIssues(true)); | |
e2efba7d | 81 | } |
82 | ||
26ba053e | 83 | function handler_nl_show($page, $nid = 'last') |
e2efba7d | 84 | { |
85 | $page->changeTpl('newsletter/show.tpl'); | |
84163d58 RB |
86 | $nl = $this->getNl(); |
87 | if (!$nl) { | |
88 | return PL_NOT_FOUND; | |
89 | } | |
e2efba7d | 90 | |
9da70671 | 91 | try { |
84163d58 | 92 | $issue = $nl->getIssue($nid); |
6d1747b3 | 93 | $user =& S::user(); |
9da70671 | 94 | if (Get::has('text')) { |
84163d58 | 95 | $issue->toText($page, $user); |
9da70671 | 96 | } else { |
84163d58 | 97 | $issue->toHtml($page, $user); |
9da70671 SJ |
98 | } |
99 | if (Post::has('send')) { | |
84163d58 | 100 | $issue->sendTo($user); |
9da70671 SJ |
101 | } |
102 | } catch (MailNotFound $e) { | |
103 | return PL_NOT_FOUND; | |
e2efba7d | 104 | } |
105 | } | |
106 | ||
5e9a29ed SJ |
107 | function handler_nl_search($page) |
108 | { | |
109 | S::assert_xsrf_token(); | |
110 | $nl = $this->getNl(); | |
111 | if (!$nl) { | |
112 | return PL_NOT_FOUND; | |
113 | } | |
114 | ||
115 | if (!Post::has('nl_search')) { | |
b6d52898 | 116 | pl_redirect($nl->prefix(true, false)); |
5e9a29ed SJ |
117 | } |
118 | ||
119 | $nl_search = Post::t('nl_search'); | |
120 | $nl_search_type = Post::t('nl_search_type'); | |
121 | if (!$nl_search || !($nl_search_type > 0 && $nl_search_type < 10)) { | |
122 | $page->trigErrorRedirect('La recherche est vide ou erronée.', $nl->prefix()); | |
123 | } | |
124 | ||
125 | $page->changeTpl('newsletter/search.tpl'); | |
126 | $user = S::user(); | |
127 | $fields = array(1 => 'all', 2 => 'all', 3 => 'title', 4 => 'body', 5 => 'append', 6 => 'all', 7 => 'title', 8 => 'head', 9 => 'signature'); | |
128 | $res_articles = $res_issues = array(); | |
129 | if ($nl_search_type < 6) { | |
130 | $res_articles = $nl->articleSearch($nl_search, $fields[$nl_search_type], $user); | |
131 | } | |
132 | if ($nl_search_type > 5 || $nl_search_type == 1) { | |
133 | $res_issues = $nl->issueSearch($nl_search, $fields[$nl_search_type], $user); | |
134 | } | |
135 | ||
136 | $articles_count = count($res_articles); | |
137 | $issues_count = count($res_issues); | |
138 | $results_count = $articles_count + $issues_count; | |
139 | if ($results_count > 200) { | |
140 | $page->trigError('Recherche trop générale.'); | |
141 | } elseif ($results_count == 0) { | |
142 | $page->trigWarning('Aucun résultat pour cette recherche.'); | |
143 | } else { | |
144 | $page->assign('res_articles', $res_articles); | |
145 | $page->assign('res_issues', $res_issues); | |
146 | $page->assign('articles_count', $articles_count); | |
147 | $page->assign('issues_count', $issues_count); | |
148 | } | |
149 | ||
150 | $page->assign_by_ref('nl', $nl); | |
151 | $page->assign('nl_search', $nl_search); | |
152 | $page->assign('nl_search_type', $nl_search_type); | |
153 | $page->assign('results_count', $results_count); | |
154 | } | |
155 | ||
26ba053e | 156 | function handler_nl_submit($page) |
e2efba7d | 157 | { |
158 | $page->changeTpl('newsletter/submit.tpl'); | |
159 | ||
84163d58 RB |
160 | $nl = $this->getNl(); |
161 | if (!$nl) { | |
162 | return PL_NOT_FOUND; | |
163 | } | |
164 | ||
8f201b69 FB |
165 | $wp = new PlWikiPage('Xorg.LettreMensuelle'); |
166 | $wp->buildCache(); | |
e2efba7d | 167 | |
1970c12b | 168 | if (Post::has('see') || (Post::has('valid') && (!trim(Post::v('title')) || !trim(Post::v('body'))))) { |
169 | if (!Post::has('see')) { | |
a7d35093 | 170 | $page->trigError("L'article doit avoir un titre et un contenu"); |
1970c12b | 171 | } |
e2efba7d | 172 | $art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append')); |
173 | $page->assign('art', $art); | |
174 | } elseif (Post::has('valid')) { | |
5daf68f6 | 175 | $art = new NLReq(S::user(), Post::v('title'), |
e2efba7d | 176 | Post::v('body'), Post::v('append')); |
177 | $art->submit(); | |
178 | $page->assign('submited', true); | |
179 | } | |
84163d58 | 180 | $page->addCssLink($nl->cssFile()); |
e2efba7d | 181 | } |
182 | ||
0fd5be99 SJ |
183 | function handler_nl_remaining($page) |
184 | { | |
185 | require_once 'newsletter.inc.php'; | |
186 | ||
187 | pl_content_headers('text/html'); | |
188 | $page->changeTpl('newsletter/remaining.tpl', NO_SKIN); | |
189 | ||
190 | $article = new NLArticle('', Post::t('body'), ''); | |
191 | $rest = $article->remain(); | |
192 | ||
193 | $page->assign('too_long', $rest['remaining_lines'] < 0); | |
194 | $page->assign('last_line', ($rest['remaining_lines'] == 0)); | |
195 | $page->assign('remaining', ($rest['remaining_lines'] == 0) ? $rest['remaining_characters_for_last_line'] : $rest['remaining_lines']); | |
196 | } | |
197 | ||
26ba053e | 198 | function handler_admin_nl($page, $new = false) { |
e2efba7d | 199 | $page->changeTpl('newsletter/admin.tpl'); |
46f272fe | 200 | $page->setTitle('Administration - Newsletter : liste'); |
84163d58 RB |
201 | |
202 | $nl = $this->getNl(); | |
203 | if (!$nl) { | |
204 | return PL_NOT_FOUND; | |
205 | } | |
eaf30d86 | 206 | |
2d1ed661 | 207 | if ($new == 'new') { |
93f23312 SJ |
208 | // Logs NL creation. |
209 | S::logger()->log('nl_issue_create', $nid); | |
210 | ||
84163d58 | 211 | $id = $nl->createPending(); |
b6d52898 | 212 | pl_redirect($nl->adminPrefix(true, false) . '/edit/' . $id); |
e2efba7d | 213 | } |
eaf30d86 | 214 | |
84163d58 RB |
215 | $page->assign_by_ref('nl', $nl); |
216 | $page->assign('nl_list', $nl->listAllIssues()); | |
217 | } | |
218 | ||
26ba053e | 219 | function handler_admin_nl_groups($page) |
84163d58 RB |
220 | { |
221 | require_once 'newsletter.inc.php'; | |
222 | ||
223 | $page->changeTpl('newsletter/admin_all.tpl'); | |
224 | $page->setTitle('Administration - Newsletters : Liste des Newsletters'); | |
225 | ||
226 | $page->assign('nls', Newsletter::getAll()); | |
e2efba7d | 227 | } |
eaf30d86 | 228 | |
26ba053e | 229 | function handler_admin_nl_edit($page, $nid = 'last', $aid = null, $action = 'edit') { |
e2efba7d | 230 | $page->changeTpl('newsletter/edit.tpl'); |
84163d58 | 231 | $page->addCssLink('nl.Polytechnique.org.css'); |
e4705641 | 232 | $page->setTitle('Administration - Newsletter : Édition'); |
eaf30d86 | 233 | |
84163d58 RB |
234 | $nl = $this->getNl(); |
235 | if (!$nl) { | |
236 | return PL_NOT_FOUND; | |
237 | } | |
eaf30d86 | 238 | |
84163d58 RB |
239 | try { |
240 | $issue = $nl->getIssue($nid, false); | |
241 | } catch (MailNotFound $e) { | |
242 | return PL_NOT_FOUND; | |
e2efba7d | 243 | } |
eaf30d86 | 244 | |
84163d58 RB |
245 | $ufb = $nl->getSubscribersUFB(); |
246 | $ufb_keepenv = false; // Will be set to True if there were invalid modification to the UFB. | |
247 | ||
248 | // Convert NLIssue error messages to human-readable errors | |
249 | $error_msgs = array( | |
5f0c028a | 250 | NLIssue::ERROR_INVALID_REPLY_TO => "L'adresse de réponse est invalide.", |
84163d58 RB |
251 | NLIssue::ERROR_INVALID_SHORTNAME => "Le nom court est invalide ou vide.", |
252 | NLIssue::ERROR_INVALID_UFC => "Le filtre des destinataires est invalide.", | |
a718afe9 | 253 | NLIssue::ERROR_TOO_LONG_UFC => "Le nombre de matricules AX renseigné est trop élevé.", |
84163d58 RB |
254 | NLIssue::ERROR_SQL_SAVE => "Une erreur est survenue en tentant de sauvegarder la lettre, merci de réessayer.", |
255 | ); | |
256 | ||
257 | // Update the current issue | |
2d1ed661 | 258 | if($aid == 'update' && Post::has('submit')) { |
84163d58 RB |
259 | |
260 | // Save common fields | |
261 | $issue->title = Post::s('title'); | |
262 | $issue->title_mail = Post::s('title_mail'); | |
263 | $issue->head = Post::s('head'); | |
264 | $issue->signature = Post::s('signature'); | |
5f0c028a | 265 | $issue->reply_to = Post::s('reply_to'); |
84163d58 RB |
266 | |
267 | if ($issue->isEditable()) { | |
268 | // Date and shortname may only be modified for pending NLs, otherwise all links get broken. | |
269 | $issue->date = Post::s('date'); | |
270 | $issue->shortname = strlen(Post::blank('shortname')) ? null : Post::s('shortname'); | |
271 | $issue->sufb->updateFromEnv($ufb->getEnv()); | |
272 | ||
273 | if ($nl->automaticMailingEnabled()) { | |
274 | $issue->send_before = preg_replace('/^(\d\d\d\d)(\d\d)(\d\d)$/', '\1-\2-\3', Post::v('send_before_date')) . ' ' . Post::i('send_before_time_Hour') . ':00:00'; | |
275 | } | |
276 | } | |
277 | $errors = $issue->save(); | |
278 | if (count($errors)) { | |
279 | foreach ($errors as $error_code) { | |
280 | $page->trigError($error_msgs[$error_code]); | |
281 | } | |
e2efba7d | 282 | } |
283 | } | |
eaf30d86 | 284 | |
84163d58 RB |
285 | // Delete an article |
286 | if($action == 'delete') { | |
287 | $issue->delArticle($aid); | |
b6d52898 | 288 | pl_redirect($nl->adminPrefix(true, false) . "/edit/$nid"); |
84163d58 RB |
289 | } |
290 | ||
291 | // Save an article | |
e2efba7d | 292 | if(Post::v('save')) { |
293 | $art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append'), | |
9e2a6a32 | 294 | $aid, Post::v('cid'), Post::v('pos')); |
84163d58 | 295 | $issue->saveArticle($art); |
b6d52898 | 296 | pl_redirect($nl->adminPrefix(true, false) . "/edit/$nid"); |
e2efba7d | 297 | } |
eaf30d86 | 298 | |
84163d58 | 299 | // Edit an article |
9e2a6a32 | 300 | if ($action == 'edit' && $aid != 'update') { |
e2efba7d | 301 | $eaid = $aid; |
e4705641 | 302 | if (Post::has('title')) { |
e2efba7d | 303 | $art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append'), |
e4705641 | 304 | $eaid, Post::v('cid'), Post::v('pos')); |
e2efba7d | 305 | } else { |
84163d58 | 306 | $art = ($eaid == 'new') ? new NLArticle() : $issue->getArt($eaid); |
e4705641 SJ |
307 | } |
308 | if ($art && !$art->check()) { | |
309 | $page->trigError("Cet article est trop long."); | |
e2efba7d | 310 | } |
311 | $page->assign('art', $art); | |
312 | } | |
eaf30d86 | 313 | |
84163d58 | 314 | // Check blacklisted IPs |
9e2a6a32 | 315 | if ($aid == 'blacklist_check') { |
955109ba | 316 | global $globals; |
9e2a6a32 | 317 | $ips_to_check = array(); |
955109ba | 318 | $blacklist_host_resolution_count = 0; |
9e2a6a32 | 319 | |
84163d58 | 320 | foreach ($issue->arts as $key => $articles) { |
9e2a6a32 | 321 | foreach ($articles as $article) { |
955109ba | 322 | $article_ips = $article->getLinkIps($blacklist_host_resolution_count); |
9e2a6a32 SJ |
323 | if (!empty($article_ips)) { |
324 | $ips_to_check[$article->title()] = $article_ips; | |
325 | } | |
326 | } | |
327 | } | |
328 | ||
329 | $page->assign('ips_to_check', $ips_to_check); | |
955109ba SJ |
330 | if ($blacklist_host_resolution_count >= $globals->mail->blacklist_host_resolution_limit) { |
331 | $page->trigError("Toutes les url et adresses emails de la lettre" | |
9e2a6a32 SJ |
332 | . " n'ont pas été prises en compte car la" |
333 | . " limite du nombre de résolutions DNS" | |
334 | . " autorisée a été atteinte."); | |
335 | } | |
336 | } | |
337 | ||
84163d58 RB |
338 | if ($issue->state == NLIssue::STATE_SENT) { |
339 | $page->trigWarning("Cette lettre a déjà été envoyée ; il est recommandé de limiter les modifications au maximum (orthographe, adresses web et mail)."); | |
340 | } | |
341 | ||
342 | $ufb->setEnv($issue->sufb->getEnv()); | |
9e2a6a32 | 343 | $page->assign_by_ref('nl', $nl); |
84163d58 RB |
344 | $page->assign_by_ref('issue', $issue); |
345 | } | |
346 | ||
347 | /** This handler will cancel the sending of the currently pending issue | |
348 | * It is disabled for X.org mailings. | |
349 | */ | |
26ba053e | 350 | function handler_admin_nl_cancel($page, $nid, $force = null) |
84163d58 RB |
351 | { |
352 | $nl = $this->getNl(); | |
353 | if (!$nl) { | |
354 | return PL_NOT_FOUND; | |
355 | } | |
356 | ||
357 | if (!$nl->mayEdit() || !S::has_xsrf_token()) { | |
358 | return PL_FORBIDDEN; | |
359 | } | |
360 | ||
361 | if (!$nid) { | |
362 | $page->kill("La lettre n'a pas été spécifiée"); | |
363 | } | |
364 | ||
365 | $issue = $nl->getIssue($nid); | |
366 | if (!$issue) { | |
367 | $page->kill("La lettre {$nid} n'existe pas."); | |
368 | } | |
369 | if (!$issue->cancelMailing()) { | |
370 | $page->trigErrorRedirect("Une erreur est survenue lors de l'annulation de l'envoi.", $nl->adminPrefix()); | |
371 | } | |
372 | ||
93f23312 SJ |
373 | // Logs NL cancelling. |
374 | S::logger()->log('nl_mailing_cancel', $nid); | |
375 | ||
84163d58 RB |
376 | $page->trigSuccessRedirect("L'envoi de l'annonce {$issue->title()} est annulé.", $nl->adminPrefix()); |
377 | } | |
378 | ||
379 | /** This handler will enable the sending of the currently pending issue | |
380 | * It is disabled for X.org mailings. | |
381 | */ | |
26ba053e | 382 | function handler_admin_nl_valid($page, $nid, $force = null) |
84163d58 RB |
383 | { |
384 | $nl = $this->getNl(); | |
385 | if (!$nl) { | |
386 | return PL_NOT_FOUND; | |
387 | } | |
388 | ||
389 | if (!$nl->mayEdit() || !S::has_xsrf_token()) { | |
390 | return PL_FORBIDDEN; | |
391 | } | |
392 | ||
393 | if (!$nid) { | |
394 | $page->kill("La lettre n'a pas été spécifiée."); | |
395 | } | |
396 | ||
397 | $issue = $nl->getIssue($nid); | |
398 | if (!$issue) { | |
399 | $page->kill("La lettre {$nid} n'existe pas."); | |
400 | } | |
401 | if (!$issue->scheduleMailing()) { | |
402 | $page->trigErrorRedirect("Une erreur est survenue lors de la validation de l'envoi.", $nl->adminPrefix()); | |
403 | } | |
404 | ||
93f23312 SJ |
405 | // Logs NL validation. |
406 | S::logger()->log('nl_mailing_valid', $nid); | |
407 | ||
84163d58 RB |
408 | $page->trigSuccessRedirect("L'envoi de la newsletter {$issue->title()} a été validé.", $nl->adminPrefix()); |
409 | } | |
410 | ||
411 | /** This handler will remove the given issue. | |
412 | */ | |
26ba053e | 413 | function handler_admin_nl_delete($page, $nid, $force = null) |
84163d58 RB |
414 | { |
415 | $nl = $this->getNl(); | |
416 | if (!$nl) { | |
417 | return PL_NOT_FOUND; | |
418 | } | |
419 | ||
420 | if (!$nl->mayEdit() || !S::has_xsrf_token()) { | |
421 | return PL_FORBIDDEN; | |
422 | } | |
423 | ||
424 | if (!$nid) { | |
425 | $page->kill("La lettre n'a pas été spécifiée."); | |
426 | } | |
427 | ||
428 | $issue = $nl->getIssue($nid); | |
429 | if (!$issue) { | |
430 | $page->kill("La lettre {$nid} n'existe pas"); | |
431 | } | |
432 | if (!$issue->isEditable()) { | |
433 | $page->trigErrorRedirect("La lette a été envoyée ou est en cours d'envoi, elle ne peut être supprimée.", $nl->adminPrefix()); | |
434 | } | |
435 | if (!$issue->delete()) { | |
436 | $page->trigErrorRedirect("Une erreur est survenue lors de la suppression de la lettre.", $nl->adminPrefix()); | |
437 | } | |
438 | ||
93f23312 SJ |
439 | // Logs NL deletion. |
440 | S::logger()->log('nl_issue_delete', $nid); | |
441 | ||
84163d58 | 442 | $page->trigSuccessRedirect("La lettre a bien été supprimée.", $nl->adminPrefix()); |
e2efba7d | 443 | } |
444 | ||
26ba053e | 445 | function handler_admin_nl_cat($page, $action = 'list', $id = null) { |
42df7fa8 RB |
446 | $nl = $this->getNl(); |
447 | if (!$nl) { | |
448 | return PL_NOT_FOUND; | |
449 | } | |
450 | ||
451 | if (!$nl->mayEdit()) { | |
452 | return PL_FORBIDDEN; | |
453 | } | |
454 | ||
46f272fe | 455 | $page->setTitle('Administration - Newsletter : Catégories'); |
a7de4ef7 | 456 | $page->assign('title', 'Gestion des catégories de la newsletter'); |
42df7fa8 | 457 | $table_editor = new PLTableEditor($nl->adminPrefix() . '/categories', 'newsletter_cat','cid'); |
84163d58 | 458 | $table_editor->describe('title','intitulé',true); |
e2efba7d | 459 | $table_editor->describe('pos','position',true); |
42df7fa8 RB |
460 | if ($nl->group == Newsletter::GROUP_XORG) { |
461 | $table_editor->add_option_table('newsletters', 'newsletters.id = t.nlid'); | |
462 | $table_editor->add_option_field('newsletters.name', 'newsletter_name', 'Newsletter', null, 'nlid'); | |
463 | $table_editor->describe('nlid', 'ID NL', true); | |
464 | } else { | |
465 | $table_editor->force_field_value('nlid', $nl->id); | |
47f51789 | 466 | $table_editor->describe('nlid', 'nlid', false, false); |
42df7fa8 RB |
467 | } |
468 | // Prevent deletion. | |
469 | $table_editor->on_delete(null, null); | |
e2efba7d | 470 | $table_editor->apply($page, $action, $id); |
bc0903c7 | 471 | } |
e2efba7d | 472 | } |
473 | ||
a7de4ef7 | 474 | // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: |
e2efba7d | 475 | ?> |