Changeset 48093 in spip-zone


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.

Location:
_plugins_/mediatheque
Files:
5 edited

Legend:

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

    r29017 r48093  
    1717
    1818// http://doc.spip.org/@action_changer_mode_document_dist
    19 function action_changer_mode_document_dist()
     19function action_changer_mode_document_dist($arg=null)
    2020{
    21         $securiser_action = charger_fonction('securiser_action', 'inc');
    22         $arg = $securiser_action();
     21        if(is_null($arg)){
     22                $securiser_action = charger_fonction('securiser_action', 'inc');
     23                $arg = $securiser_action();
     24        }
    2325
    2426        if (!preg_match(",^(\d+)\W(\w+)$,", $arg, $r))
  • _plugins_/mediatheque/action/dissocier_document.php

    r44136 r48093  
    1414
    1515
    16 function action_dissocier_document_dist(){
    17         $securiser_action = charger_fonction('securiser_action', 'inc');
    18         $arg = $securiser_action();
     16function action_dissocier_document_dist($arg=null){
     17        if(is_null($arg)){
     18                $securiser_action = charger_fonction('securiser_action', 'inc');
     19                $arg = $securiser_action();
     20        }
    1921
    2022        $arg = explode('-',$arg);
  • _plugins_/mediatheque/action/editer_document.php

    r44136 r48093  
    1313 * @return unknown
    1414 */
    15 function action_editer_document_dist() {
    16 
    17         $securiser_action = charger_fonction('securiser_action', 'inc');
    18         $arg = $securiser_action();
     15function action_editer_document_dist($arg=null) {
     16
     17        if(is_null($arg)){
     18                $securiser_action = charger_fonction('securiser_action', 'inc');
     19                $arg = $securiser_action();
     20        }
    1921
    2022        // Envoi depuis le formulaire de creation d'un document
  • _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)) {
  • _plugins_/mediatheque/plugin.xml

    r46482 r48093  
    1111        <icon>img_pack/portfolio-64.png</icon>
    1212        <auteur>[Cedric MORIN->http://www.yterium.net] &amp; [romy.tetue.net->http://romy.tetue.net] &amp; superyms--(traduction)</auteur>
    13         <version>1.6.3</version>
     13        <version>1.6.4</version>
    1414        <version_base>0.11</version_base>
    1515        <etat>stable</etat>
Note: See TracChangeset for help on using the changeset viewer.