Change default: show menu in xnet pages.
[platal.git] / modules / payment.php
index 137bbec..ff5c432 100644 (file)
@@ -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'),
         );
     }
@@ -321,6 +321,8 @@ class PaymentModule extends PLModule
         $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);