Просмотр исходного кода

Redirect URL setting option after account creation

Alex Trofimov 13 лет назад
Родитель
Сommit
9d969a6f8f
3 измененных файлов с 20 добавлено и 4 удалено
  1. 16 0
      .gitignore
  2. 2 1
      install/sql/v70.sql
  3. 2 3
      template/scripts/BxBaseAccountForms.php

+ 16 - 0
.gitignore

@@ -0,0 +1,16 @@
+# Exclude system cache folders
+cache/*
+cache_public/*
+tmp/*
+
+# Exclude main config file
+inc/header.inc.php
+  
+# Exclude OS X folder attributes
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+Thumbs.db
+

+ 2 - 1
install/sql/v70.sql

@@ -286,7 +286,8 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, 'sys_site_logo_alt', 'Site logo ALT text', '0', 'text', '', '', '', 18),
 (@iCategoryId, 'sys_site_icon', 'Site icon image ID', '0', 'digit', '', '', '', 19),
 (@iCategoryId, 'sys_email_confirmation', 'Enable email confirmation routine', 'on', 'checkbox', '', '', '', 20),
-(@iCategoryId, 'sys_tmp_version', 'Temporary Dolphin version ', '7.0.6', 'digit', '', '', '', 21);
+(@iCategoryId, 'sys_redirect_after_account_added', 'Redirect after account creation', 'page.php?i=create-profiles', 'digit', '', '', '', 21),
+(@iCategoryId, 'sys_tmp_version', 'Temporary Dolphin version ', '7.0.6', 'digit', '', '', '', 30);
 
 
 --

+ 2 - 3
template/scripts/BxBaseAccountForms.php

@@ -87,11 +87,10 @@ class BxBaseAccountForms extends BxDolProfileForms {
         bx_alert('account', 'added', $iAccountId);
 
         // redirect 
-        // TODO: add this url to settings
-        $this->_redirectAndExit('page.php?i=create-profiles', true, array(
+        $this->_redirectAndExit(getParam('sys_redirect_after_account_added'), true, array(
             'account_id' => $iAccountId, 
             'profile_id' => $iProfileId,
-        )); 
+        ));
     }
 
     public function editAccountEmailSettingsForm ($iAccountId) {