mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-11 02:10:12 +03:00
Remove redundant legacy code
This commit is contained in:
parent
81e2e345a7
commit
fd94b0108c
@ -17,19 +17,6 @@
|
|||||||
* limitations under the License.
|
* 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 "
|
|
||||||
. "&& 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)
|
function no_field($key)
|
||||||
{
|
{
|
||||||
return getlocal('Please fill "{0}".', array(getlocal($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)));
|
return getlocal('Please fill "{0}" correctly.', array(getlocal($key)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_params($servlet, $params)
|
|
||||||
{
|
|
||||||
$infix = '?';
|
|
||||||
if (strstr($servlet, $infix) !== false) {
|
|
||||||
$infix = '&';
|
|
||||||
}
|
|
||||||
foreach ($params as $k => $v) {
|
|
||||||
$servlet .= $infix . $k . "=" . $v;
|
|
||||||
$infix = '&';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $servlet;
|
|
||||||
}
|
|
||||||
|
@ -17,29 +17,6 @@
|
|||||||
* limitations under the License.
|
* 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 = '')
|
function cut_string($string, $length = 75, $ellipsis = '')
|
||||||
{
|
{
|
||||||
$result = '';
|
$result = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user