internal links in procedure
This commit is contained in:
@@ -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", '<br />', 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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -265,6 +265,11 @@ class ToolBox
|
||||
setcookie($sCookieName, $sCookieValue, $iTimeLimit);
|
||||
}
|
||||
|
||||
public static function formatText($sText)
|
||||
{
|
||||
return str_replace("\n", '<br />', self::findReplaceLinks($sText));
|
||||
}
|
||||
|
||||
//TODO implement link pattern
|
||||
public static function findReplaceLinks($sText, $sLinkPattern='')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user