Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.8' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanjo Menent committed Aug 6, 2015
2 parents d65d501 + 761c50a commit b91edcc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -235,6 +235,7 @@ FIX [ bug 1634 ] Error deleting a project when it had many linked objects
FIX [ bug 1925 ] "Link to order" option in supplier invoices is not working properly
FIX [ bug #3198 ] Trigger LINECONTRACT_INSERT passes Contrat as $object instead of ContratLigne
FIX: Not showing delivery date on rouget pdf
FIX: Not showing task extrafields when creating from left menu

NEW: Created new ContratLigne::insert function

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/functions.lib.php
Expand Up @@ -2015,7 +2015,7 @@ function img_picto($titlealt, $picto, $options = '', $pictoisfullpath = false, $
$tmparray=array(0=>$titlealt);
if (preg_match('/:[^\s]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB
$title=$tmparray[0];
$alt=empty($tmparray[1])?'':$tmparray[1];
$alt=empty($tmparray[1])?$tmparray[0]:$tmparray[1]; // Use title for alt if no alt is provided
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($options?' '.$options:'').'>'; // Alt is used for accessibility, title for popup
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/projet/tasks.php
Expand Up @@ -55,8 +55,8 @@
{
// fetch optionals attributes and labels
$extralabels_projet=$extrafields_project->fetch_name_optionals_label($object->table_element);
$extralabels_task=$extrafields_task->fetch_name_optionals_label($taskstatic->table_element);
}
$extralabels_task=$extrafields_task->fetch_name_optionals_label($taskstatic->table_element);

// Security check
$socid=0;
Expand Down
4 changes: 2 additions & 2 deletions test/phpunit/FunctionsLibTest.php
Expand Up @@ -639,11 +639,11 @@ public function testImgPicto()

$s=img_picto('title','/fullpath/img.png','',1);
print __METHOD__." s=".$s."\n";
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="" title="title">',$s,'testImgPicto3');
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="title" title="title">',$s,'testImgPicto3');

$s=img_picto('title','/fullpath/img.png','',true);
print __METHOD__." s=".$s."\n";
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="" title="title">',$s,'testImgPicto4');
$this->assertEquals('<img src="/fullpath/img.png" border="0" alt="title" title="title">',$s,'testImgPicto4');

$s=img_picto('title:alt','/fullpath/img.png','',true);
print __METHOD__." s=".$s."\n";
Expand Down

0 comments on commit b91edcc

Please sign in to comment.