This commit is contained in:
Abdulrahman
2019-05-31 01:09:32 +03:00
parent e6f0162bf0
commit 4cf47abfd3
4 changed files with 16 additions and 5 deletions

View File

@@ -135,9 +135,13 @@ function do_config_export($srv, $usr, $pass, $nm, $prf, $type = 'mysql')
$data .= '$dbname = \'' . str_replace("'", "\'", $nm) . "'; // database name \n";
$data .= '$dbprefix = \'' . str_replace("'", "\'", $prf) . "'; // if you use prefix for tables , fill it \n";
if (file_put_contents(PATH . 'config.php', $data, LOCK_EX) !== false)
if (is_writable(PATH . 'config.php'))
{
return true;
if (@file_put_contents(PATH . 'config.php', $data, LOCK_EX) !== false)
{
return true;
}
}
if (defined('CLI') && CLI)
@@ -145,7 +149,6 @@ function do_config_export($srv, $usr, $pass, $nm, $prf, $type = 'mysql')
return true;
}
header('Content-Type: text/x-delimtext; name="config.php"');
header('Content-disposition: attachment; filename=config.php');
echo $data;

View File

@@ -11,7 +11,14 @@
{{if($GLOBALS['no_connection']): $GLOBALS['submit_disabled'] = true;}}
<div class="notice">
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />{{echo $lang['INST_CONNCET_ERR']}}</p>
<p class="error2">
<img src="style/images/k_info.png" class="img" alt=" " />
{{echo $lang['INST_CONNCET_ERR']}}
{{if(! empty($GLOBALS['dbtype']) && $GLOBALS['dbtype'] == 'sqlite'):}}
<br>
{{echo $lang['INST_CONNCET_ERR_SQLITE']}}
{{endif;}}
</p>
</div>
{{endif}}

View File

@@ -17,7 +17,7 @@ return [
'INST_ADMIN_INFO' => 'أدخل بيانات مدير المركز',
'INST_CHANG_CONFIG' => 'بعض البيانات المهمة ناقصة إملأ ملف config.php',
'INST_CONNCET_ERR' => 'لا يمكن الإتصال ...',
'INST_CONNCET_ERR_SQLITE' => 'تأكد من وجود ملف في مجلد كليجا الرئيسي بأسم: %s.',
'INST_NO_WRTABLE' => 'مجلد غير قابل للكتابة .. يحتاج تصريح 777',
'INST_GOOD_GO' => 'تم التأكد من المتغييرات والإتصال والتراخيص .. تابع',
'INST_MSGINS' => 'يمكنك تحميل ماتشاء وفق المسموح به .. شكراُ لزيارتك',

View File

@@ -17,6 +17,7 @@ return [
'INST_ADMIN_INFO' => 'Admin Info',
'INST_CHANG_CONFIG' => 'Missing requirements ... make sure you have edited the config.php file.',
'INST_CONNCET_ERR' => 'Cannot connect ..',
'INST_CONNCET_ERR_SQLITE' => 'Make sure that there is a file in Kleeja root folder called: %s.',
'INST_NO_WRTABLE' => 'The directory is not writable',
'INST_GOOD_GO' => 'Everything seems to be OK .... continue',
'INST_MSGINS' => 'Welcome to our uploading service, here you can upload anything as long as it does not violate our terms.',