RomanL 8 anni fa
parent
commit
75848af400

+ 1 - 2
modules/boonex/charts/classes/BxChartsModule.php

@@ -45,8 +45,7 @@ class BxChartsModule extends BxDolModule
         $BxDolModuleQuery = BxDolModuleQuery::getInstance();
         $aModules = $BxDolModuleQuery->getModulesBy(array('type' => 'modules', 'active' => 1));
         foreach($aModules as $aModule){
-            $oModule = BxDolModule::getInstance($aModule['name']);
-            if($oModule instanceof iBxDolProfileService){
+            if(BxDolRequest::serviceExists($aModule['name'], 'act_as_profile') && BxDolService::call($aModule['name'], 'act_as_profile') == true){
                 $aResult[$aModule['name']] = $aModule['title'];
             }
         }

+ 4 - 4
modules/boonex/charts/install/langs/en.xml

@@ -6,10 +6,10 @@
 	<string name="_bx_charts_adm_stg_cpt_category_chart_top_contents_by_likes"><![CDATA[Top contents by likes]]></string>
 	<string name="_bx_charts_adm_stg_cpt_category_chart_most_active_profiles"><![CDATA[Most active profiles]]></string>
   <string name="_bx_charts_adm_stg_cpt_chart_top_contents_by_likes_modules_enabled"><![CDATA[Enabled for modules]]></string>
-  <string name="_bx_charts_adm_stg_cpt_chart_top_contents_by_likes_count"><![CDATA[Count]]></string>
-  <string name="_bx_charts_adm_stg_cpt_chart_most_active_profiles_modules_enabled"><![CDATA[Enabled for profiles from]]></string>
-  <string name="_bx_charts_adm_stg_cpt_chart_most_active_profiles_count"><![CDATA[Count]]></string>
-  <string name="_bx_charts_adm_stg_cpt_chart_most_active_profiles_posts_for_module"><![CDATA[For modules]]></string>
+  <string name="_bx_charts_adm_stg_cpt_chart_top_contents_by_likes_count"><![CDATA[Max number of items in the chart ]]></string>
+  <string name="_bx_charts_adm_stg_cpt_chart_most_active_profiles_modules_enabled"><![CDATA[Profiles modules]]></string>
+  <string name="_bx_charts_adm_stg_cpt_chart_most_active_profiles_count"><![CDATA[Max number of items in the chart ]]></string>
+  <string name="_bx_charts_adm_stg_cpt_chart_most_active_profiles_posts_for_module"><![CDATA[Modules to count content in]]></string>
   <string name="_bx_charts_page_block_title_system_chart_top_contents_by_likes"><![CDATA[Top contents by likes]]></string>
   <string name="_bx_charts_page_block_title_chart_top_contents_by_likes"><![CDATA[Top contents by likes]]></string>
   <string name="_bx_charts_page_block_title_system_chart_most_active_profiles"><![CDATA[Most active profiles]]></string>

+ 2 - 2
modules/boonex/charts/install/sql/enable.sql

@@ -13,7 +13,7 @@ SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_params`, `check_error`, `order`) VALUES
 (@iCategoryId, 'bx_charts_chart_top_contents_by_likes_modules_disabled', '_bx_charts_adm_stg_cpt_chart_top_contents_by_likes_modules_enabled', '', 'rlist', 'a:2:{s:6:"module";s:9:"bx_charts";s:6:"method";s:16:"get_text_modules";}', '', '', '', 1),
-(@iCategoryId, 'bx_charts_chart_top_contents_by_likes_count', '_bx_charts_adm_stg_cpt_chart_top_contents_by_likes_count', '5', 'digit', '', '', '', '', 2);
+(@iCategoryId, 'bx_charts_chart_top_contents_by_likes_count', '_bx_charts_adm_stg_cpt_chart_top_contents_by_likes_count', '4', 'digit', '', '', '', '', 2);
 
 INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `hidden`, `order`) VALUES(@iTypeId,  'bx_charts_chart_most_active_profiles', '_bx_charts_adm_stg_cpt_category_chart_most_active_profiles', 0, 2);
 SET @iCategoryId = LAST_INSERT_ID();
@@ -21,7 +21,7 @@ SET @iCategoryId = LAST_INSERT_ID();
 INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_params`, `check_error`, `order`) VALUES
 (@iCategoryId, 'bx_charts_chart_most_active_profiles_modules_disabled', '_bx_charts_adm_stg_cpt_chart_most_active_profiles_modules_enabled', '', 'rlist', 'a:2:{s:6:"module";s:9:"bx_charts";s:6:"method";s:19:"get_profile_modules";}', '', '', '', 1),
 (@iCategoryId, 'bx_charts_chart_most_active_profiles_posts_for_module_disabled', '_bx_charts_adm_stg_cpt_chart_most_active_profiles_posts_for_module', '', 'rlist', 'a:2:{s:6:"module";s:9:"bx_charts";s:6:"method";s:16:"get_text_modules";}', '', '', '', 2),
-(@iCategoryId, 'bx_charts_chart_most_active_profiles_count', '_bx_charts_adm_stg_cpt_chart_most_active_profiles_count', '5', 'digit', '', '', '', '', 3);
+(@iCategoryId, 'bx_charts_chart_most_active_profiles_count', '_bx_charts_adm_stg_cpt_chart_most_active_profiles_count', '4', 'digit', '', '', '', '', 3);
 
 -- PAGES: add page block on dashboard
 SET @iPBCellDashboard = 2;