Explorar o código

Merge branch 'master' of https://github.com/unaio/una

AntonLV %!s(int64=5) %!d(string=hai) anos
pai
achega
dc8a6674b0
Modificáronse 36 ficheiros con 168 adicións e 38 borrados
  1. 4 1
      inc/classes/BxDolAcl.php
  2. 8 1
      inc/classes/BxDolCmts.php
  3. 4 2
      inc/classes/BxDolCmtsQuery.php
  4. 2 2
      inc/classes/BxDolProfile.php
  5. 5 0
      inc/js/functions.js
  6. 4 1
      modules/base/connect/classes/BxBaseModConnectModule.php
  7. 2 2
      modules/base/general/classes/BxBaseModGeneralDb.php
  8. 23 0
      modules/base/general/classes/BxBaseModGeneralModule.php
  9. 2 2
      modules/base/groups/classes/BxBaseModGroupsFormEntry.php
  10. 11 0
      modules/base/groups/classes/BxBaseModGroupsModule.php
  11. 2 2
      modules/boonex/albums/template/css/main.css
  12. 2 2
      modules/boonex/channels/classes/BxCnlConfig.php
  13. 17 8
      modules/boonex/channels/classes/BxCnlModule.php
  14. 8 5
      modules/boonex/channels/install/langs/en.xml
  15. 3 2
      modules/boonex/channels/install/sql/enable.sql
  16. 1 0
      modules/boonex/channels/install/sql/install.sql
  17. 1 0
      modules/boonex/courses/classes/BxCoursesConfig.php
  18. 1 0
      modules/boonex/courses/install/sql/install.sql
  19. 24 0
      modules/boonex/decorous/data/template/system/css/general.css
  20. 4 1
      modules/boonex/groups/classes/BxGroupsConfig.php
  21. 2 0
      modules/boonex/groups/install/langs/en.xml
  22. 3 1
      modules/boonex/groups/install/sql/enable.sql
  23. 1 0
      modules/boonex/groups/install/sql/install.sql
  24. 6 2
      modules/boonex/mailchimp/classes/BxMailchimpAlerts.php
  25. 1 1
      modules/boonex/mailchimp/classes/BxMailchimpModule.php
  26. 1 0
      modules/boonex/organizations/classes/BxOrgsConfig.php
  27. 1 0
      modules/boonex/organizations/install/sql/install.sql
  28. 1 0
      modules/boonex/posts/classes/BxPostsConfig.php
  29. 2 1
      modules/boonex/posts/install/langs/en.xml
  30. 2 1
      modules/boonex/posts/install/sql/enable.sql
  31. 3 0
      modules/boonex/russian/data/langs/bx_channels/ru.xml
  32. 1 0
      modules/boonex/spaces/classes/BxSpacesConfig.php
  33. 1 0
      modules/boonex/spaces/install/sql/install.sql
  34. 8 0
      samples/install_module.php
  35. 6 0
      template/location_field_plain.html
  36. 1 1
      template/scripts/BxBaseFormAccount.php

+ 4 - 1
inc/classes/BxDolAcl.php

@@ -581,8 +581,10 @@ class BxDolAcl extends BxDolFactory implements iBxDolSingleton
 
             // delete present and future memberships
             $bResult = $this->oDb->deleteLevelByProfileId($iProfileId);
-            if($bResult)
+            if($bResult) {
                 $this->oDb->cleanMemory('BxDolAclQuery::getLevelCurrent' . $iProfileId . time());
+                unset(self::$_aCacheData[$iProfileId . '_0']);
+            }
 
             return $bResult;
         }
@@ -600,6 +602,7 @@ class BxDolAcl extends BxDolFactory implements iBxDolSingleton
             $this->oDb->deleteLevelByProfileId($iProfileId, true); 
             $this->oDb->clearActionsTracksForMember($iProfileId);
             $this->oDb->cleanMemory('BxDolAclQuery::getLevelCurrent' . $iProfileId . time());
+            unset(self::$_aCacheData[$iProfileId . '_0']);
         }
         else
             $iDateStarts = $aMembershipLatest['date_expires'];

+ 8 - 1
inc/classes/BxDolCmts.php

@@ -1058,7 +1058,14 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
         if($this->isRemoveAllowedAll($isPerformAction))
             return true;
 
-        return abs($aCmt['cmt_author_id']) == $this->_getAuthorId() && $this->checkAction ('comments remove own', $isPerformAction);
+        if(abs($aCmt['cmt_author_id']) == $this->_getAuthorId() && $this->checkAction ('comments remove own', $isPerformAction))
+            return true;
+        
+        $mixedResult = BxDolService::call($this->_aSystem['module'], 'check_allowed_delete_comments', array($this->getId(), $this->_getAuthorId()));
+        if($mixedResult === CHECK_ACTION_RESULT_ALLOWED)
+            return true;
+        
+        return false;
     }
 
     public function isRemoveAllowedAll ($isPerformAction = false)

+ 4 - 2
inc/classes/BxDolCmtsQuery.php

@@ -312,6 +312,8 @@ class BxDolCmtsQuery extends BxDolDb
         
        	$sLimit = $iCount != -1 ? $this->prepareAsString(" LIMIT ?, ?", (int)$iStart, (int)$iCount) : '';
 
+        $sWhereClause = $sWhereParent . $sWhereFilter;
+           
         $sQuery = "SELECT
                 `{$this->_sTable}`.*,
                 `{$this->_sTableIds}`.`id` AS `cmt_unique_id`
@@ -319,8 +321,8 @@ class BxDolCmtsQuery extends BxDolDb
             FROM `{$this->_sTable}`
             LEFT JOIN `{$this->_sTableIds}` ON (`{$this->_sTable}`.`cmt_id` = `{$this->_sTableIds}`.`cmt_id` AND `{$this->_sTableIds}`.`system_id` = :system_id) ";
            
-        bx_alert('comment', 'get_comments', 0, bx_get_logged_profile_id(), array('system' => $this->_oMain->getSystemInfo(), 'select_clause' => &$sQuery, 'join_clause' => &$sJoin, 'where_clause' => &$sWhereParent, 'order_clause' => &$sOrder, 'limit_clause' => &$sLimit)); 
-        $sQuery = $sQuery . $sJoin . " WHERE `{$this->_sTable}`.`cmt_object_id` = :cmt_object_id" . $sWhereParent . $sOrder . $sLimit;
+        bx_alert('comment', 'get_comments', 0, bx_get_logged_profile_id(), array('system' => $this->_oMain->getSystemInfo(), 'select_clause' => &$sQuery, 'join_clause' => &$sJoin, 'where_clause' => &$sWhereClause, 'order_clause' => &$sOrder, 'limit_clause' => &$sLimit)); 
+        $sQuery = $sQuery . $sJoin . " WHERE `{$this->_sTable}`.`cmt_object_id` = :cmt_object_id" . $sWhereClause . $sOrder . $sLimit;
         
         return $this->getAll($sQuery, $aBindings);
     }

+ 2 - 2
inc/classes/BxDolProfile.php

@@ -427,7 +427,7 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
 
         // create system event before deletion
         $isStopDeletion = false;
-        bx_alert('profile', 'before_delete', $ID, 0, array('delete_with_content' => $bDeleteWithContent, 'stop_deletion' => &$isStopDeletion));
+        bx_alert('profile', 'before_delete', $ID, 0, array('delete_with_content' => $bDeleteWithContent, 'stop_deletion' => &$isStopDeletion, 'type' => $aProfileInfo['type']));
         if ($isStopDeletion)
             return false;
 
@@ -459,7 +459,7 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
             return false;
 
         // create system event
-        bx_alert('profile', 'delete', $ID, 0, array('delete_with_content' => $bDeleteWithContent));
+        bx_alert('profile', 'delete', $ID, 0, array('delete_with_content' => $bDeleteWithContent, 'type' => $aProfileInfo['type']));
 
         // unset class instance to prevent creating the instance again
         $this->_iProfileID = 0;

+ 5 - 0
inc/js/functions.js

@@ -874,6 +874,11 @@ function bx_time(sLang, isAutoupdate, sRootSel) {
             // process syntax hightlighing
             if ('undefined' !== typeof(Prism) && eElement.size())
                 Prism.highlightAllUnder(eElement[0]);
+
+            // flickity update
+            setTimeout(function () {
+                eElement.find('.flickity-enabled').flickity('resize');
+            }, 250);
         }
         if ('undefined' !== typeof(oCallback)) {
             oCallback(eElement);

+ 4 - 1
modules/base/connect/classes/BxBaseModConnectModule.php

@@ -185,7 +185,6 @@ class BxBaseModConnectModule extends BxBaseModGeneralModule
 
             // create account
             $aFieldsAccount['password'] = genRndPwd();
-            $aFieldsAccount['email_confirmed'] = $this->_oConfig->isAlwaysConfirmEmail; 
             if (!($iAccountId = $oFormAccount->insert($aFieldsAccount)))
                 return _t('_sys_txt_error_account_creation');
 
@@ -212,6 +211,10 @@ class BxBaseModConnectModule extends BxBaseModGeneralModule
                 $iProfileId = $iAccountProfileId;
             }
 
+            $oAccount = BxDolAccount::getInstance();
+            if ($oAccount)
+                $oAccount->updateEmailConfirmed($this->_oConfig->isAlwaysConfirmEmail);
+
             // send email with password
             sendMailTemplate($this->_oConfig->sEmailTemplatePasswordGenerated, $iAccountId, $iProfileId, array('password' => $aFieldsAccount['password']), BX_EMAIL_SYSTEM);
         }

+ 2 - 2
modules/base/general/classes/BxBaseModGeneralDb.php

@@ -286,8 +286,8 @@ class BxBaseModGeneralDb extends BxDolModuleDb
                     if(!isset($CNF['OBJECT_METATAGS']))
                         break;
                     if ($aSearchParam['type'] == 'location_radius'){
-                        if ($aSearchParam['value']['string'] != ''){
-                            list($fLatitude, $fLongitude, $sCountry, $sState, $sCity, $sZip, $sStreet, $sStreetNumber, $iRadius) = $aSearchParam['value']['array'];
+                        list($fLatitude, $fLongitude, $sCountry, $sState, $sCity, $sZip, $sStreet, $sStreetNumber, $iRadius) = $aSearchParam['value']['array'];
+                        if ($fLatitude && $fLongitude && $iRadius) {
                             $aBounds = bx_get_location_bounds_latlng($fLatitude, $fLongitude, $iRadius);   
                             $aSql = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS'])->locationsGetAsSQLPart($CNF['TABLE_ENTRIES'], $CNF['FIELD_ID'], '', '', '', '', $aBounds);
                         }

+ 23 - 0
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -2048,6 +2048,29 @@ class BxBaseModGeneralModule extends BxDolModule
         
         return $this->serviceCheckAllowedWithContent('comments_post', $iContentId);
     }
+    
+    public function serviceCheckAllowedDeleteComments($iContentId, $iProfileId) 
+    {
+        $CNF = &$this->_oConfig->CNF;
+        if (!isset($CNF['PARAM_ALLOW_CONTENT_AUTHOR_DELETE_ANY_COMMENTS']))
+            return CHECK_ACTION_RESULT_NOT_ALLOWED;
+        
+        if (getParam($CNF['PARAM_ALLOW_CONTENT_AUTHOR_DELETE_ANY_COMMENTS']) == 'on'){
+            $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+            
+            if ($aContentInfo[$CNF['FIELD_AUTHOR']] == $iProfileId)
+                return CHECK_ACTION_RESULT_ALLOWED;    
+            
+            if (isset($CNF['FIELD_ALLOW_VIEW_TO']) &&  $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] < 0){
+                $iGroupProfileId = -(int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']];
+                $oProfileContext = BxDolProfile::getInstance($iGroupProfileId);
+                $mixedResult = BxDolService::call($oProfileContext->getModule(), 'check_allowed_delete_comments_in_context', array($iGroupProfileId, $iProfileId));
+                if ($mixedResult === CHECK_ACTION_RESULT_ALLOWED)
+                    return CHECK_ACTION_RESULT_ALLOWED;
+            }
+        }
+        return CHECK_ACTION_RESULT_NOT_ALLOWED;
+    }
 
     public function serviceGetContentOwnerProfileId ($iContentId)
     {

+ 2 - 2
modules/base/groups/classes/BxBaseModGroupsFormEntry.php

@@ -64,8 +64,8 @@ class BxBaseModGroupsFormEntry extends BxBaseModProfileFormEntry
 
              $aValsToAdd[$CNF['FIELD_PUBLISHED']] = $iPublished;
         }
-
-        $aValsToAdd[$CNF['FIELD_STATUS']] = $aValsToAdd[$CNF['FIELD_PUBLISHED']] > $aValsToAdd[$CNF['FIELD_ADDED']] ? 'awaiting' : 'active';
+        
+        $aValsToAdd[$CNF['FIELD_STATUS']] = (isset($CNF['FIELD_PUBLISHED']) && ($aValsToAdd[$CNF['FIELD_PUBLISHED']] > $aValsToAdd[$CNF['FIELD_ADDED']])) ? 'awaiting' : 'active';
 
         return parent::insert ($aValsToAdd, $isIgnore);
     }

+ 11 - 0
modules/base/groups/classes/BxBaseModGroupsModule.php

@@ -1112,6 +1112,17 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
     {
         return $this->serviceCheckAllowedViewForProfile ($aDataEntry, $isPerformAction);
     }
+    
+    public function serviceCheckAllowedDeleteCommentsInContext($iGroupProfileId, $iProfileId) 
+    {
+        $CNF = &$this->_oConfig->CNF;
+        
+        if (getParam($CNF['PARAM_ALLOW_GROUP_ADMIN_DELETE_ANY_COMMENTS']) == 'on' &&  BX_BASE_MOD_GROUPS_ROLE_ADMINISTRATOR === $this->_oDb->getRole($iGroupProfileId, $iProfileId)){
+            return CHECK_ACTION_RESULT_ALLOWED;    
+        }
+        
+        return CHECK_ACTION_RESULT_NOT_ALLOWED;
+    }
 
     public function serviceCheckAllowedViewForProfile ($aDataEntry, $isPerformAction = false, $iProfileId = false)
     {

+ 2 - 2
modules/boonex/albums/template/css/main.css

@@ -173,8 +173,8 @@
     height: 11.25rem;
 }
 .bx-albums-unit-image {
-    display: -webkit-flex;
-    display: flex;
+    display: -webkit-inline-flex;
+    display: inline-flex;
     -webkit-justify-content: center;
     justify-content: center;
     -webkit-align-items: center;

+ 2 - 2
modules/boonex/channels/classes/BxCnlConfig.php

@@ -45,6 +45,7 @@ class BxCnlConfig extends BxBaseModGroupsConfig
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
+            'FIELD_STATUS' => 'status',
             'FIELDS_QUICK_SEARCH' => array('channel_name'),
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
 
@@ -60,8 +61,7 @@ class BxCnlConfig extends BxBaseModGroupsConfig
 
             'PARAM_DEFAULT_AUTHOR' => 'bx_channels_default_author',
             'PARAM_NUM_RSS' => 'bx_channels_num_rss',
-            'PARAM_NUM_CONNECTIONS_QUICK' => 'bx_channels_num_connections_quick',
-
+          
             'PARAM_SEARCHABLE_FIELDS' => 'bx_channels_searchable_fields',
             'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_channels_per_page_browse_showcase',
             'PARAM_PER_PAGE_BROWSE_RECOMMENDED' => 'bx_channels_per_page_browse_recommended',

+ 17 - 8
modules/boonex/channels/classes/BxCnlModule.php

@@ -41,8 +41,9 @@ class BxCnlModule extends BxBaseModGroupsModule
          * Note! For now metatag object name is used here as module name, because usually it's equal to module's name. This should be changed in Ticket #1596
          * For now if module cannot be created then a channel for such tag shouldn't be created too.
          */
+
         $oModule = BxDolModule::getInstance($sModuleName);
-        if(empty($oModule))
+        if(empty($oModule) && $sModuleName != 'sys_cmts')
             return;
 
         /*
@@ -294,6 +295,10 @@ class BxCnlModule extends BxBaseModGroupsModule
             return $sError;
 
         $aEventContent = $this->_oDb->getContentById($aEvent['object_id']);
+        
+        if ($aEventContent['module_name'] == 'sys_cmts')
+            return CHECK_ACTION_RESULT_ALLOWED;
+            
         if(empty($aEventContent) || !is_array($aEventContent))
             return $sError;
 
@@ -307,15 +312,20 @@ class BxCnlModule extends BxBaseModGroupsModule
     {
         if(empty($aEvent) || !is_array($aEvent))
             return false;
-
+        
         $aEventContent = $this->_oDb->getContentById($aEvent['object_id']);
         if(empty($aEventContent) || !is_array($aEventContent))
             return false;
-
+       
         $sModule = $aEventContent['module_name'];
-        if(!BxDolRequest::serviceExists($sModule, 'get_timeline_post'))
+        $sClass = 'Module';
+        if($sModule == 'sys_cmts'){
+            $sClass = 'TemplCmtsServices';
+            $sModule = 'system';
+        }
+        
+        if(!BxDolRequest::serviceExists($sModule, 'get_timeline_post', $sClass))
             return false;
-
         /**
          * Prepare fake event array (only mandatory parameters) to get
          * necessary data (related to an 'original' event with hashtag/label) 
@@ -331,16 +341,15 @@ class BxCnlModule extends BxBaseModGroupsModule
             if(is_numeric($mixedAllowViewTo) && (int)$mixedAllowViewTo < 0)
                 $iOwnerId = abs($mixedAllowViewTo);
         }
-
         $aResult = BxDolService::call($sModule, 'get_timeline_post', array(array(
             'owner_id' => $iOwnerId,
             'object_id' => $iContentId,
             'object_privacy_view' => $mixedObjectPrivacyView
-        ), $aBrowseParams));
+        ), $aBrowseParams), $sClass);
 
         if(empty($aResult) || !is_array($aResult))
             return $aResult;
-
+        
         /**
          * Note. The context shouldn't be changed therefore 
          * use input event's context (owner_id) in returned results.

+ 8 - 5
modules/boonex/channels/install/langs/en.xml

@@ -43,8 +43,9 @@
 	<string name="_bx_channels_acl_action_edit_any_profile"><![CDATA[Edit Any Channel]]></string>
 	<string name="_bx_channels_acl_action_delete_any_profile"><![CDATA[Delete Any Channel]]></string>
   <string name="_bx_channels_acl_action_create_channel_auto"><![CDATA[Create Channel Auto]]></string>
-
-	<string name="_bx_channels_page_title_sys_edit_profile"><![CDATA[Edit Channel]]></string>
+  <string name="_bx_channels_acl_action_create_channel_auto_info"><![CDATA[Automatically create new channel when new hashtag is mentioned by anyone with this level]]></string>
+ 
+  <string name="_bx_channels_page_title_sys_edit_profile"><![CDATA[Edit Channel]]></string>
 	<string name="_bx_channels_page_title_edit_profile"><![CDATA[Edit Channel]]></string>
 	<string name="_bx_channels_page_title_sys_edit_profile_cover"><![CDATA[Edit Channel Cover]]></string>
 	<string name="_bx_channels_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
@@ -77,10 +78,12 @@
 	<string name="_bx_channels_page_title_entries_search"><![CDATA[Search]]></string>
   <string name="_bx_channels_page_title_sys_entries_toplevel"><![CDATA[Top level]]></string>
   <string name="_bx_channels_page_title_entries_toplevel"><![CDATA[Top level]]></string>
-        <string name="_bx_channels_page_title_sys_entries_of_author"><![CDATA[Сhannels of author]]></string>
-        <string name="_bx_channels_page_title_entries_of_author"><![CDATA[Сhannels by {display_name}]]></string>
+  <string name="_bx_channels_page_title_sys_entries_of_author"><![CDATA[Сhannels of author]]></string>
+  <string name="_bx_channels_page_title_entries_of_author"><![CDATA[Сhannels by {display_name}]]></string>
 
-        <string name="_bx_channels_page_block_title_sys_entries_actions"><![CDATA[Channels actions]]></string>
+  <string name="_bx_channels_page_block_title_system_profile_subscribed_me"><![CDATA[Followers]]></string>
+  <string name="_bx_channels_page_block_title_profile_subscribed_me"><![CDATA[Followers]]></string>
+  <string name="_bx_channels_page_block_title_sys_entries_actions"><![CDATA[Channels actions]]></string>
 	<string name="_bx_channels_page_block_title_entries_actions"><![CDATA[Channels actions]]></string>
 	<string name="_bx_channels_page_block_title_sys_entries_of_author"><![CDATA[Followed Сhannels]]></string>
 	<string name="_bx_channels_page_block_title_entries_of_author"><![CDATA[Followed Сhannels]]></string>

+ 3 - 2
modules/boonex/channels/install/sql/enable.sql

@@ -35,7 +35,8 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_channels_view_profile', 2, 'bx_channels', '', '_bx_channels_page_block_title_entry_parent', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:13:"entity_parent";}', 0, 0, 1, 1),
 ('bx_channels_view_profile', 3, 'bx_channels', '', '_bx_channels_page_block_title_entry_childs', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:13:"entity_childs";}', 0, 0, 1, 1),
 ('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_search_results_by_hashtag', 0, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:24:\"search_result_by_hashtag\";}', 0, 0, 0, 0),
-('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 1);
+('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 1),
+('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_profile_subscribed_me', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:21:\"profile_subscribed_me\";}', 0, 1, 1, 0);
 
 -- PAGE: view closed profile 
 
@@ -289,7 +290,7 @@ INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`,
 SET @iIdActionProfileDeleteAny = LAST_INSERT_ID();
 
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-('bx_channels', 'create channel auto', NULL, '_bx_channels_acl_action_create_channel_auto', '', 1, 1);
+('bx_channels', 'create channel auto', NULL, '_bx_channels_acl_action_create_channel_auto', '_bx_channels_acl_action_create_channel_auto_info', 1, 1);
 SET @iIdActionCreateChannelAuto = LAST_INSERT_ID();
 
 SET @iUnauthenticated = 1;

+ 1 - 0
modules/boonex/channels/install/sql/install.sql

@@ -20,6 +20,7 @@ CREATE TABLE IF NOT EXISTS `bx_cnl_data` (
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
   `allow_view_to` varchar(255) DEFAULT '3',
+  `status` enum('active','awaiting','hidden') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
   UNIQUE INDEX channel_name (`channel_name`),
   FULLTEXT KEY `search_fields` (`channel_name`)

+ 1 - 0
modules/boonex/courses/classes/BxCoursesConfig.php

@@ -49,6 +49,7 @@ class BxCoursesConfig extends BxBaseModGroupsConfig
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
             'FIELD_VIEWS' => 'views',
+            'FIELD_STATUS' => 'status',
             'FIELD_COMMENTS' => 'comments',
             'FIELDS_QUICK_SEARCH' => array('name'),
             'FIELD_LOCATION' => 'location',

+ 1 - 0
modules/boonex/courses/install/sql/install.sql

@@ -26,6 +26,7 @@ CREATE TABLE IF NOT EXISTS `bx_courses_data` (
   `join_confirmation` tinyint(4) NOT NULL DEFAULT '1',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `allow_post_to` varchar(16) NOT NULL DEFAULT '3',
+  `status` enum('active','awaiting','hidden') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
   FULLTEXT KEY `search_fields` (`name`, `desc`)
 );

+ 24 - 0
modules/boonex/decorous/data/template/system/css/general.css

@@ -5,10 +5,18 @@
 #bx-toolbar {
 	z-index: 500;
 }
+.bx-media-phone #bx-toolbar-content{
+    display: flex;
+    justify-content: space-between;
+}
 #bx-logo-container {
     margin: 0.5rem 1.2rem;
     text-align: left;
 	height: auto;
+	flex-grow: 3
+}
+.bx-media-phone #bx-logo-container {
+	 margin: 0;
 }
 #bx-logo-container a {
 	color: #595959;
@@ -134,6 +142,22 @@
   font-size: 1.4rem;
 }
 
+@media (max-width: 720px){
+	.cd-side-nav {
+		top:57px;
+		box-shadow: none;
+	}
+	.bx-sliding-menu, .bx-sliding-menu-main{
+		width: 100% !important;
+		left:0px !important;
+		top:56px !important;
+	}
+	#bx-menu-toolbar-item-main-menu{
+		margin-top: 3px;
+	}
+}
+
+	
 @media only screen and (min-width: 720px) {
   .cd-side-nav {
     position: relative;

+ 4 - 1
modules/boonex/groups/classes/BxGroupsConfig.php

@@ -49,6 +49,7 @@ class BxGroupsConfig extends BxBaseModGroupsConfig
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
             'FIELD_VIEWS' => 'views',
+            'FIELD_STATUS' => 'status',
             'FIELD_COMMENTS' => 'comments',
             'FIELDS_QUICK_SEARCH' => array('group_name'),
             'FIELD_LOCATION' => 'location',
@@ -86,7 +87,9 @@ class BxGroupsConfig extends BxBaseModGroupsConfig
             'PARAM_RECURRING_RESERVE' => 3, // 3 days for recurring payment to be registered
             'PARAM_PER_PAGE_FOR_FAVORITES_LISTS' => 'bx_groups_per_page_for_favorites_lists',
             'PARAM_USE_IN' => 'bx_groups_internal_notifications',
-
+            'PARAM_ALLOW_CONTENT_AUTHOR_DELETE_ANY_COMMENTS' => 'bx_groups_allow_content_author_delete_any_comments',
+            'PARAM_ALLOW_GROUP_ADMIN_DELETE_ANY_COMMENTS' => 'bx_groups_allow_group_admin_delete_any_comments',
+            
             // objects
             'OBJECT_STORAGE' => 'bx_groups_pics',
             'OBJECT_STORAGE_COVER' => 'bx_groups_pics',

+ 2 - 0
modules/boonex/groups/install/langs/en.xml

@@ -11,6 +11,8 @@
     <string name="_bx_groups_option_members_mode_multi_roles"><![CDATA[Multi Roles]]></string>
     <string name="_bx_groups_option_per_page_for_favorites_lists"><![CDATA[Number of favorite lists per page]]></string>
     <string name="_bx_groups_option_internal_notifications"><![CDATA[Use internal notifications]]></string>
+    <string name="_bx_groups_option_allow_content_author_delete_any_comments"><![CDATA[Allow content author to delete any comments posted on their content page]]></string>
+    <string name="_bx_groups_option_allow_group_admin_delete_any_comments"><![CDATA[Allow group admin to delete any comments posted into group context]]></string>
 
     <string name="_bx_groups_form_profile"><![CDATA[Groups]]></string>
     <string name="_bx_groups_form_profile_display_add"><![CDATA[Add Group]]></string>

+ 3 - 1
modules/boonex/groups/install/sql/enable.sql

@@ -19,7 +19,9 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('bx_groups_per_page_for_favorites_lists', '5', @iCategId, '_bx_groups_option_per_page_for_favorites_lists', 'digit', '', '', '', 17),
 ('bx_groups_searchable_fields', 'group_name,group_desc', @iCategId, '_bx_groups_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:21:"get_searchable_fields";}', '', '', 30),
 ('bx_groups_members_mode', '', @iCategId, '_bx_groups_option_members_mode', 'select', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:24:"get_options_members_mode";}', '', '', 40),
-('bx_groups_internal_notifications', '', @iCategId, '_bx_groups_option_internal_notifications', 'checkbox', '', '', '', 50);
+('bx_groups_internal_notifications', '', @iCategId, '_bx_groups_option_internal_notifications', 'checkbox', '', '', '', 50),
+('bx_groups_allow_content_author_delete_any_comments', 'on', @iCategId, '_bx_groups_option_allow_content_author_delete_any_comments', 'checkbox', '', '', '', 55),
+('bx_groups_allow_group_admin_delete_any_comments', 'on', @iCategId, '_bx_groups_option_allow_group_admin_delete_any_comments', 'checkbox', '', '', '', 60);
 
 -- PAGES
 

+ 1 - 0
modules/boonex/groups/install/sql/install.sql

@@ -26,6 +26,7 @@ CREATE TABLE IF NOT EXISTS `bx_groups_data` (
   `join_confirmation` tinyint(4) NOT NULL DEFAULT '1',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `allow_post_to` varchar(16) NOT NULL DEFAULT '3',
+  `status` enum('active','awaiting','hidden') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
   FULLTEXT KEY `search_fields` (`group_name`, `group_desc`)
 );

+ 6 - 2
modules/boonex/mailchimp/classes/BxMailchimpAlerts.php

@@ -36,8 +36,12 @@ class BxMailchimpAlerts extends BxDolAlertsResponse
             $oProfile = BxDolProfile::getInstance($o->iObject);
             $oAccount = $oProfile ? $oProfile->getAccountObject() : null;
             
-            if ($oAccount)
-                $this->_oModule->serviceUpdateAccount($oAccount->id());
+            if ($oAccount) {
+                if ('delete' == $o->sAction && isset($o->aExtras['type']) && 'system' == $o->aExtras['type'])
+                    $this->_oModule->serviceRemoveAccount($oAccount->id());
+                else
+                    $this->_oModule->serviceUpdateAccount($oAccount->id());
+            }
         }
     }    
 }

+ 1 - 1
modules/boonex/mailchimp/classes/BxMailchimpModule.php

@@ -66,7 +66,7 @@ class BxMailchimpModule extends BxDolModule
 
         $aRet = array();
         foreach ($a['lists'] as $r)
-            $aRet[$r['id']] = $r['name'];
+            $aRet[] = array('key' => $r['id'], 'value' => $r['name']);
 
         if ($bAddEmptyValue)
             array_unshift($aRet, _t('_sys_please_select'));

+ 1 - 0
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -60,6 +60,7 @@ class BxOrgsConfig extends BxBaseModGroupsConfig
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
             'FIELD_ALLOW_CONTACT_TO' => 'allow_contact_to',
             'FIELD_VIEWS' => 'views',
+			'FIELD_STATUS' => 'status',
             'FIELD_COMMENTS' => 'comments',
             'FIELDS_QUICK_SEARCH' => array('org_name'),
             'FIELD_LOCATION' => 'location',

+ 1 - 0
modules/boonex/organizations/install/sql/install.sql

@@ -29,6 +29,7 @@ CREATE TABLE IF NOT EXISTS `bx_organizations_data` (
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `allow_post_to` varchar(16) NOT NULL DEFAULT '5',
   `allow_contact_to` varchar(16) NOT NULL DEFAULT '3',
+  `status` enum('active','awaiting','hidden') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
   FULLTEXT KEY `search_fields` (`org_name`,`org_desc`)
 );

+ 1 - 0
modules/boonex/posts/classes/BxPostsConfig.php

@@ -85,6 +85,7 @@ class BxPostsConfig extends BxBaseModTextConfig
             'PARAM_SEARCHABLE_FIELDS' => 'bx_posts_searchable_fields',
             'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_posts_per_page_browse_showcase',
             'PARAM_PER_PAGE_FOR_FAVORITES_LISTS' => 'bx_posts_per_page_for_favorites_lists',
+            'PARAM_ALLOW_CONTENT_AUTHOR_DELETE_ANY_COMMENTS' => 'bx_posts_allow_content_author_delete_any_comments',
 
             'PARAM_MULTICAT_ENABLED' => true,
             'PARAM_MULTICAT_AUTO_ACTIVATION_FOR_CATEGORIES' => 'bx_posts_auto_activation_for_categories',

+ 2 - 1
modules/boonex/posts/install/langs/en.xml

@@ -14,7 +14,8 @@
     <string name="_bx_posts_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
     <string name="_bx_posts_option_auto_activation_for_categories"><![CDATA[Auto-Activation For Categories]]></string>
     <string name="_bx_posts_option_per_page_for_favorites_lists"><![CDATA[Number of favorite lists per page]]></string>
-  
+    <string name="_bx_posts_option_allow_content_author_delete_any_comments"><![CDATA[Allow content author to delete any comments posted on their content page]]></string>
+
     <string name="_bx_posts_form_entry"><![CDATA[Posts]]></string>
     <string name="_bx_posts_form_entry_display_add"><![CDATA[Add Post]]></string>
     <string name="_bx_posts_form_entry_display_edit"><![CDATA[Edit Post]]></string>

+ 2 - 1
modules/boonex/posts/install/sql/enable.sql

@@ -20,7 +20,8 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_posts_per_page_for_favorites_lists', '5', @iCategId, '_bx_posts_option_per_page_for_favorites_lists', 'digit', '', '', '', 17),
 ('bx_posts_rss_num', '10', @iCategId, '_bx_posts_option_rss_num', 'digit', '', '', '', 20),
 ('bx_posts_searchable_fields', 'title,text', @iCategId, '_bx_posts_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:21:"get_searchable_fields";}', 30),
-('bx_posts_auto_activation_for_categories', 'on', @iCategId, '_bx_posts_option_auto_activation_for_categories', 'checkbox', '', '', '', 35);
+('bx_posts_auto_activation_for_categories', 'on', @iCategId, '_bx_posts_option_auto_activation_for_categories', 'checkbox', '', '', '', 35),
+('bx_posts_allow_content_author_delete_any_comments', 'on', @iCategId, '_bx_posts_option_allow_content_author_delete_any_comments', 'checkbox', '', '', '', 40);
 
 -- PAGE: create entry
 

+ 3 - 0
modules/boonex/russian/data/langs/bx_channels/ru.xml

@@ -43,6 +43,7 @@
 	<string name="_bx_channels_acl_action_edit_any_profile"><![CDATA[Редактировать любой канал]]></string>
 	<string name="_bx_channels_acl_action_delete_any_profile"><![CDATA[Удалять любой канал]]></string>
 	<string name="_bx_channels_acl_action_create_channel_auto"><![CDATA[Создавать канал автоматически]]></string>
+  <string name="_bx_channels_acl_action_create_channel_auto_info"><![CDATA[Автоматически создавать новый канал, когда новый хэштег упоминается кем-либо с этим уровнем]]></string>
 
 	<string name="_bx_channels_page_title_sys_edit_profile"><![CDATA[Редактировать канал]]></string>
 	<string name="_bx_channels_page_title_edit_profile"><![CDATA[Редактировать канал]]></string>
@@ -80,6 +81,8 @@
     <string name="_bx_channels_page_title_entries_toplevel"><![CDATA[Верхний уровень]]></string>
     <string name="_bx_channels_page_title_entries_of_author"><![CDATA[{display_name} - Каналы]]></string>
 
+    <string name="_bx_channels_page_block_title_system_profile_subscribed_me"><![CDATA[Подписчики]]></string>
+    <string name="_bx_channels_page_block_title_profile_subscribed_me"><![CDATA[Подписчики]]></string>
     <string name="_bx_channels_page_block_title_sys_entries_actions"><![CDATA[Каналы - Действия]]></string>
     <string name="_bx_channels_page_block_title_entries_actions"><![CDATA[Каналы - Действия]]></string>
     <string name="_bx_channels_page_block_title_sys_entries_of_author"><![CDATA[Просматриваемые каналы]]></string>

+ 1 - 0
modules/boonex/spaces/classes/BxSpacesConfig.php

@@ -51,6 +51,7 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_ALLOW_POST_TO' => 'allow_post_to',
             'FIELD_VIEWS' => 'views',
+            'FIELD_STATUS' => 'status',
             'FIELD_COMMENTS' => 'comments',
             'FIELDS_QUICK_SEARCH' => array('space_name'),
             'FIELD_LOCATION' => 'location',

+ 1 - 0
modules/boonex/spaces/install/sql/install.sql

@@ -28,6 +28,7 @@ CREATE TABLE IF NOT EXISTS `bx_spaces_data` (
   `join_confirmation` tinyint(4) NOT NULL DEFAULT '1',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `allow_post_to` varchar(16) NOT NULL DEFAULT '3',
+  `status` enum('active','awaiting','hidden') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
   FULLTEXT KEY `search_fields` (`space_name`, `space_desc`)
 );

+ 8 - 0
samples/install_module.php

@@ -0,0 +1,8 @@
+<?php
+
+$aPathInfo = pathinfo(__FILE__);
+require_once ($aPathInfo['dirname'] . '/../inc/header.inc.php');
+
+$a = BxDolStudioInstallerUtils::getInstance()->perform('boonex/intercom/', 'install', array('auto_enable' => true));
+echo json_encode($a);
+

+ 6 - 0
template/location_field_plain.html

@@ -35,6 +35,10 @@
         if (sCity.length)
             sRet = (sStreet.length && sNum.length ? sNum + ' ' : '') + (sStreet.length ? sStreet + ', ' : '') + sRet;
 
+        if ('undefined' !== typeof(sMode) &&  'address_wo_zip' == sMode) {
+            return sCity.length && sStreet.length ? (sStreet.length && sNum.length ? sNum + ' ' : '') + (sStreet.length ? sStreet + ', ' : '') + (sCity.length ? sCity + ', ': '') + (sState.length ? sState + ', ': '') + sCountry : '';
+        }
+
         return sRet;
     }
 
@@ -86,6 +90,8 @@
                 return;
             }
             var a = [s];
+            if (s = getLocationString('address_wo_zip'))
+                a.push(s);
             if (s = getLocationString('zip_only'))
                 a.push(s);
             if (s = getLocationString('city_only'))

+ 1 - 1
template/scripts/BxBaseFormAccount.php

@@ -161,7 +161,7 @@ class BxBaseFormAccount extends BxTemplFormView
         $bResult = parent::update ($val, $aValsToAdd, $aTrackTextFieldsChanges);
         
         if ($bResult){
-            $oAccount = BxDolAccount::getInstance($val);
+            $oAccount = BxDolAccount::getInstance($val, true);
             if ($oAccount) { 
                 $aAccountInfo = $oAccount->getInfo();
                 bx_alert('account', 'change_receive_news', 0, false, array('account_id' => $val, 'old_value' => $aAccountInfo['receive_news'], 'new_value' => $this->getCleanValue('receive_news'), 'email' => $aAccountInfo['email']));