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

Merge branch 'master' of https://github.com/boonex/dolphin

AntonLV 12 лет назад
Родитель
Сommit
8079c5f317

+ 29 - 0
install/classes/BxDolInstallSiteConfig.php

@@ -180,6 +180,30 @@ class BxDolInstallSiteConfig
                 'func' => 'rowSectionClose',
             ),
 
+            // link with boonex market
+
+            'section_link_to_market_open' => array(
+                'name' => _t('_sys_inst_conf_section_link_with_market'),
+                'func' => 'rowSectionOpen',
+            ),
+
+            'oauth_key' => array(
+                'name' => _t('_sys_inst_conf_field_oauth_key'),
+                'ex' => '123abc4d',
+                'desc' => _t('_sys_inst_conf_desc_oauth_key_secret'),
+                'check' => array('checkLengthExactOrEmpty', 8),
+            ),
+            'oauth_secret' => array(
+                'name' => _t('_sys_inst_conf_field_oauth_secret'),
+                'ex' => '45de12368a9b367abc23512a',
+                'desc' => _t('_sys_inst_conf_desc_oauth_key_secret'),
+                'check' => array('checkLengthExactOrEmpty', 24),
+            ),
+
+            'section_link_to_market_close' => array(
+                'func' => 'rowSectionClose',
+            ),
+
             // modules
 
             'section_modules_open' => array(
@@ -549,6 +573,11 @@ EOF;
         return mb_strlen($s) >= $i ? true : false;
     }
 
+    protected function checkLengthExactOrEmpty ($s, $i)
+    {
+        return empty($s) || mb_strlen($s) == $i;
+    }
+
     protected function checkEmail ($s, $i)
     {
         return mb_strlen($s) > $i && false !== strpos($s, '@') ? true : false;

+ 2 - 0
install/sql/addon.sql

@@ -10,6 +10,8 @@ INSERT INTO `sys_profiles` (`account_id`, `type`, `content_id`, `status`) VALUES
 UPDATE `sys_options` SET `VALUE` = '{admin_email}' WHERE `Name` = 'site_email';
 UPDATE `sys_options` SET `VALUE` = '{site_title}' WHERE `Name` = 'site_title';
 UPDATE `sys_options` SET `VALUE` = '{site_email}' WHERE `Name` = 'site_email_notify';
+UPDATE `sys_options` SET `VALUE` = '{oauth_key}' WHERE `Name` = 'sys_oauth_key';
+UPDATE `sys_options` SET `VALUE` = '{oauth_secret}' WHERE `Name` = 'sys_oauth_secret';
 UPDATE `sys_options` SET `VALUE` = '{time}' WHERE `Name` = 'sys_install_time';
 
 UPDATE `sys_modules` SET `version` = '{version}' WHERE `name` = 'system';

+ 4 - 0
modules/boonex/english/data/langs/system.xml

@@ -1642,6 +1642,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_inst_conf_desc_db_sock"><![CDATA[Leave blank or specify MySQL database socket path.]]></string>
 	<string name="_sys_inst_conf_desc_db_user"><![CDATA[Your MySQL database user name with read/write access.]]></string>
 	<string name="_sys_inst_conf_desc_language"><![CDATA[Language to install by default.]]></string>
+	<string name="_sys_inst_conf_desc_oauth_key_secret"><![CDATA[<a target="_blank" href="http://www.boonex.com/oauth/get_consumer">Get BoonEx key&secret</a>]]></string>
 	<string name="_sys_inst_conf_desc_path_to_binary"><![CDATA[If '{0}' binary doesn't exist, you need to install <a target="_blank" href="http://www.imagemagick.org/">ImageMagick</a>.]]></string>
 	<string name="_sys_inst_conf_desc_root_dir"><![CDATA[Path to directory where Dolphin files are stored.]]></string>
 	<string name="_sys_inst_conf_desc_site_email"><![CDATA[Email to send site messages from.]]></string>
@@ -1659,6 +1660,8 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_inst_conf_field_db_sock"><![CDATA[Database socket path]]></string>
 	<string name="_sys_inst_conf_field_db_user"><![CDATA[Database user]]></string>
 	<string name="_sys_inst_conf_field_language"><![CDATA[Language]]></string>
+	<string name="_sys_inst_conf_field_oauth_key"><![CDATA[BoonEx key]]></string>
+	<string name="_sys_inst_conf_field_oauth_secret"><![CDATA[BoonEx secret]]></string>
 	<string name="_sys_inst_conf_field_path_to_binary"><![CDATA[Path to '{0}' binary]]></string>
 	<string name="_sys_inst_conf_field_root_dir"><![CDATA[Site directory]]></string>
 	<string name="_sys_inst_conf_field_site_email"><![CDATA[Site e-mail]]></string>
@@ -1669,6 +1672,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_inst_conf_no_example"><![CDATA[no example]]></string>
 	<string name="_sys_inst_conf_not_found"><![CDATA[<span style="color:red">Not found</span>]]></string>
 	<string name="_sys_inst_conf_section_db_config"><![CDATA[DB config]]></string>
+	<string name="_sys_inst_conf_section_link_with_market"><![CDATA[Link with BoonEx market]]></string>
 	<string name="_sys_inst_conf_section_modules"><![CDATA[Modules]]></string>
 	<string name="_sys_inst_conf_section_paths"><![CDATA[Site paths]]></string>
 	<string name="_sys_inst_conf_section_site_info"><![CDATA[Site info]]></string>