mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-15 20:49:41 +01:00
fixes & partial sqlite support
This commit is contained in:
@@ -69,11 +69,11 @@ if (ip('submit'))
|
||||
@kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']);
|
||||
}
|
||||
$ids[] = $row['id'];
|
||||
$num++;
|
||||
$num++;
|
||||
$sizes += $row['size'];
|
||||
}
|
||||
|
||||
$SQL->free($result);
|
||||
$SQL->freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
@@ -105,9 +105,9 @@ if (ip('submit'))
|
||||
}
|
||||
}
|
||||
|
||||
//after submit
|
||||
//after submit
|
||||
$text = ($affected ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
|
||||
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .
|
||||
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .
|
||||
'&page=' . (ig('page') ? g('page', 'int') : '1') . '\');", 2000);</script>' . "\n";
|
||||
|
||||
$stylee = 'admin_info';
|
||||
@@ -231,8 +231,8 @@ else
|
||||
'thumb_link' => $url_thumb
|
||||
];
|
||||
|
||||
//fix ...
|
||||
$tdnum = $tdnum == 4 ? 0 : $tdnum+1;
|
||||
//fix ...
|
||||
$tdnum = $tdnum == 4 ? 0 : $tdnum+1;
|
||||
|
||||
$del[$row['id']] = p('del_' . $row['id']);
|
||||
|
||||
@@ -260,7 +260,7 @@ else
|
||||
}
|
||||
|
||||
//pages
|
||||
$total_pages = $Pager->getTotalPages();
|
||||
$total_pages = $Pager->getTotalPages();
|
||||
$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .
|
||||
(ig('last_visit') ? '&last_vists=' . g('last_visit', 'int') : '') .
|
||||
(ig('smt') ? '&smt=' . g('smt') : ''), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
|
||||
|
||||
@@ -460,7 +460,7 @@ if (ip('newgroup'))
|
||||
];
|
||||
$SQL->build($insert_query);
|
||||
}
|
||||
$SQL->free($result);
|
||||
$SQL->freeresult($result);
|
||||
|
||||
//copy configs from the other group to this group
|
||||
$query = [
|
||||
@@ -480,7 +480,7 @@ if (ip('newgroup'))
|
||||
];
|
||||
$SQL->build($insert_query);
|
||||
}
|
||||
$SQL->free($result);
|
||||
$SQL->freeresult($result);
|
||||
|
||||
//copy exts from the other group to this group
|
||||
$query = [
|
||||
@@ -500,7 +500,7 @@ if (ip('newgroup'))
|
||||
];
|
||||
$SQL->build($insert_query);
|
||||
}
|
||||
$SQL->free($result);
|
||||
$SQL->freeresult($result);
|
||||
|
||||
//show group-is-added message
|
||||
delete_cache('data_groups');
|
||||
@@ -934,50 +934,6 @@ case 'group_exts':
|
||||
$d_groups[$req_group]['data']['group_name']);
|
||||
|
||||
|
||||
//check if there is klj_exts which means this is an upgraded website !
|
||||
if (empty($config['exts_upraded1_5']))
|
||||
{
|
||||
$ex_exts = $SQL->query("SHOW TABLES LIKE '{$dbprefix}exts';");
|
||||
|
||||
if ($SQL->num_rows($ex_exts))
|
||||
{
|
||||
$xquery = [
|
||||
'SELECT' => 'ext, gust_size, user_size, gust_allow, user_allow',
|
||||
'FROM' => "{$dbprefix}exts",
|
||||
'WHERE' => 'gust_allow=1 OR user_allow=1',
|
||||
];
|
||||
|
||||
$xresult = $SQL->build($xquery);
|
||||
|
||||
$xexts = '';
|
||||
while ($row=$SQL->fetch_array($xresult))
|
||||
{
|
||||
if ($row['gust_allow'])
|
||||
{
|
||||
$xexts .= ($xexts == '' ? '' : ',') . "('" . $SQL->escape($row['ext']) . "', 2, " . $row['gust_size'] . ')';
|
||||
}
|
||||
|
||||
if ($row['user_allow'])
|
||||
{
|
||||
$xexts .= ($xexts == '' ? '' : ',') . "('" . $SQL->escape($row['ext']) . "', 3, " . $row['user_size'] . ')';
|
||||
}
|
||||
}
|
||||
|
||||
$SQL->freeresult($result);
|
||||
|
||||
//delete prev exts before adding
|
||||
$query_del = [
|
||||
'DELETE' => "{$dbprefix}groups_exts",
|
||||
'WHERE' => 'group_id=2 OR group_id=3'
|
||||
];
|
||||
|
||||
$SQL->build($query_del);
|
||||
|
||||
$SQL->query("INSERT INTO {$dbprefix}groups_exts (ext, group_id, size) VALUES " . $xexts . ';');
|
||||
|
||||
add_config('exts_upraded1_5', 'done');
|
||||
}
|
||||
}
|
||||
|
||||
//delete ext?
|
||||
$DELETED_EXT = $GE_INFO = false;
|
||||
|
||||
@@ -66,7 +66,7 @@ if (ip('search_file'))
|
||||
$ids[] = $row['filter_id'];
|
||||
}
|
||||
|
||||
$SQL->free($result);
|
||||
$SQL->freeresult($result);
|
||||
|
||||
if ($ids != '')
|
||||
{
|
||||
@@ -128,7 +128,7 @@ if (ip('search_user'))
|
||||
{
|
||||
$ids[] = $row['filter_id'];
|
||||
}
|
||||
$SQL->free($result);
|
||||
$SQL->freeresult($result);
|
||||
|
||||
if ($ids != '')
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@ switch ($case):
|
||||
}
|
||||
}
|
||||
}
|
||||
$SQL->free($result);
|
||||
$SQL->freeresult($result);
|
||||
|
||||
//get available plugins
|
||||
$dh = opendir(PATH . KLEEJA_PLUGINS_FOLDER);
|
||||
@@ -332,9 +332,9 @@ switch ($case):
|
||||
$kleeja_plugin = [];
|
||||
|
||||
//don't show mysql errors
|
||||
if (! defined('MYSQL_NO_ERRORS'))
|
||||
if (! defined('SQL_NO_ERRORS'))
|
||||
{
|
||||
define('MYSQL_NO_ERRORS', true);
|
||||
define('SQL_NO_ERRORS', true);
|
||||
}
|
||||
|
||||
@include PATH . KLEEJA_PLUGINS_FOLDER . '/' . $plg_name . '/init.php';
|
||||
|
||||
@@ -29,7 +29,7 @@ $files_sizes = readable_size($stat_sizes);
|
||||
$users_number = $stat_users;
|
||||
$last_del_fles = (int) $config['del_f_day'] <= 0 ? $lang['CLOSED_FEATURE'] : kleeja_date($stat_last_f_del);
|
||||
$php_version = isset($NO_PHPINFO) || ! function_exists('phpinfo') ? phpversion() : 'PHP ' . phpversion();
|
||||
$mysql_version = 'MySQL ' . $SQL->mysql_version();
|
||||
$mysql_version = $SQL->server_info();
|
||||
$max_execution_time = function_exists('ini_get') ? @ini_get('max_execution_time') : @get_cfg_var('max_execution_time');
|
||||
$upload_max_filesize = function_exists('ini_get') ? @ini_get('upload_max_filesize') : @get_cfg_var('upload_max_filesize');
|
||||
$post_max_size = function_exists('ini_get') ? @ini_get('post_max_size') : @get_cfg_var('post_max_size');
|
||||
|
||||
Reference in New Issue
Block a user