Merge pull request #5403 from atm-florian/dev_fixwarning

Fix box PHP strict warning
This commit is contained in:
Laurent Destailleur 2016-06-30 21:34:26 +02:00 committed by GitHub
commit 03c420b34e
32 changed files with 174 additions and 136 deletions

View File

@ -167,12 +167,14 @@ class box_actions extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
function showBox($head = null, $contents = null, $nooutput=0)
{
global $langs, $conf;
parent::showBox($this->info_box_head, $this->info_box_contents);
$out='';
if (! empty($conf->global->SHOW_DIALOG_HOMEPAGE))
{
$actioncejour=false;
@ -183,8 +185,8 @@ class box_actions extends ModeleBoxes
$bcx[1] = 'class="box_impair"';
if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo"))
{
print '<div id="dialogboxaction" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
print '<table width=100%>';
$out.= '<div id="dialogboxaction" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
$out.= '<table width=100%>';
for ($line=0, $n=$nblines; $line < $n; $line++)
{
if (isset($contents[$line]))
@ -202,40 +204,45 @@ class box_actions extends ModeleBoxes
$urlsoc=$contents[$line][3]['url'];
$dateligne=$contents[$line][4]['text'];
$percentage=$contents[$line][5]['text'];
print '<tr '.$bcx[$var].'>';
print '<td align=center>';
print img_object("",$logo);
print '</td>';
print '<td align=center><a href="'.$urlevent.'">'.$label.'</a></td>';
print '<td align=center><a href="'.$urlsoc.'">'.img_object("",$logosoc)." ".$nomsoc.'</a></td>';
print '<td align=center>'.$dateligne.'</td>';
print '<td align=center>'.$percentage.'</td>';
print '</tr>';
$out.= '<tr '.$bcx[$var].'>';
$out.= '<td align=center>';
$out.= img_object("",$logo);
$out.= '</td>';
$out.= '<td align=center><a href="'.$urlevent.'">'.$label.'</a></td>';
$out.= '<td align=center><a href="'.$urlsoc.'">'.img_object("",$logosoc)." ".$nomsoc.'</a></td>';
$out.= '<td align=center>'.$dateligne.'</td>';
$out.= '<td align=center>'.$percentage.'</td>';
$out.= '</tr>';
}
}
print '</table>';
$out.= '</table>';
}
print '</div>';
$out.= '</div>';
if ($actioncejour)
{
print '<script>';
print '$("#dialogboxaction").dialog({ autoOpen: true });';
$out.= '<script>';
$out.= '$("#dialogboxaction").dialog({ autoOpen: true });';
if ($conf->global->SHOW_DIALOG_HOMEPAGE > 1) // autoclose after this delay
{
print 'setTimeout(function(){';
print '$("#dialogboxaction").dialog("close");';
print '}, '.($conf->global->SHOW_DIALOG_HOMEPAGE*1000).');';
$out.= 'setTimeout(function(){';
$out.= '$("#dialogboxaction").dialog("close");';
$out.= '}, '.($conf->global->SHOW_DIALOG_HOMEPAGE*1000).');';
}
print '</script>';
$out.= '</script>';
}
else
{
print '<script>';
print '$("#dialogboxaction").dialog({ autoOpen: false });';
print '</script>';
$out.= '<script>';
$out.= '$("#dialogboxaction").dialog({ autoOpen: false });';
$out.= '</script>';
}
}
if ($nooutput) return $out;
else print $out;
return '';
}
}

View File

@ -455,10 +455,11 @@ class box_activity extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -135,11 +135,12 @@ class box_bookmarks extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -157,11 +157,12 @@ class box_clients extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -176,11 +176,12 @@ class box_commandes extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -169,11 +169,12 @@ class box_comptes extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -163,11 +163,12 @@ class box_contacts extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -157,11 +157,12 @@ class box_contracts extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -184,11 +184,12 @@ class box_external_rss extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -180,11 +180,12 @@ class box_factures extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @return void
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -189,11 +189,12 @@ class box_factures_fourn extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -186,11 +186,12 @@ class box_factures_fourn_imp extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -182,11 +182,12 @@ class box_factures_imp extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -144,11 +144,12 @@ class box_ficheinter extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -139,11 +139,12 @@ class box_fournisseurs extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -158,11 +158,12 @@ class box_goodcustomers extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -263,11 +263,12 @@ class box_graph_invoices_permonth extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -262,11 +262,12 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -263,11 +263,12 @@ class box_graph_orders_permonth extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -262,11 +262,12 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -390,11 +390,12 @@ class box_graph_product_distribution extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -264,11 +264,12 @@ class box_graph_propales_permonth extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -169,11 +169,12 @@ class box_members extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -192,11 +192,12 @@ class box_produits extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -199,11 +199,12 @@ class box_produits_alerte_stock extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -173,11 +173,12 @@ class box_project extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -166,11 +166,12 @@ class box_propales extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -167,11 +167,12 @@ class box_prospect extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -175,11 +175,12 @@ class box_services_contracts extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -147,11 +147,12 @@ class box_services_expired extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -171,11 +171,12 @@ class box_supplier_orders extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @return void
*/
function showBox($head = null, $contents = null)
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}

View File

@ -137,10 +137,11 @@ class box_task extends ModeleBoxes
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void
*/
function showBox($head = null, $contents = null)
function showBox($head = null, $contents = null, $nooutput=0)
{
parent::showBox($this->info_box_head, $this->info_box_contents);
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
}
}