Browse Source

Fix readme detection

Laurent Destailleur 6 năm trước cách đây
mục cha
commit
01d7b1e96a
2 tập tin đã thay đổi với 11 bổ sung4 xóa
  1. 6 0
      htdocs/emailcollector/README.md
  2. 5 4
      htdocs/modulebuilder/index.php

+ 6 - 0
htdocs/emailcollector/README.md

@@ -0,0 +1,6 @@
+EMailCollector
+==============
+
+This module provides a sheduled job that scan regularly one or several IMAP email boxes, with filtering rules, to automatically record data in your application, like
+* recording the email in the history of events (event is automatically linked to its related objects if possible, for example when a customer reply to an email sent from the application, the answer is automatically linked to the good objects)
+* and/or creating a lead

+ 5 - 4
htdocs/modulebuilder/index.php

@@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
 
 // Load translation files required by the page
-$langs->loadLangs(array("admin", "modulebuilder", "other", "cron"));
+$langs->loadLangs(array("admin", "modulebuilder", "other", "cron", "errors"));
 
 $action=GETPOST('action','aZ09');
 $confirm=GETPOST('confirm','alpha');
@@ -1280,8 +1280,8 @@ elseif (! empty($module))
 
 					print '<div class="underbanner clearboth"></div>';
 					print '<div class="fichecenter">';
-
-					print $moduleobj->getDescLong();
+					if (dol_is_file($dirread.'/'.$pathtofilereadme)) print $moduleobj->getDescLong();
+					else print $langs->trans("ErrorFileNotFound", $pathtofilereadme);
 
 					print '<br><br>';
 
@@ -1291,7 +1291,8 @@ elseif (! empty($module))
 					print '<div class="underbanner clearboth"></div>';
 					print '<div class="fichecenter">';
 
-					print $moduleobj->getChangeLog();
+					if (dol_is_file($dirread.'/'.$pathtochangelog)) print $moduleobj->getChangeLog();
+					else print $langs->trans("ErrorFileNotFound", $pathtochangelog);
 
 					print '</div>';
 				}