N°4720 - Remove old unreferenced methods or pages that are @deprecated (#747)

* N°4720 - Remove old unreferenced methods that are @deprecated

* N°4720-Config addson getter/setter removal

* small deprecation removal

* revert @deprecation 3.3 removal: ResizeImageToFit

* small deprecation removal

* revert deprecation 3.3 removal: Config/GSetAddons
This commit is contained in:
odain-cbd
2025-09-11 15:52:00 +02:00
committed by GitHub
parent d728be119c
commit 696e2c9565
27 changed files with 126 additions and 1135 deletions

View File

@@ -24,7 +24,6 @@ class AjaxPage extends WebPage implements iTabbedPage
* @var array
*/
protected $m_oTabs;
private $m_sMenu; // If set, then the menu will be updated
const DEFAULT_PAGE_TEMPLATE_REL_PATH = 'pages/backoffice/ajaxpage/layout';
/** @var string */
@@ -55,7 +54,6 @@ class AjaxPage extends WebPage implements iTabbedPage
$this->m_oTabs = new TabManager();
$this->sContentType = 'text/html';
$this->sContentDisposition = 'inline';
$this->m_sMenu = "";
$this->sPromiseId = utils::ReadParam('ajax_promise_id', uniqid('ajax_', true));
utils::InitArchiveMode();
@@ -173,17 +171,6 @@ class AjaxPage extends WebPage implements iTabbedPage
$this->add_ready_script($this->m_oTabs->SelectTab($sTabContainer, $sTabCode));
}
/**
* @param string $sHtml
*
* @deprecated Will be removed in 3.0.0
*/
public function AddToMenu($sHtml)
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
$this->m_sMenu .= $sHtml;
}
/**
* @inheritDoc
*/
@@ -342,7 +329,7 @@ class AjaxPage extends WebPage implements iTabbedPage
{
assert(false);
}
/**
* @inheritDoc
*/

View File

@@ -60,11 +60,6 @@ class NiceWebPage extends WebPage
// - SearchForm
'js/searchformforeignkeys.js',
];
/** @inheritDoc */
protected const COMPATIBILITY_DEPRECATED_LINKED_SCRIPTS_REL_PATH = [
/** @deprecated 3.0.0 Not used in the backoffice since the introduction of the new tooltip lib. */
'js/hovertip.js',
];
const DEFAULT_PAGE_TEMPLATE_REL_PATH = 'pages/backoffice/nicewebpage/layout';
@@ -180,7 +175,7 @@ JS
{
$this->m_sRootUrl = $sRootUrl;
}
public function small_p($sText)
{
$this->add("<p style=\"font-size:smaller\">$sText</p>\n");
@@ -206,7 +201,7 @@ JS
public function MakeClassesSelect($sName, $sDefaultValue, $iWidthPx, $iActionCode = null)
{
// $aTopLevelClasses = array('bizService', 'bizContact', 'logInfra', 'bizDocument');
// These are classes wich root class is cmdbAbstractObject !
// These are classes wich root class is cmdbAbstractObject !
$this->add("<select id=\"select_$sName\" name=\"$sName\">");
$aValidClasses = array();
foreach(MetaModel::GetClasses('bizmodel') as $sClassName)
@@ -221,7 +216,7 @@ JS
}
ksort($aValidClasses);
$this->add(implode("\n", $aValidClasses));
$this->add("</select>");
}

View File

@@ -79,34 +79,6 @@ class TabManager
$oTab->AddSubBlock($oBlock);
}
/**
* @return int
* @deprecated 3.0.0
*/
public function GetCurrentTabLength()
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
return 0;
}
/**
* Truncates the given tab to the specifed length and returns the truncated part
*
* @param string $sTabContainer The tab container in which to truncate the tab
* @param string $sTab The name/identifier of the tab to truncate
* @param integer $iLength The length/offset at which to truncate the tab
*
* @return string The truncated part
* @deprecated 3.0.0
*/
public function TruncateTab(string $sTabContainer, string $sTab, int $iLength)
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
return '';
}
/**
* @param string $sTabContainer
* @param string $sTab
@@ -290,39 +262,6 @@ class TabManager
return $result;
}
/**
* Make the given tab the active one, as if it were clicked
* DOES NOT WORK: apparently in the *old* version of jquery
* that we are using this is not supported... TO DO upgrade
* the whole jquery bundle...
*
* @param string $sTabContainer
* @param string $sTabCode
*
* @return string
* @deprecated 3.0.0
*/
public function SelectTab(string $sTabContainer, string $sTabCode)
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
return '';
}
/**
* @param string $sContent
* @param WebPage $oPage
*
* @return mixed
* @deprecated 3.0.0
*/
public function RenderIntoContent(string $sContent, WebPage $oPage)
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
return '';
}
/**
* @param string $sTabContainer
* @param string $sTabCode

View File

@@ -1641,19 +1641,6 @@ JS;
}
}
/**
* 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 3.0.0 use utils::GetUniqueId() instead
*/
public function GetUniqueId()
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod('use utils::GetUniqueId() instead');
return utils::GetUniqueId();
}
/**
* Set the content-type (mime type) for the page's content
*

View File

@@ -197,7 +197,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage
// Tooltips
$this->LinkScriptFromAppRoot('node_modules/@popperjs/core/dist/umd/popper.min.js');
$this->LinkScriptFromAppRoot('node_modules/tippy.js/dist/tippy-bundle.umd.min.js');
// Toasts
$this->LinkScriptFromAppRoot('node_modules/toastify-js/src/toastify.js');
@@ -1028,23 +1028,6 @@ HTML;
return $this->m_oTabs->FindTab($sPattern, $sTabContainer);
}
/**
* Make the given tab the active one, as if it were clicked
* DOES NOT WORK: apparently in the *old* version of jquery
* that we are using this is not supported... TO DO upgrade
* the whole jquery bundle...
*
* @param string $sTabContainer
* @param string $sTabCode
*
* @deprecated 3.0.0
*/
public function SelectTab($sTabContainer, $sTabCode)
{
DeprecatedCallsLog::NotifyDeprecatedPhpMethod();
$this->add_ready_script($this->m_oTabs->SelectTab($sTabContainer, $sTabCode));
}
/**
* @inheritDoc
* @throws \Exception