From 3cf4b80baaf8dd8210bbb1d571bb716b17b7f6eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Feb 2015 02:02:11 +0100 Subject: [PATCH] Fix missing test of action when using canvas --- dev/skeletons/modMyModule.class.php | 6 +++--- htdocs/core/class/canvas.class.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 4c09e379d9b..bf78c7cc161 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -113,9 +113,9 @@ class modMyModule extends DolibarrModules $this->const = array(); // Array to add new pages in new tabs - // Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1 - // 'objecttype:+tabname2:Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2 - // 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname + // Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1 + // 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. + // 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname // where objecttype can be // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) // 'contact' to add a tab in contact view diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 959decc581c..a8bb07e6ec6 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -67,7 +67,7 @@ class Canvas $newaction = $action; if ($newaction == 'add') $newaction='create'; if ($newaction == 'update') $newaction='edit'; - if (empty($newaction) || $newaction == 'delete' || $newaction == 'create_user') $newaction='view'; + if (empty($newaction) || $newaction == 'delete' || $newaction == 'create_user' || $newaction == 'presend' || $newaction == 'send') $newaction='view'; return $newaction; }