mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-16 04:59:42 +01:00
Merge branch 'master' into next-version
This commit is contained in:
21
LICENSE.md
Normal file
21
LICENSE.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2022 Kleeja
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -757,13 +757,15 @@ function delete_olang($words = '', $lang = 'en', $plg_id = 0)
|
|||||||
|
|
||||||
if (! empty($lang))
|
if (! empty($lang))
|
||||||
{
|
{
|
||||||
if(is_array($lang))
|
if (is_array($lang))
|
||||||
{
|
{
|
||||||
foreach ($lang as $index=>$current_lang) {
|
foreach ($lang as $index=>$current_lang) {
|
||||||
$lang[$index] = $SQL->escape($lang[$index]);
|
$lang[$index] = $SQL->escape($lang[$index]);
|
||||||
}
|
}
|
||||||
$lang_sql = "(lang_id = '" . implode("' OR lang_id = '", $lang) . "')";
|
$lang_sql = "(lang_id = '" . implode("' OR lang_id = '", $lang) . "')";
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$lang_sql = "lang_id = '" . $SQL->escape($lang) . "'";
|
$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
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -967,7 +969,7 @@ function klj_clean_old($table, $for = 'all')
|
|||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.id, f.time',
|
'SELECT' => 'f.id, f.time',
|
||||||
'FROM' => "`{$dbprefix}" . $table . '` f',
|
'FROM' => "`{$dbprefix}" . $table . '` f',
|
||||||
'ORDER BY' => 'f.id ASC',
|
'ORDER BY' => 'f.id ASC',
|
||||||
'LIMIT' => '30',
|
'LIMIT' => '30',
|
||||||
];
|
];
|
||||||
@@ -1204,10 +1206,10 @@ function g($name, $type = 'str', $default = '')
|
|||||||
{
|
{
|
||||||
if (isset($_GET[$name]))
|
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 = '')
|
function p($name, $type = 'str', $default = '')
|
||||||
@@ -1215,7 +1217,7 @@ function p($name, $type = 'str', $default = '')
|
|||||||
if (isset($_POST[$name]))
|
if (isset($_POST[$name]))
|
||||||
{
|
{
|
||||||
return $type == 'str'
|
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]);
|
: intval($_POST[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user