소스 검색

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

AntonLV 8 년 전
부모
커밋
adb0e44c5c

+ 7 - 5
inc/classes/BxDolMetatags.php

@@ -390,7 +390,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
             return $s;
 
         foreach ($a as $sKeyword)
-            $s = str_ireplace('#' . $sKeyword, '<a class="bx-tag" rel="tag" href="' . $this->keywordsGetHashTagUrl($sKeyword) . '"><s>#</s><b>' . $sKeyword . '</b></a>', $s);
+            $s = str_ireplace('#' . $sKeyword, '<a class="bx-tag" rel="tag" href="' . $this->keywordsGetHashTagUrl($sKeyword, $iId) . '"><s>#</s><b>' . $sKeyword . '</b></a>', $s);
 
         return $s;
     }
@@ -409,17 +409,19 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
     
         foreach ($a as $sKeyword)
             if (0 === strcasecmp(mb_strtolower($s), mb_strtolower($sKeyword)))
-                $s = '<a class="bx-tag" rel="tag" href="' . $this->keywordsGetHashTagUrl($sKeyword) . '">' . $sKeyword . '</a>';
+                $s = '<a class="bx-tag" rel="tag" href="' . $this->keywordsGetHashTagUrl($sKeyword, $iId) . '">' . $sKeyword . '</a>';
 
         return $s;
     }
 	
-	public function keywordsGetHashTagUrl($sKeyword) 
+	public function keywordsGetHashTagUrl($sKeyword, $iId) 
     {   
         $sUrl = BX_DOL_URL_ROOT . 'searchKeyword.php?type=keyword&keyword=' . rawurlencode($sKeyword);
-        bx_alert('meta_keyword', 'add_url', 0, false, array(
+        bx_alert('meta_keyword', 'url', 0, false, array(
            'url' => &$sUrl,
-           'keyword' => $sKeyword
+           'keyword' => $sKeyword,
+		   'id' => $iId,
+		   'sObject' => $this->_sObject
         ));
 	    return $sUrl;
 	}

+ 4 - 2
inc/classes/BxDolMetatagsQuery.php

@@ -49,8 +49,10 @@ class BxDolMetatagsQuery extends BxDolDb
 
     public function keywordsDelete($mixedContentId)
     {
-        bx_alert('meta_keyword', 'deleted', $mixedContentId, bx_get_logged_profile_id(), array('object' => $this->_aObject['object']));
-        return $this->metaDelete($this->_aObject['table_keywords'], $mixedContentId);
+        $mixedResult = $this->metaDelete($this->_aObject['table_keywords'], $mixedContentId);
+        if ($mixedResult != false)
+            bx_alert('meta_keyword', 'deleted', $mixedContentId, bx_get_logged_profile_id(), array('object' => $this->_aObject['object']));
+        return $mixedResult;
     }
 
     public function keywordsGet($mixedContentId)

+ 1 - 0
modules/base/groups/classes/BxBaseModGroupsMenuSnippetMeta.php

@@ -30,6 +30,7 @@ class BxBaseModGroupsMenuSnippetMeta extends BxBaseModProfileMenuSnippetMeta
     {
         if (isset($CNF['OBJECT_CONNECTIONS']))
             return $this->_getMenuItemConnection($this->_oModule->_oConfig->CNF['OBJECT_CONNECTIONS'], 'add', $aItem);
+        return false;
     }
 
     protected function _getMenuItemLeave($aItem)

+ 3 - 1
modules/base/groups/classes/BxBaseModGroupsModule.php

@@ -329,7 +329,9 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
     
     public function serviceEntityInvite ($iContentId = 0, $bErrorMsg = true)
     {
-        return $this->_serviceEntityForm ('editDataForm', $iContentId, $this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE'], false, $bErrorMsg);
+		if (isset($this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE']))
+        	return $this->_serviceEntityForm ('editDataForm', $iContentId, $this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE'], false, $bErrorMsg);
+        return false;
     }
     
     /**

+ 4 - 4
modules/boonex/channels/classes/BxCnlAlertsResponse.php

@@ -27,12 +27,12 @@ class BxCnlAlertsResponse extends BxBaseModGroupsAlertsResponse
             }
         }
         
-        if ($oAlert->sUnit == 'meta_keyword' && $oAlert->sAction == 'add_url'){
+        if ($oAlert->sUnit == 'meta_keyword' && $oAlert->sAction == 'url'){
             if (isset($oAlert->aExtras['keyword'])){
                 $sName = $oAlert->aExtras['keyword'];
-                $id = $this->_oModule->_oDb->getChannelIdByName($sName);
-                if ($id > 0){
-                    $oAlert->aExtras['url'] = $this->_oModule->serviceProfileUrl($id);
+                $iCnlId = $this->_oModule->_oDb->getChannelIdByName($sName);
+                if ($iCnlId > 0){
+                    $oAlert->aExtras['url'] = $this->_oModule->serviceProfileUrl($iCnlId);
                 }
             }
         }

+ 0 - 1
modules/boonex/channels/classes/BxCnlConfig.php

@@ -93,7 +93,6 @@ class BxCnlConfig extends BxBaseModProfileConfig
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_channel_edit',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_channel_edit_cover',
             'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_channel_delete',
-            'OBJECT_FORM_ENTRY_DISPLAY_INVITE' => 'bx_channel_invite',
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_channels_view_actions', // actions menu on view entry page
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_channels_view_actions_more', // actions menu on view entry page for "more" popup
             'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_channels_my', // actions menu on profile entries page

+ 1 - 1
modules/boonex/channels/classes/BxCnlDb.php

@@ -10,7 +10,7 @@
  */
 
 /**
- * Spaces module database queries
+ * Channels module database queries
  */
 class BxCnlDb extends BxBaseModGroupsDb
 {

+ 1 - 1
modules/boonex/channels/classes/BxCnlFormEntry.php

@@ -10,7 +10,7 @@
  */
 
 /**
- * Create/Edit Space Form.
+ * Create/Edit Channel Form.
  */
 class BxCnlFormEntry extends BxBaseModGroupsFormEntry
 {

+ 1 - 1
modules/boonex/channels/classes/BxCnlFormsEntryHelper.php

@@ -10,7 +10,7 @@
  */
 
 /**
- * Spaces profile forms functions
+ * Channels profile forms functions
  */
 class BxCnlFormsEntryHelper extends BxBaseModGroupsFormsEntryHelper
 {

+ 1 - 1
modules/boonex/channels/classes/BxCnlMenuManageTools.php

@@ -10,7 +10,7 @@
  */
 
 /**
- * 'Spaces manage tools' menu.
+ * 'Channels manage tools' menu.
  */
 class BxCnlMenuManageTools extends BxBaseModGroupsMenuManageTools
 {

+ 0 - 1
modules/boonex/channels/classes/BxCnlModule.php

@@ -82,7 +82,6 @@ class BxCnlModule extends BxBaseModGroupsModule
         $oSearch->setMetaType('keyword');
         $aContentInfo = $this->_oDb->getContentInfoById(bx_get('id'));
         $_GET['keyword'] = $aContentInfo[$CNF['FIELD_NAME']];
-        $sCode = '';
         $sCode = $oSearch->response();
         if (!$sCode)
             $sCode = $oSearch->getEmptyResult();

+ 1 - 32
modules/boonex/channels/classes/BxCnlTemplate.php

@@ -10,7 +10,7 @@
  */
 
 /*
- * Spaces module representation.
+ * Channels module representation.
  */
 class BxCnlTemplate extends BxBaseModGroupsTemplate
 {
@@ -19,37 +19,6 @@ class BxCnlTemplate extends BxBaseModGroupsTemplate
         $this->MODULE = 'bx_channels';
         parent::__construct($oConfig, $oDb);
     }
-    
-    public function entryChilds($aData)
-    {
-        $CNF = $this->_oConfig->CNF;
-        $aChild = $this->_oModule->_oDb->getChildEntriesIdByProfileId($aData[$CNF['FIELD_ID']]);
-        
-        if (count($aChild) == 0)
-            return false;
-
-        return $this->parseHtmlByName('entry-childs.html', array('content' => $this->getBrowseQuick($aChild)));
-    }
-    
-    public function entryParent($aData)
-    {
-        $CNF = $this->_oConfig->CNF;
-        if ($aData[$CNF['FIELD_PARENT']] == 0)
-            return false;
-        return $this->parseHtmlByName('entry-parent.html', array('content' => $this->getBrowseQuick(array($aData[$CNF['FIELD_PARENT']]))));
-    }
-    
-    private function getBrowseQuick($aProfiles)
-    {
-        $sRv = '';
-        foreach ($aProfiles as $iProfileId) {
-            $oProfile = BxDolProfile::getInstance($iProfileId);
-            if(!$oProfile)
-                continue;
-            $sRv .= $oProfile->getUnit(false, array('template' => 'unit_live_search'));
-        }
-        return $sRv;
-    }
 }
 
 /** @} */

+ 1 - 4
modules/boonex/channels/install/sql/enable.sql

@@ -244,9 +244,6 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 
 
 -- ACL
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-('bx_channels', 'create entry', NULL, '_bx_channels_acl_action_create_profile', '', 1, 1);
-SET @iIdActionProfileCreate = LAST_INSERT_ID();
 
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
 ('bx_channels', 'delete entry', NULL, '_bx_channels_acl_action_delete_profile', '', 1, 1);
@@ -391,7 +388,7 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_channels', 'timeline_report', @iHandler),
 ('bx_channels', 'timeline_repost', @iHandler),
 ('meta_keyword', 'added', @iHandler),
-('meta_keyword', 'add_url', @iHandler),
+('meta_keyword', 'url', @iHandler),
 ('meta_keyword', 'deleted', @iHandler);
 
 

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

@@ -211,8 +211,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_channel', 'bx_channel_edit', 'bx_channels', 0, '_bx_channels_form_profile_display_edit'),
 ('bx_channel', 'bx_channel_edit_cover', 'bx_channels', 0, '_bx_channels_form_profile_display_edit_cover'),
 ('bx_channel', 'bx_channel_view', 'bx_channels', 1, '_bx_channels_form_profile_display_view'),
-('bx_channel', 'bx_channel_view_full', 'bx_channels', 1, '_bx_channels_form_profile_display_view_full'),
-('bx_channel', 'bx_channel_invite', 'bx_channels', 0, '_bx_channels_form_profile_display_invite');
+('bx_channel', 'bx_channel_view_full', 'bx_channels', 1, '_bx_channels_form_profile_display_view_full');
 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
 ('bx_channel', 'bx_channels', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_channels_form_profile_input_sys_delete_confirm', '_bx_channels_form_profile_input_delete_confirm', '_bx_channels_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_channels_form_profile_input_delete_confirm_error', '', '', 1, 0),
@@ -230,9 +229,6 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_channel_add', 'channel_name', 2147483647, 1, 7),
 ('bx_channel_add', 'do_submit', 2147483647, 1, 9),
 
-('bx_channel_invite', 'initial_members', 2147483647, 1, 1),
-('bx_channel_invite', 'do_submit', 2147483647, 1, 2),
-
 ('bx_channel_delete', 'delete_confirm', 2147483647, 1, 0),
 ('bx_channel_delete', 'cover', 2147483647, 0, 0),
 ('bx_channel_delete', 'picture', 2147483647, 0, 0),

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

@@ -21,7 +21,7 @@ DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_chann
 DELETE FROM `sys_objects_form` WHERE `module` = 'bx_channels';
 DELETE FROM `sys_form_displays` WHERE `module` = 'bx_channels';
 DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_channels';
-DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_channel_add', 'bx_channel_delete', 'bx_channel_edit', 'bx_channel_edit_cover', 'bx_channel_view', 'bx_channel_view_full', 'bx_channel_invite');
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_channel_add', 'bx_channel_delete', 'bx_channel_edit', 'bx_channel_edit_cover', 'bx_channel_view', 'bx_channel_view_full');
 
 -- PRE-VALUES
 

+ 0 - 1
modules/boonex/channels/template/entry-childs.html

@@ -1 +0,0 @@
-__content__

+ 0 - 1
modules/boonex/channels/template/entry-parent.html

@@ -1 +0,0 @@
-__content__

+ 2 - 2
modules/boonex/charts/classes/BxChartsTemplate.php

@@ -18,11 +18,11 @@ class BxChartsTemplate extends BxBaseModGeneralTemplate
         parent::__construct($oConfig, $oDb);
     }
     
-    function getChart($chartName, $height)
+    function getChart($sChartName, $iHeight)
     {
         $this->addJs(array('chart.min.js', 'chart.js'));
         $this->addCss(array('chart.css'));
-        return $this->getJsCode('chart', array('chartName' => $chartName, 'height' => $height)) . $this->parseHtmlByName('chart.html', array('chart_name' => $chartName));
+        return $this->getJsCode('chart', array('chartName' => $sChartName, 'height' => $iHeight)) . $this->parseHtmlByName('chart.html', array('chart_name' => $sChartName));
     }
     
     public function getJsCode($sType, $aParams = array(), $bWrap = true)

+ 4 - 4
periodic/.htaccess

@@ -1,4 +1,4 @@
-Deny from all
-<FilesMatch "^.*\.php|.*\.html$">
-ForceType application/x-httpd-php-source
-</FilesMatch>
+#Deny from all
+#<FilesMatch "^.*\.php|.*\.html$">
+#ForceType application/x-httpd-php-source
+#</FilesMatch>