diff --git a/inc/databap.php b/inc/databap.php
index 1f09a12..72bef41 100644
--- a/inc/databap.php
+++ b/inc/databap.php
@@ -1159,7 +1159,7 @@ class Databap extends PhpObject
$asTable['title'] = self::getTableFormat($asTable['title']);
$asTable['description'] = self::getDescriptionFormat($asTable['description']);
$asTable['led'] = self::getDateFormat($asTable['led']);
- $asTable['formatted_keywords'] = str_replace("\n", '
', ToolBox::findReplaceLinks($asTable['keywords']));
+ $asTable['formated_keywords'] = ToolBox::formatText($asTable['keywords']);
}
}
return $asTable;
@@ -2621,7 +2621,7 @@ class Databap extends PhpObject
public static function getDescriptionFormat($sDescription)
{
- return ToolBox::mb_ucfirst($sDescription);
+ return ToolBox::mb_ucfirst(ToolBox::findReplaceLinks($sDescription));
}
public static function getTableFormat($sTable)
diff --git a/inc/procedure.php b/inc/procedure.php
index 9558d6f..f2a574f 100644
--- a/inc/procedure.php
+++ b/inc/procedure.php
@@ -229,27 +229,18 @@ class Procedure extends PhpObject
public function getProcedure()
{
- // [id_step]=>text
- // [id_step][id_image]=>array('name'=>file name, 'desc'=> description)
- /*
- $asSteps = $asImages = array();
- $iLocalStepId = 1;
- foreach($this->asSteps as $iStepId=>$sStepDesc)
+ foreach($this->asSteps as $iStepId=>$asStep)
{
- $asSteps[$iLocalStepId] = $sStepDesc;
- if(array_key_exists($iStepId, $this->asImages))
- {
- $asImages[] =
+ $this->asSteps[$iStepId]['formated_description'] = ToolBox::formatText($asStep['description']);
}
- $iLocalStepId++;
- }*/
+
return array( 'proc_id'=>$this->iProcId,
- 'id_user'=>$this->iUserId,
- 'title'=>Databap::getDescriptionFormat($this->sTitle),
- 'description'=>Databap::getDescriptionFormat($this->sDescription),
- 'led'=>Databap::getDateFormat($this->dLed),
- 'steps'=>$this->asSteps,
- 'images'=>$this->asImages);
+ 'id_user'=>$this->iUserId,
+ 'title'=>Databap::getDescriptionFormat($this->sTitle),
+ 'description'=>Databap::getDescriptionFormat($this->sDescription),
+ 'led'=>Databap::getDateFormat($this->dLed),
+ 'steps'=>$this->asSteps,
+ 'images'=>$this->asImages);
}
private function refreshProcId()
diff --git a/inc/toolbox.php b/inc/toolbox.php
index 50c1968..70f45e9 100644
--- a/inc/toolbox.php
+++ b/inc/toolbox.php
@@ -265,6 +265,11 @@ class ToolBox
setcookie($sCookieName, $sCookieValue, $iTimeLimit);
}
+ public static function formatText($sText)
+ {
+ return str_replace("\n", '
', self::findReplaceLinks($sText));
+ }
+
//TODO implement link pattern
public static function findReplaceLinks($sText, $sLinkPattern='')
{
diff --git a/masks/procedure.html b/masks/procedure.html
index 14945fe..1bf7b48 100755
--- a/masks/procedure.html
+++ b/masks/procedure.html
@@ -21,9 +21,9 @@
+
Créé par () le
-+
"J'ai explication !"
- +