From 8fb098630360f0f5ca86aaab46eb1f96c7186d26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Dec 2013 15:48:44 +0100 Subject: [PATCH] New: Add path file of trigger into admin trigger list page --- ChangeLog | 7 +++++++ htdocs/admin/triggers.php | 9 +++++++-- htdocs/core/class/interfaces.class.php | 9 +++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71f9575d2a8..f2bf26c2012 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,13 @@ For users: - New: Add list of orders products in tab "consumption" on thirdparties. - New: Add graph stats for suppliers orders in tab "stats" on products. +For translators: +- Update language files. + +For developers: +- New: Add path file of trigger into admin trigger list page. + + ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index 980bd9ef4bb..2b3161a36e2 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -68,7 +68,12 @@ foreach ($triggers as $trigger) print ''.$trigger['picto'].''; print ''.$trigger['file'].''; print ''.$trigger['status'].''; - print ''.$form->textwithpicto('', $trigger['info']).''; + print ''; + $text=$trigger['info']; + $text.="
\n".$langs->trans("File").":
\n".$trigger['relpath']; + //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']); + print $form->textwithpicto('', $text); + print ''; print ''; } @@ -77,4 +82,4 @@ print ''; llxFooter(); $db->close(); -?> +?> \ No newline at end of file diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 78276c27885..e4815ded047 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -200,6 +200,9 @@ class Interfaces global $conf, $langs; $files = array(); + $fullpath = array(); + $relpath = array(); + $iscoreorexternal = array(); $modules = array(); $orders = array(); $i = 0; @@ -238,6 +241,9 @@ class Interfaces } $files[$i] = $file; + $fullpath[$i] = $dir.'/'.$file; + $relpath[$i] = preg_replace('/^\//','',$reldir).'/'.$file; + $iscoreorexternal[$i] = ($reldir == '/core/triggers/'?'internal':'external'); $modules[$i] = $modName; $orders[$i] = $part1.'_'.$part2.'_'.$part3; // Set sort criteria value @@ -280,6 +286,9 @@ class Interfaces // We set info of modules $triggers[$j]['picto'] = $objMod->picto?img_object('',$objMod->picto):img_object('','generic'); $triggers[$j]['file'] = $files[$key]; + $triggers[$j]['fullpath'] = $fullpath[$key]; + $triggers[$j]['relpath'] = $relpath[$key]; + $triggers[$j]['iscoreorexternal'] = $iscoreorexternal[$key]; $triggers[$j]['version'] = $objMod->getVersion(); $triggers[$j]['status'] = img_picto($langs->trans("Active"),'tick'); if ($disabledbyname > 0 || $disabledbymodule > 1) $triggers[$j]['status'] = " ";