mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-15 20:49:41 +01:00
Merge branch 'master' into next-version
This commit is contained in:
@@ -757,13 +757,15 @@ function delete_olang($words = '', $lang = 'en', $plg_id = 0)
|
||||
|
||||
if (! empty($lang))
|
||||
{
|
||||
if(is_array($lang))
|
||||
if (is_array($lang))
|
||||
{
|
||||
foreach ($lang as $index=>$current_lang) {
|
||||
$lang[$index] = $SQL->escape($lang[$index]);
|
||||
}
|
||||
$lang_sql = "(lang_id = '" . implode("' OR lang_id = '", $lang) . "')";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang_sql = "lang_id = '" . $SQL->escape($lang) . "'";
|
||||
}
|
||||
|
||||
@@ -777,7 +779,7 @@ function delete_olang($words = '', $lang = 'en', $plg_id = 0)
|
||||
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('del_sql_delete_olang_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
|
||||
if(empty($delete_query['WHERE']))
|
||||
if (empty($delete_query['WHERE']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -967,7 +969,7 @@ function klj_clean_old($table, $for = 'all')
|
||||
|
||||
$query = [
|
||||
'SELECT' => 'f.id, f.time',
|
||||
'FROM' => "`{$dbprefix}" . $table . '` f',
|
||||
'FROM' => "`{$dbprefix}" . $table . '` f',
|
||||
'ORDER BY' => 'f.id ASC',
|
||||
'LIMIT' => '30',
|
||||
];
|
||||
@@ -1204,10 +1206,10 @@ function g($name, $type = 'str', $default = '')
|
||||
{
|
||||
if (isset($_GET[$name]))
|
||||
{
|
||||
return $type == 'str' ? htmlspecialchars($_GET[$name]) : intval($_GET[$name]);
|
||||
return $type == 'str' ? htmlspecialchars($_GET[$name], ENT_QUOTES) : intval($_GET[$name]);
|
||||
}
|
||||
|
||||
return $type == 'str' ? htmlspecialchars($default) : intval($default);
|
||||
return $type == 'str' ? htmlspecialchars($default, ENT_QUOTES) : intval($default);
|
||||
}
|
||||
|
||||
function p($name, $type = 'str', $default = '')
|
||||
@@ -1215,7 +1217,7 @@ function p($name, $type = 'str', $default = '')
|
||||
if (isset($_POST[$name]))
|
||||
{
|
||||
return $type == 'str'
|
||||
? str_replace(["\r\n", "\r", "\0"], ["\n", "\n", ''], htmlspecialchars(trim($_POST[$name])))
|
||||
? str_replace(["\r\n", "\r", "\0"], ["\n", "\n", ''], htmlspecialchars(trim($_POST[$name]), ENT_QUOTES))
|
||||
: intval($_POST[$name]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user