Changeset 48093 in spip-zone for _plugins_/mediatheque/action/tourner.php


Ignore:
Timestamp:
May 25, 2011, 1:50:37 PM (10 years ago)
Author:
rastapopoulos@…
Message:

Pouvoir appeler des actions depuis n'importe où en passant l'argument explicitement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/mediatheque/action/tourner.php

    r39202 r48093  
    1414
    1515// http://doc.spip.org/@action_tourner_dist
    16 function action_tourner_dist() {
    17         $securiser_action = charger_fonction('securiser_action', 'inc');
    18         $arg = $securiser_action();
     16function action_tourner_dist($arg=null) {
     17        if(is_null($arg)){
     18                $securiser_action = charger_fonction('securiser_action', 'inc');
     19                $arg = $securiser_action();
     20        }
    1921
    2022        if (!preg_match(",^\W*(\d+)\W?(-?\d+)$,", $arg, $r)) {
Note: See TracChangeset for help on using the changeset viewer.