diff options
Diffstat (limited to '')
-rw-r--r-- | frontend/install/classes/class.DisplayCheck.php | 4 | ||||
-rw-r--r-- | frontend/install/classes/class.DisplayDatabase.php | 3 | ||||
-rw-r--r-- | frontend/install/classes/class.DisplaySettings.php | 13 | ||||
-rw-r--r-- | frontend/install/classes/class.ImportDB.php | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/frontend/install/classes/class.DisplayCheck.php b/frontend/install/classes/class.DisplayCheck.php index 81d7fc7..70c8be2 100644 --- a/frontend/install/classes/class.DisplayCheck.php +++ b/frontend/install/classes/class.DisplayCheck.php @@ -128,7 +128,7 @@ class DisplayCheck{ echo '<div class="bottom_buttons">';
echo ' <a href="index.php?step=welcome"><input name="back" value="'.$lang['back'].'" type="button"></a>';
if(!$red_error)
- echo ' <a href="index.php?step=settings"><input type="button" value="'.$lang['next1'].'"></a>';
+ echo ' <a href="index.php?step=database"><input type="button" value="'.$lang['next1'].'"></a>';
else
echo ' <a href="index.php?step=check"><input type="button" value="Ponovno preveri"></a>';
echo '</div>';
@@ -171,7 +171,7 @@ class DisplayCheck{ $result['version']['value'] = $php_version;
// Zahtevan je php 7 ali 8.0
- if(substr($php_version, 0, 1) != '7' && substr($php_version, 0, 3) != '8.0'){
+ if(substr($php_version, 0, 1) != '7' && substr($php_version, 0, 3) != '8.0' && substr($php_version, 0, 3) != '8.1'){
$result['version']['error'] = 2;
}
diff --git a/frontend/install/classes/class.DisplayDatabase.php b/frontend/install/classes/class.DisplayDatabase.php index 0703ac6..d4a1861 100644 --- a/frontend/install/classes/class.DisplayDatabase.php +++ b/frontend/install/classes/class.DisplayDatabase.php @@ -76,7 +76,6 @@ class DisplayDatabase{ public function displayUpdate($update){
global $site_url;
global $lang;
- global $debug;
global $admin_type;
echo '<p>'.$lang['install_database_update'].'</p>';
@@ -86,7 +85,7 @@ class DisplayDatabase{ echo '<p>'.$lang['install_database_version_update'].': <b>'.$update['new_version'].'</b></p>';
// Ce smo admin ali v debugu izpisemo tudi vrstice za update
- if($admin_type == '0' || $debug == '1'){
+ if($admin_type == '0' || isDebug()){
foreach ($update['update_lines'] as $key => $update_line) {
echo $update_line.'<br /><br />';
diff --git a/frontend/install/classes/class.DisplaySettings.php b/frontend/install/classes/class.DisplaySettings.php index f3ea45b..c0c729f 100644 --- a/frontend/install/classes/class.DisplaySettings.php +++ b/frontend/install/classes/class.DisplaySettings.php @@ -56,7 +56,6 @@ class DisplaySettings{ private function displaySettingsApp(){
global $lang;
global $app_settings;
- global $confirm_registration;
echo '<h3>'.$lang['install_settings_app_title'].'</h3>';
@@ -170,8 +169,8 @@ class DisplaySettings{ echo '<div class="settings_item radio">';
echo ' <div class="what">'.$lang['install_settings_confirm_registration'].':</div>';
echo ' <div class="value">';
- echo ' <input type="radio" name="confirm_registration" id="confirm_registration_0" value="0" '.($confirm_registration != '1' ? 'checked="checked"' : '').'><label for="confirm_registration_0">'.$lang['no'].'</label>';
- echo ' <input type="radio" name="confirm_registration" id="confirm_registration_1" value="1" '.($confirm_registration == '1' ? 'checked="checked"' : '').'><label for="confirm_registration_1">'.$lang['yes'].'</label>';
+ echo ' <input type="radio" name="confirm_registration" id="confirm_registration_0" value="0" '.(!AppSettings::getInstance()->getSetting('confirm_registration') ? 'checked="checked"' : '').'><label for="confirm_registration_0">'.$lang['no'].'</label>';
+ echo ' <input type="radio" name="confirm_registration" id="confirm_registration_1" value="1" '.(AppSettings::getInstance()->getSetting('confirm_registration') ? 'checked="checked"' : '').'><label for="confirm_registration_1">'.$lang['yes'].'</label>';
echo ' </div>';
echo '</div>';
}
@@ -248,8 +247,6 @@ class DisplaySettings{ private function displaySettingsGoogle(){
global $lang;
- global $recaptcha_sitekey;
- global $secret_captcha;
global $google_maps_API_key;
echo '<h3>'.$lang['install_settings_google_title'].'</h3>';
@@ -257,19 +254,19 @@ class DisplaySettings{ // Google recaptcha_sitekey
echo '<div class="settings_item text">';
echo ' <div class="what">'.$lang['install_settings_recaptcha_sitekey'].':</div>';
- echo ' <div class="value"><input type="text" name="recaptcha_sitekey" value="'.$recaptcha_sitekey.'"></div>';
+ echo ' <div class="value"><input type="text" name="recaptcha_sitekey" value="'.AppSettings::getInstance()->getSetting('google-recaptcha_sitekey').'"></div>';
echo '</div>';
// Google secret_captcha
echo '<div class="settings_item text">';
echo ' <div class="what">'.$lang['install_settings_secret_captcha'].':</div>';
- echo ' <div class="value"><input type="text" name="secret_captcha" value="'.$secret_captcha.'"></div>';
+ echo ' <div class="value"><input type="text" name="secret_captcha" value="'.AppSettings::getInstance()->getSetting('google-secret_captcha').'"></div>';
echo '</div>';
// Google google_maps_API_key
echo '<div class="settings_item text">';
echo ' <div class="what">'.$lang['install_settings_google_maps_API_key'].':</div>';
- echo ' <div class="value"><input type="text" name="google_maps_API_key" value="'.$google_maps_API_key.'"></div>';
+ echo ' <div class="value"><input type="text" name="google_maps_API_key" value="'.AppSettings::getInstance()->getSetting('google-maps_API_key').'"></div>';
echo '</div>';
}
diff --git a/frontend/install/classes/class.ImportDB.php b/frontend/install/classes/class.ImportDB.php index 5ba632f..3024c41 100644 --- a/frontend/install/classes/class.ImportDB.php +++ b/frontend/install/classes/class.ImportDB.php @@ -7,7 +7,7 @@ class ImportDB{
- var $clean_db_file = '../../sql/1ka_clean_27-7-2020.sql'; // Datoteka prazne baze za uvoz
+ var $clean_db_file = '../../sql/1ka_clean_26-11-2021.sql'; // Datoteka prazne baze za uvoz
var $update_db_file = '../../sql/update2.sql'; // Datoteka prazne baze za uvoz
var $version = ''; // Trenutna verzija 1ke
@@ -66,6 +66,10 @@ class ImportDB{ $sql = sisplet_query("SELECT * FROM misc WHERE what='version'");
if($sql !== FALSE && mysqli_num_rows($sql) > 0){
+ // Najprej updatamo se app_settings z ustrezno domeno
+ global $site_domain;
+ $sqlA = sisplet_query("UPDATE app_settings SET domain='".$site_domain."'");
+
$row = mysqli_fetch_array($sql);
$this->version = $row['value'];
|