X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fpayment.php;h=ff5c432af7e9e082560f75f7638cd11f309a49bb;hb=de61dbcf4475d1182220ae6ac1759d6a5bf7acbd;hp=4b7f0377f8ce4991b7f4dcd6da8cc497e5e7d30a;hpb=2c784d41fd50f26453a1a590e427b2ec4640ac74;p=platal.git diff --git a/modules/payment.php b/modules/payment.php index 4b7f037..ff5c432 100644 --- a/modules/payment.php +++ b/modules/payment.php @@ -77,8 +77,8 @@ class PaymentModule extends PLModule { return array( 'payment' => $this->make_hook('payment', AUTH_MDP), - 'payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUB), - 'payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUB), + 'payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC), + 'payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC), 'admin/payments' => $this->make_hook('admin', AUTH_MDP, 'admin'), ); } @@ -316,11 +316,13 @@ class PaymentModule extends PLModule $page->assign('erreur', $erreur); } function handler_admin(&$page, $action = 'list', $id = null) { - require_once('../classes/PLTableEditor.php'); $page->assign('xorg_title','Polytechnique.org - Administration - Paiements'); $page->assign('title', 'Gestion des télépaiements'); $table_editor = new PLTableEditor('admin/payments','paiement.paiements','id'); $table_editor->add_join_table('paiement.transactions','ref',true); + $table_editor->add_sort_field('flags'); + $table_editor->add_sort_field('id', true, true); + $table_editor->on_delete("UPDATE paiement.paiements SET flags = 'old' WHERE id = {?}", "Le paiement a été archivé"); $table_editor->describe('text','intitulé',true); $table_editor->describe('url','site web',false); $table_editor->describe('montant_def','montant par défaut',false);