- Timestamp:
- 12/25/11 21:58:37 (5 months ago)
- Location:
- trunk/inc/classes
- Files:
-
- 1 added
- 9 edited
-
BxDolLanguages.php (added)
-
BxDolLanguagesQuery.php (modified) (1 diff)
-
BxDolMemberMenu.php (modified) (2 diffs)
-
BxDolMenu.php (modified) (1 diff)
-
BxDolModuleConfig.php (modified) (2 diffs)
-
BxDolPermalinks.php (modified) (2 diffs)
-
BxDolStorageLocal.php (modified) (1 diff)
-
BxDolStorageQuery.php (modified) (1 diff)
-
BxDolTemplate.php (modified) (1 diff)
-
BxDolVoting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolLanguagesQuery.php
r15706 r15795 374 374 return $this->getPairs($sSql, 'IDParam', 'Description'); 375 375 } 376 377 378 376 } 377 /** @} */ -
trunk/inc/classes/BxDolMemberMenu.php
r15395 r15795 233 233 $oCache = $this -> getCacheObject(); 234 234 235 $oPermalinks = new BxDolPermalinks(); 235 bx_import('BxDolPermalinks'); 236 $oPermalinks = BxDolPermalinks::getInstance(); 236 237 $oUserStatus = new BxDolUserStatusView(); 237 238 $sMemberStatus = $oUserStatus -> getStatusIcon($aMemberInfo['ID']) ; … … 575 576 $this -> deleteMemberMenuCaches(); 576 577 577 $oPermalink = new BxDolPermalinks(); 578 bx_import('BxDolPermalinks'); 579 $oPermalink = BxDolPermalinks::getInstance(); 580 578 581 $aCacheData = array(); 579 582 -
trunk/inc/classes/BxDolMenu.php
r15770 r15795 44 44 $this->_aObject = $aObject; 45 45 $this->_oQuery = new BxDolMenuQuery($this->_aObject); 46 $this->_oPermalinks = new BxDolPermalinks();46 $this->_oPermalinks = BxDolPermalinks::getInstance(); 47 47 } 48 48 -
trunk/inc/classes/BxDolModuleConfig.php
r15751 r15795 6 6 */ 7 7 defined('BX_DOL') or die('hack attempt'); 8 9 bx_import('BxDolPermalinks');10 8 11 9 /** … … 105 103 */ 106 104 function getBaseUri() { 107 $oPermalinks = new BxDolPermalinks();108 return $oPermalinks->permalink('modules/?r=' . $this->_sUri . '/');105 bx_import('BxDolPermalinks'); 106 return BxDolPermalinks::getInstance()->permalink('modules/?r=' . $this->_sUri . '/'); 109 107 } 110 108 /** -
trunk/inc/classes/BxDolPermalinks.php
r15211 r15795 38 38 39 39 function BxDolPermalinks() { 40 if (isset($GLOBALS['bxDolClasses'][get_class($this)])) 41 trigger_error ('Multiple instances are not allowed for the class: ' . get_class($this), E_USER_ERROR); 42 40 43 parent::BxDolDb(); 41 44 … … 45 48 if(!$this->cache()) 46 49 $this->aLinks = array(); 50 } 51 52 /** 53 * Prevent cloning the instance 54 */ 55 public function __clone() { 56 if (isset($GLOBALS['bxDolClasses'][get_class($this)])) 57 trigger_error('Clone is not allowed for the class: ' . get_class($this), E_USER_ERROR); 58 } 59 60 /** 61 * Get singleton instance of the class 62 */ 63 static function getInstance() { 64 if(!isset($GLOBALS['bxDolClasses'][__CLASS__])) 65 $GLOBALS['bxDolClasses'][__CLASS__] = new BxDolPermalinks(); 66 67 return $GLOBALS['bxDolClasses'][__CLASS__]; 47 68 } 48 69 -
trunk/inc/classes/BxDolStorageLocal.php
r15631 r15795 129 129 protected function getObjectBaseUrl ($isPrivate = false) { 130 130 bx_import('BxDolPermalinks'); 131 $oPermalinks = new BxDolPermalinks(); 132 return BX_DOL_URL_ROOT . $oPermalinks->permalink('storage.php/?o=' . $this->_aObject['object'] . '&f='); 131 return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('storage.php/?o=' . $this->_aObject['object'] . '&f='); 133 132 } 134 133 -
trunk/inc/classes/BxDolStorageQuery.php
r15632 r15795 81 81 $a = array ('current_size' => 0, 'current_number' => 0, 'quota_size' => 0, 'quota_number' => 0, 'max_file_size' => 0); 82 82 83 // get quota_number and quota_size from user's acl/membership 84 require_once(BX_DIRECTORY_PATH_INC . "membership_levels.inc.php");85 $aMembershipInfo = getMemberMembershipInfo($iProfileId);83 // get quota_number and quota_size from user's acl/membership 84 bx_import('BxDolAcl'); 85 $aMembershipInfo = BxDolAcl::getInstance()->getMemberMembershipInfo($iProfileId); 86 86 if ($aMembershipInfo) { 87 if (isset($aMembershipInfo[' QuotaSize']))88 $a['quota_size'] = $aMembershipInfo[' QuotaSize'];89 if (isset($aMembershipInfo[' QuotaNumber']))90 $a['quota_number'] = $aMembershipInfo[' QuotaNumber'];91 if (isset($aMembershipInfo[' QuotaMaxFileSize']))92 $a['max_file_size'] = $aMembershipInfo[' QuotaMaxFileSize'];87 if (isset($aMembershipInfo['quota_size'])) 88 $a['quota_size'] = $aMembershipInfo['quota_size']; 89 if (isset($aMembershipInfo['quota_number'])) 90 $a['quota_number'] = $aMembershipInfo['quota_number']; 91 if (isset($aMembershipInfo['quota_max_file_size'])) 92 $a['max_file_size'] = $aMembershipInfo['quota_max_file_size']; 93 93 } 94 94 -
trunk/inc/classes/BxDolTemplate.php
r15788 r15795 204 204 if (isset($_GET[$this->_sCodeKey])) { 205 205 bx_import('BxDolPermalinks'); 206 $oPermalinks = new BxDolPermalinks(); 207 if ($oPermalinks->redirectIfNecessary(array($this->_sCodeKey))) 206 if(BxDolPermalinks::getInstance()->redirectIfNecessary(array($this->_sCodeKey))) 208 207 exit; 209 208 } -
trunk/inc/classes/BxDolVoting.php
r15733 r15795 242 242 function checkAction () 243 243 { 244 require_once(BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php');244 bx_import('BxDolAcl'); 245 245 if (isset($this->_checkActionResult)) 246 246 return $this->_checkActionResult;
Note: See TracChangeset
for help on using the changeset viewer.