N°2847 - Code refactor

This commit is contained in:
Eric
2020-11-25 15:27:47 +01:00
parent c5942a3ddd
commit 8f151b84c9
2 changed files with 21 additions and 4 deletions

View File

@@ -360,6 +360,14 @@ EOF
}
}
/**
* @inheritDoc
*/
public function GetUniqueId()
{
assert(false);
}
/**
* @inheritDoc
*/

View File

@@ -844,17 +844,26 @@ class WebPage implements Page
*/
public function add_input_hidden($sLabel, $aData)
{
foreach ($aData as $sKey => $sValue)
{
foreach ($aData as $sKey => $sValue) {
// Note: protection added to protect against the Notice 'array to string conversion' that appeared with PHP 5.4
// (this function seems unused though!)
if (is_scalar($sValue))
{
if (is_scalar($sValue)) {
$this->add("<input type=\"hidden\" name=\"".$sLabel."[$sKey]\" value=\"$sValue\">");
}
}
}
/**
* Get an ID (for any kind of HTML tag) that is guaranteed unique in this page
*
* @return int The unique ID (in this page)
* @deprecated since 3.0.0 use utils::GetUniqueId() instead
*/
public function GetUniqueId()
{
return utils::GetUniqueId();
}
/**
* Set the content-type (mime type) for the page's content
*