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

#1277 Files: error when adding/deleting files under org

Alex Trofimov 8 лет назад
Родитель
Сommit
7cd573456f
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      modules/boonex/files/classes/BxFilesFormsEntryHelper.php

+ 3 - 3
modules/boonex/files/classes/BxFilesFormsEntryHelper.php

@@ -31,7 +31,7 @@ class BxFilesFormsEntryHelper extends BxBaseModFilesFormsEntryHelper
 			$iContentId = array_pop($aContentIds);
 			$aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
 			$oProfile = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);
-			$sUri = BxDolService::call($oProfile->getModule(), 'is_group_profile') ? $CNF['URI_GROUP_ENTRIES'] . '&profile_id=' . $oProfile->id() : $CNF['URI_AUTHOR_ENTRIES'] . '&profile_id=' . bx_get_logged_profile_id();
+			$sUri = $CNF['URI_AUTHOR_ENTRIES'] . '&profile_id=' . ($oProfile ? $oProfile->id() : bx_get_logged_profile_id());
 			$this->_redirectAndExit('page.php?i=' . $sUri);
 		}
 		else{
@@ -43,8 +43,8 @@ class BxFilesFormsEntryHelper extends BxBaseModFilesFormsEntryHelper
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
         $oProfile = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);
-        if (BxDolService::call($oProfile->getModule(), 'is_group_profile'))
-            $this->_redirectAndExit('page.php?i=' . $CNF['URI_GROUP_ENTRIES'] . '&profile_id=' . $oProfile->id());
+        if ($oProfile)
+            $this->_redirectAndExit('page.php?i=' . $CNF['URI_AUTHOR_ENTRIES'] . '&profile_id=' . $oProfile->id());
         else
             $this->_redirectAndExit($CNF['URL_HOME'], true, array(
                 'account_id' => getLoggedId(),