Remove redundant legacy code

This commit is contained in:
Fedor A. Fetisov 2021-08-27 13:03:28 +03:00
parent 1210561448
commit 99fb30b0ec
2 changed files with 0 additions and 50 deletions

View File

@ -17,19 +17,6 @@
* limitations under the License.
*/
function get_popup($href, $js_href, $message, $title, $wnd_name, $options)
{
if (!$js_href) {
$js_href = "'$href'";
}
return "<a href=\"$href\" target=\"_blank\" "
. ($title ? "title=\"$title\" " : "")
. "onclick=\"if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 "
. "&amp;&amp; window.event.preventDefault) window.event.preventDefault();"
. "this.newWindow = window.open($js_href, '$wnd_name', '$options');"
. "this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>";
}
function no_field($key)
{
return getlocal('Please fill "{0}".', array(getlocal($key)));
@ -44,17 +31,3 @@ function wrong_field($key)
{
return getlocal('Please fill "{0}" correctly.', array(getlocal($key)));
}
function add_params($servlet, $params)
{
$infix = '?';
if (strstr($servlet, $infix) !== false) {
$infix = '&amp;';
}
foreach ($params as $k => $v) {
$servlet .= $infix . $k . "=" . $v;
$infix = '&amp;';
}
return $servlet;
}

View File

@ -17,29 +17,6 @@
* limitations under the License.
*/
function unicode_urldecode($url)
{
preg_match_all('/%u([[:alnum:]]{4})/', $url, $a);
foreach ($a[1] as $uniord) {
$dec = hexdec($uniord);
$utf = '';
if ($dec < 128) {
$utf = chr($dec);
} elseif ($dec < 2048) {
$utf = chr(192 + (($dec - ($dec % 64)) / 64));
$utf .= chr(128 + ($dec % 64));
} else {
$utf = chr(224 + (($dec - ($dec % 4096)) / 4096));
$utf .= chr(128 + ((($dec % 4096) - ($dec % 64)) / 64));
$utf .= chr(128 + ($dec % 64));
}
$url = str_replace('%u' . $uniord, $utf, $url);
}
return urldecode($url);
}
function cut_string($string, $length = 75, $ellipsis = '')
{
$result = '';