Przeglądaj źródła

#140 system classes auto-loader

Alex Trofimov 11 lat temu
rodzic
commit
4335d3edbb
100 zmienionych plików z 25 dodań i 456 usunięć
  1. 0 2
      cmts.php
  2. 0 4
      conn.php
  3. 0 3
      get_rss_feed.php
  4. 0 1
      grid.php
  5. 0 2
      gzip_loader.php
  6. 0 3
      image_transcoder.php
  7. 0 10
      inc/classes/BxDolAccount.php
  8. 0 2
      inc/classes/BxDolAccountQuery.php
  9. 1 14
      inc/classes/BxDolAcl.php
  10. 0 2
      inc/classes/BxDolAclQuery.php
  11. 0 1
      inc/classes/BxDolAlerts.php
  12. 0 2
      inc/classes/BxDolCacheAPC.php
  13. 0 2
      inc/classes/BxDolCacheEAccelerator.php
  14. 0 2
      inc/classes/BxDolCacheFile.php
  15. 0 2
      inc/classes/BxDolCacheFileHtml.php
  16. 0 2
      inc/classes/BxDolCacheMemcache.php
  17. 0 2
      inc/classes/BxDolCacheXCache.php
  18. 0 6
      inc/classes/BxDolCaptcha.php
  19. 0 2
      inc/classes/BxDolCaptchaQuery.php
  20. 1 25
      inc/classes/BxDolCmts.php
  21. 0 4
      inc/classes/BxDolCmtsQuery.php
  22. 0 8
      inc/classes/BxDolConnection.php
  23. 0 2
      inc/classes/BxDolConnectionQuery.php
  24. 0 10
      inc/classes/BxDolCronPruning.php
  25. 0 2
      inc/classes/BxDolCronQuery.php
  26. 1 6
      inc/classes/BxDolCronStorage.php
  27. 0 4
      inc/classes/BxDolCronTranscoder.php
  28. 0 2
      inc/classes/BxDolCronUpgradeCheck.php
  29. 0 3
      inc/classes/BxDolCronUpgradeModulesCheck.php
  30. 0 5
      inc/classes/BxDolEditor.php
  31. 0 2
      inc/classes/BxDolEditorQuery.php
  32. 0 9
      inc/classes/BxDolEmailTemplates.php
  33. 0 2
      inc/classes/BxDolEmailTemplatesQuery.php
  34. 0 14
      inc/classes/BxDolForm.php
  35. 0 2
      inc/classes/BxDolFormNested.php
  36. 1 5
      inc/classes/BxDolFormQuery.php
  37. 0 2
      inc/classes/BxDolFtp.php
  38. 0 6
      inc/classes/BxDolGrid.php
  39. 0 10
      inc/classes/BxDolGridConnections.php
  40. 0 2
      inc/classes/BxDolGridQuery.php
  41. 0 4
      inc/classes/BxDolInformer.php
  42. 0 2
      inc/classes/BxDolInstallerHasher.php
  43. 0 7
      inc/classes/BxDolInstallerUtils.php
  44. 0 4
      inc/classes/BxDolKey.php
  45. 0 2
      inc/classes/BxDolKeyQuery.php
  46. 1 9
      inc/classes/BxDolLanguages.php
  47. 0 2
      inc/classes/BxDolLanguagesQuery.php
  48. 1 6
      inc/classes/BxDolLiveUpdates.php
  49. 0 2
      inc/classes/BxDolLiveUpdatesQuery.php
  50. 0 10
      inc/classes/BxDolMenu.php
  51. 0 2
      inc/classes/BxDolMenuQuery.php
  52. 3 11
      inc/classes/BxDolMetatags.php
  53. 0 2
      inc/classes/BxDolMetatagsQuery.php
  54. 0 1
      inc/classes/BxDolModule.php
  55. 0 1
      inc/classes/BxDolModuleConfig.php
  56. 0 2
      inc/classes/BxDolModuleQuery.php
  57. 0 5
      inc/classes/BxDolModuleTemplate.php
  58. 0 9
      inc/classes/BxDolPage.php
  59. 0 2
      inc/classes/BxDolPaginate.php
  60. 0 2
      inc/classes/BxDolPermalinks.php
  61. 0 7
      inc/classes/BxDolPrivacy.php
  62. 0 2
      inc/classes/BxDolPrivacyQuery.php
  63. 1 12
      inc/classes/BxDolProfile.php
  64. 2 3
      inc/classes/BxDolProfileForms.php
  65. 0 4
      inc/classes/BxDolProfileQuery.php
  66. 1 4
      inc/classes/BxDolProfileUndefined.php
  67. 2 6
      inc/classes/BxDolRequest.php
  68. 0 7
      inc/classes/BxDolRss.php
  69. 0 2
      inc/classes/BxDolRssBoonEx.php
  70. 0 3
      inc/classes/BxDolRssPageBlock.php
  71. 0 2
      inc/classes/BxDolRssQuery.php
  72. 0 6
      inc/classes/BxDolSearch.php
  73. 0 3
      inc/classes/BxDolService.php
  74. 0 2
      inc/classes/BxDolSession.php
  75. 0 2
      inc/classes/BxDolSessionQuery.php
  76. 0 4
      inc/classes/BxDolSocialSharing.php
  77. 0 2
      inc/classes/BxDolSocialSharingQuery.php
  78. 0 5
      inc/classes/BxDolStorage.php
  79. 0 3
      inc/classes/BxDolStorageLocal.php
  80. 0 3
      inc/classes/BxDolStorageQuery.php
  81. 0 2
      inc/classes/BxDolStorageS3.php
  82. 7 14
      inc/classes/BxDolTemplate.php
  83. 0 7
      inc/classes/BxDolTranscoder.php
  84. 0 5
      inc/classes/BxDolTranscoderImage.php
  85. 0 2
      inc/classes/BxDolTranscoderImageQuery.php
  86. 0 4
      inc/classes/BxDolTranscoderProxy.php
  87. 0 2
      inc/classes/BxDolTranscoderQuery.php
  88. 0 7
      inc/classes/BxDolTranscoderVideo.php
  89. 0 2
      inc/classes/BxDolTranscoderVideoQuery.php
  90. 0 1
      inc/classes/BxDolUpgrader.php
  91. 1 13
      inc/classes/BxDolUploader.php
  92. 0 2
      inc/classes/BxDolUploaderQuery.php
  93. 0 6
      inc/classes/BxDolView.php
  94. 0 2
      inc/classes/BxDolViewQuery.php
  95. 1 11
      inc/classes/BxDolVote.php
  96. 0 2
      inc/classes/BxDolVoteQuery.php
  97. 0 2
      inc/classes/BxDolXmlParser.php
  98. 0 5
      inc/design.inc.php
  99. 1 3
      inc/params.inc.php
  100. 0 8
      inc/profiles.inc.php

+ 0 - 2
cmts.php

@@ -10,7 +10,6 @@
 require_once('./inc/header.inc.php');
 require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
 
-bx_import('BxDolAcl');
 bx_import('BxDolLanguages');
 
 check_logged();
@@ -19,7 +18,6 @@ $sSys = isset($_REQUEST['sys']) ? bx_process_input($_REQUEST['sys']) : '';
 $iObjectId = isset($_REQUEST['id']) ? bx_process_input($_REQUEST['id'], BX_DATA_INT) : 0;
 $sAction = isset($_REQUEST['action']) && preg_match ('/^[A-Za-z_-]+$/', $_REQUEST['action']) ? bx_process_input($_REQUEST['action']) : '';
 
-bx_import('BxDolCmts');
 $oCmts = BxDolCmts::getObjectInstance($sSys, $iObjectId, true);
 
 if ($oCmts && $sSys && $iObjectId) {

+ 0 - 4
conn.php

@@ -16,7 +16,6 @@ $sObj = bx_get('obj') ? bx_get('obj') : '';
 $sAct = bx_get('act') && preg_match ('/^[A-Za-z_]+$/', bx_get('act')) ? bx_get('act') : '';
 $sFmt = bx_get('fmt') ? bx_get('fmt') : 'json';
 
-bx_import('BxDolConnection');
 $oConn = BxDolConnection::getObjectInstance($sObj);
 
 $sMethod = 'action' . $sAct;
@@ -27,9 +26,6 @@ if ($oConn && $sAct && method_exists($oConn, $sMethod)) {
 
 } else {
 
-    bx_import('BxDolLanguages');
-    bx_import('BxDolTemplate');
-
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->displayPageNotFound();
 

+ 0 - 3
get_rss_feed.php

@@ -13,7 +13,6 @@ $sObject = bx_process_input(bx_get('object'));
 $mixedId = bx_process_input(bx_get('id'));
 $iUserId = bx_process_input(bx_get('member'), BX_DATA_INT);
 
-bx_import('BxDolRss');
 $oRss = BxDolRss::getObjectInstance($sObject);
 
 if ($oRss && ($s = $oRss->getFeed($mixedId, $iUserId))) {
@@ -23,8 +22,6 @@ if ($oRss && ($s = $oRss->getFeed($mixedId, $iUserId))) {
 
 } else {
 
-    bx_import('BxDolLanguages');
-    bx_import('BxDolTemplate');
     BxDolTemplate::getInstance()->displayPageNotFound();
     
 }

+ 0 - 1
grid.php

@@ -17,7 +17,6 @@ $sObject = bx_process_input(bx_get('o'));
 if (!$sObject)
     exit;
 
-bx_import('BxDolGrid');
 $oGrid = BxDolGrid::getObjectInstance($sObject);
 if (!$oGrid) {
     // no such grid object available

+ 0 - 2
gzip_loader.php

@@ -9,8 +9,6 @@
 
 require_once('./inc/header.inc.php');
 
-bx_import('BxDolGzip');
-
 $sFile = bx_process_input($_GET['file']);
 BxDolGzip::load($sFile);
 

+ 0 - 3
image_transcoder.php

@@ -24,7 +24,6 @@ require_once('./inc/header.inc.php');
 $sTranscoderObject = bx_process_input(bx_get('o'));
 $sHandler = bx_process_input(bx_get('h'));
 
-bx_import('BxDolTranscoderImage');
 $oTranscoder = BxDolTranscoderImage::getObjectInstance($sTranscoderObject);
 
 if (!$oTranscoder) {
@@ -53,8 +52,6 @@ exit;
 function bx_transcoder_error_occured($sMethod = 'displayPageNotFound')
 {
     require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
-    bx_import('BxDolLanguages');
-    bx_import('BxDolTemplate');
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->$sMethod ();
 }

+ 0 - 10
inc/classes/BxDolAccount.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolAccountQuery');
-
 class BxDolAccount extends BxDol
 {
     protected $_iAccountID;
@@ -137,11 +135,9 @@ class BxDolAccount extends BxDol
     {
         $sEmail = $this->getEmail($iAccountId);
 
-        bx_import('BxDolKey');
         $oKey = BxDolKey::getInstance();
         $sConfirmationCode = $oKey->getNewKey(array('account_id' => $iAccountId));
 
-        bx_import('BxDolPermalinks');
         $sConfirmationLink = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=confirm-email') . '&code=' . urlencode($sConfirmationCode);
 
         $aPlus = array();
@@ -150,7 +146,6 @@ class BxDolAccount extends BxDol
         $aPlus['conf_link'] = $sConfirmationLink;
         $aPlus['conf_form_link'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=confirm-email');
 
-        bx_import('BxDolEmailTemplates');
         $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_Confirmation', $aPlus);
         return $aTemplate && sendMail($sEmail, $aTemplate['Subject'], $aTemplate['Body'], 0, array(), BX_EMAIL_SYSTEM);
     }
@@ -256,10 +251,8 @@ class BxDolAccount extends BxDol
         if ($isStopDeletion)
             return false;
 
-        bx_import('BxDolAccountQuery');
         $oAccountQuery = BxDolAccountQuery::getInstance();
 
-        bx_import('BxDolProfile');
         $oProfileQuery = BxDolProfileQuery::getInstance();
         $aProfiles = $oProfileQuery->getProfilesByAccount($this->_iAccountID);
         foreach ($aProfiles as $iProfileId => $aRow) {
@@ -290,7 +283,6 @@ class BxDolAccount extends BxDol
     public function addInformerPermanentMessages ($oInformer)
     {
         if (!$this->isConfirmed()) {
-            bx_import('BxDolPermalinks');
             $sUrl = BxDolPermalinks::getInstance()->permalink('page.php?i=confirm-email') . '&resend=1';
             $aAccountInfo = $this->getInfo();
             $oInformer->add('sys-account-unconfirmed', _t('_sys_txt_account_unconfirmed', $sUrl, $aAccountInfo['email']), BX_INFORMER_ALERT);
@@ -303,7 +295,6 @@ class BxDolAccount extends BxDol
     public function getUnsubscribeLink($iEmailType, $iAccountId = false)
     {
         $iAccountId = (int)$iAccountId ? (int)$iAccountId : $this->_iAccountID;
-        bx_import('BxDolPermalinks');
         $sUrl = '';
         switch ($iEmailType) {
             case BX_EMAIL_NOTIFY:
@@ -341,7 +332,6 @@ class BxDolAccount extends BxDol
      */
     static public function isAllowedEdit ($iProfileId, $aContentInfo, $isPerformAction = false)
     {
-        bx_import('BxDolProfile');
         $oProfile = BxDolProfile::getInstance($iProfileId);
         if (!$oProfile)
             return _t('_sys_txt_access_denied');

+ 0 - 2
inc/classes/BxDolAccountQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * All queries related to account
  */

+ 1 - 14
inc/classes/BxDolAcl.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDol');
-bx_import('BxDolAclQuery');
-
 /**
  * Message constants passed to _t_ext() function by checkAction()
  *
@@ -116,10 +113,8 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
      */
     public static function getInstance()
     {
-        if(!isset($GLOBALS['bxDolClasses'][__CLASS__])) {
-            bx_import('BxTemplAcl');
+        if(!isset($GLOBALS['bxDolClasses'][__CLASS__]))
             $GLOBALS['bxDolClasses'][__CLASS__] = new BxTemplAcl();
-        }
 
         return $GLOBALS['bxDolClasses'][__CLASS__];
     }
@@ -139,7 +134,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
             return true;
 
         if (false === $iProfileId) {
-            bx_import('BxDolProfile');
             $oProfile = BxDolProfile::getInstance();
             $iProfileId = $oProfile ? $oProfile->id() : 0;
         }
@@ -493,7 +487,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
             $sTransactionId = 'NULL';
 
         // check if profile exists
-        bx_import('BxDolProfileQuery');
         if(($sProfileEmail = BxDolProfileQuery::getInstance()->getEmailById($iProfileId)) === false)
             return false;
 
@@ -537,12 +530,10 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
            return false;
 
         // raise membership alert
-        bx_import('BxDolAlerts');
         $oZ = new BxDolAlerts('profile', 'set_membership', '', $iProfileId, array('mlevel'=> $iLevelId, 'days' => $iDays, 'starts_now' => $bStartsNow, 'txn_id' => $sTransactionId));
         $oZ->alert();
 
         // Send notification
-        bx_import('BxDolEmailTemplates');
         $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_MemChanged', array('membership_level' => _t($aLevel['name'])), 0, $iProfileId);
         if ($aTemplate)
             sendMail($sProfileEmail, $aTemplate['Subject'], $aTemplate['Body']);
@@ -599,7 +590,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
         if(!$iProfileId)
             return false;
 
-        bx_import('BxDolProfileQuery');
         $oProfileQuery = BxDolProfileQuery::getInstance();
         $sProfileEmail = $oProfileQuery->getEmailById($iProfileId);
 
@@ -608,7 +598,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
             'expire_days' => $iLevelExpireDays
         );
 
-        bx_import('BxDolEmailTemplates');
         $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_MemExpiration', $aPlus, 0, $iProfileId);
 
         $iResult = $aTemplate && sendMail($sProfileEmail, $aTemplate['Subject'], $aTemplate['Body'], $iProfileId, $aPlus);
@@ -629,7 +618,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
         $aMemLevel = false;
 
         // get profile status
-        bx_import('BxDolProfile');
         $oProfile = BxDolProfile::getInstance($iProfileId);
         $aProfileInfo = $oProfile ? $oProfile->getInfo() : false;
         $sProfileStatus = $aProfileInfo ? $aProfileInfo['status'] : false;
@@ -646,7 +634,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
 
         // profile is not active, so return standard memberships according to profile status
         if (BX_PROFILE_STATUS_ACTIVE != $sProfileStatus) {
-            bx_import('BxDolAccount');
             $oAccount = $aProfileInfo ? BxDolAccount::getInstance($aProfileInfo['account_id']) : false;
             if ($oAccount && !$oAccount->isConfirmed())
                 $iLevelId = MEMBERSHIP_ID_UNCONFIRMED; // every account's profile is unconfirmed if account is unconfirmed

+ 0 - 2
inc/classes/BxDolAclQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for ACL
  * @see BxDolAcl

+ 0 - 1
inc/classes/BxDolAlerts.php

@@ -85,7 +85,6 @@ class BxDolAlerts extends BxDol
         $this->iObject = (int)$iObjectId;
         $this->aExtras = $aExtras;
         if (false === $iSender) {
-            bx_import('BxDolProfile');
             $oProfile = BxDolProfile::getInstance();
             $this->iSender = $oProfile ? $oProfile->id() : 0;
         } else {

+ 0 - 2
inc/classes/BxDolCacheAPC.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCache');
-
 class BxDolCacheAPC extends BxDolCache
 {
     protected $iTTL = 3600;

+ 0 - 2
inc/classes/BxDolCacheEAccelerator.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCache');
-
 class BxDolCacheEAccelerator extends BxDolCache
 {
     protected $iTTL = 3600;

+ 0 - 2
inc/classes/BxDolCacheFile.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCache');
-
 class BxDolCacheFile extends BxDolCache
 {
     protected $sPath;

+ 0 - 2
inc/classes/BxDolCacheFileHtml.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCacheFile');
-
 class BxDolCacheFileHtml extends BxDolCacheFile
 {
     /**

+ 0 - 2
inc/classes/BxDolCacheMemcache.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCache');
-
 class BxDolCacheMemcache extends BxDolCache
 {
     protected $iTTL = 3600;

+ 0 - 2
inc/classes/BxDolCacheXCache.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCache');
-
 class BxDolCacheXCache extends BxDolCache
 {
     protected $iTTL = 3600;

+ 0 - 6
inc/classes/BxDolCaptcha.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCaptchaQuery');
-
 /**
  * @page objects
  * @section captcha CAPTCHA
@@ -36,7 +34,6 @@ bx_import('BxDolCaptchaQuery');
  * Display captcha:
  *
  * @code
- *  bx_import('BxDolCaptcha'); // import captcha class
  *  $oCaptcha = BxDolCaptcha::getObjectInstance(); // get default captcha object instance
  *  if ($oCaptcha) // check if captcha is available for using
  *      echo $oCaptcha->display (); // output HTML which will automatically show captcha
@@ -45,7 +42,6 @@ bx_import('BxDolCaptchaQuery');
  * Check captcha:
  *
  * @code
- *  bx_import('BxDolCaptcha'); // import captcha class
  *  $oCaptcha = BxDolCaptcha::getObjectInstance(); // get default captcha object instance
  *  if ($oCaptcha && $oCaptcha->check ()) // check if captcha is correct
  *      echo 'captcha is OK';
@@ -93,8 +89,6 @@ class BxDolCaptcha extends BxDol implements iBxDolFactoryObject
         $sClass = $aObject['override_class_name'];
         if (!empty($aObject['override_class_file']))
             require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-        else
-            bx_import($sClass);
 
         $o = new $sClass($aObject);
         if (!$o->isAvailable())

+ 0 - 2
inc/classes/BxDolCaptchaQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for captcha objects.
  * @see BxDolCaptcha

+ 1 - 25
inc/classes/BxDolCmts.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolPermalinks');
-bx_import('BxDolCmtsQuery');
-
 define('BX_CMT_OLD_VOTES', 365*86400); ///< comment votes older than this number of seconds will be deleted automatically
 
 define('BX_CMT_ACTION_POST', 'post');
@@ -84,7 +81,6 @@ define('BX_CMT_RATE_VALUE_MINUS', -1);
  * After filling in the table you can show comments section in any place, using the following code:
  *
  * @code
- * bx_import ('BxTemplCmts');
  * $o = new BxTemplCmts('value of ObjectName field', $iYourEntryId);
  * if ($o->isEnabled())
  *     echo $o->getCommentsFirst ();
@@ -253,14 +249,11 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
         if (!isset($aSystems[$sSys]))
             return null;
 
-        bx_import('BxTemplCmts');
         $sClassName = 'BxTemplCmts';
         if(!empty($aSystems[$sSys]['class_name'])) {
             $sClassName = $aSystems[$sSys]['class_name'];
             if(!empty($aSystems[$sSys]['class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aSystems[$sSys]['class_file']);
-            else
-                bx_import($sClassName);
         }
 
         $o = new $sClassName($sSys, $iId, $iInit);
@@ -412,7 +405,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
         if(empty($this->_aSystem['object_vote']))
         	$this->_aSystem['object_vote'] = 'sys_cmts';
 
-        bx_import('BxDolVote');
         $oVote = BxDolVote::getObjectInstance($this->_aSystem['object_vote'], $iId);
         if(!$oVote || !$oVote->isEnabled())
             return false;
@@ -501,7 +493,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
         // delete files
         if ($aFiles) {
-            bx_import('BxDolStorage');
             $oStorage = BxDolStorage::getObjectInstance($this->getStorageObjectName());
             if ($oStorage)
                 $oStorage->queueFilesForDeletion($aFiles);
@@ -510,7 +501,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
     public static function onAuthorDelete ($iAuthorId)
     {
-        bx_import('BxDolStorage');
         $aSystems = self::getSystems();
         foreach($aSystems as $sSystem => $aSystem) {
             $o = self::getObjectInstance($sSystem, 0);
@@ -533,7 +523,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
     public static function onModuleUninstall ($sModuleName, &$iFiles = null)
     {
-        bx_import('BxDolStorage');
         $aSystems = self::getSystems();
         foreach($aSystems as $sSystem => $aSystem) {
             if (0 != strncasecmp($sModuleName, $sSystem, strlen($sModuleName)))
@@ -569,7 +558,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
         if (!is_array($mixedCmtId))
             $mixedCmtId = array($mixedCmtId);
 
-        bx_import('BxDolMetatags');
         $oMetatags = BxDolMetatags::getObjectInstance($this->_sMetatagsObj);
 
         foreach ($mixedCmtId as $iCmtId) {
@@ -769,7 +757,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
         if($this->_oQuery->removeComment ($this->getId(), $aCmt['cmt_id'], $aCmt['cmt_parent_id'])) {
             $this->_triggerComment();
 
-            bx_import('BxDolStorage');
             $oStorage = BxDolStorage::getObjectInstance($this->getStorageObjectName());
 
             $aImages = $this->_oQuery->getImages($this->_aSystem['system_id'], $aCmt['cmt_id']);
@@ -782,7 +769,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
             $this->deleteMetaInfo ($aCmt['cmt_id']);
 
-            bx_import('BxDolAlerts');
             $oZ = new BxDolAlerts($this->_sSystem, 'commentRemoved', $this->getId(), $iCmtAuthorId, array('comment_id' => $aCmt['cmt_id'], 'comment_author_id' => $aCmt['cmt_author_id']));
             $oZ->alert();
 
@@ -826,12 +812,9 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
     protected function _getAuthorObject($iAuthorId = 0)
     {
-        bx_import('BxDolProfile');
         $oProfile = BxDolProfile::getInstance($iAuthorId);
-        if (!$oProfile) {
-            bx_import('BxDolProfileUndefined');
+        if (!$oProfile)
             $oProfile = BxDolProfileUndefined::getInstance();
-        }
 
         return $oProfile;
     }
@@ -840,7 +823,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
     {
         $sDisplayName = '_sFormDisplay' . ucfirst($sAction);
 
-        bx_import('BxDolForm');
         return BxDolForm::getObjectInstance($this->_sFormObject, $this->$sDisplayName);
     }
 
@@ -876,7 +858,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
     	$s = bx_convert_links($s);
 
         if ($this->_sMetatagsObj && $iCmtId) {
-            bx_import('BxDolMetatags');
             $oMetatags = BxDolMetatags::getObjectInstance($this->_sMetatagsObj);
             $s = $oMetatags->keywordsParse($this->_oQuery->getUniqId($this->_aSystem['system_id'], $iCmtId), $s);
         }
@@ -966,7 +947,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
         $iUserId = $this->_getAuthorId();
 
-        bx_import('BxDolSession');
         $oSession = BxDolSession::getInstance();
 
         $mixedDp = $oSession->getValue($this->_sDpSessionKey . $iUserId);
@@ -983,7 +963,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
         $iUserId = $this->_getAuthorId();
 
-        bx_import('BxDolSession');
         $oSession = BxDolSession::getInstance();
 
         if(!empty($sDp))
@@ -1005,11 +984,9 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
         $oProfile = $this->_getAuthorObject($aCmtParent['cmt_author_id']);
 
-        bx_import('BxDolProfileUndefined');
         if($oProfile instanceof BxDolProfileUndefined)
         	return;
 
-        bx_import('BxDolAccount');
         $iAccount = $oProfile->getAccountId();
         $aAccount = BxDolAccount::getInstance($iAccount)->getInfo();
 
@@ -1017,7 +994,6 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
         $aPlus['reply_text'] = bx_process_output($aCmt['cmt_text']);
         $aPlus['comment_url'] = sprintf('%scmts.php?sys=%s&id=%d&cmt_id=%d', BX_DOL_URL_ROOT, $this->_sSystem, $this->_iId, $iCmtParentId);
 
-        bx_import('BxDolEmailTemplates');
         $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_CommentReplied', $aPlus);
         return $aTemplate && sendMail($aAccount['email'], $aTemplate['Subject'], $aTemplate['Body']);
     }

+ 0 - 4
inc/classes/BxDolCmtsQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * @see BxDolCmts
  */
@@ -61,7 +59,6 @@ class BxDolCmtsQuery extends BxDolDb
         switch($sFilter) {
         	case BX_CMT_FILTER_FRIENDS:
         	case BX_CMT_FILTER_SUBSCRIPTIONS:
-	            bx_import('BxDolConnection');
 	            $oConnection = BxDolConnection::getObjectInstance($this->_oMain->getConnectionObject($sFilter));
 	
 	            $aQueryParts = $oConnection->getConnectedContentAsSQLParts($this->_sTable, 'cmt_author_id', $iAuthorId);
@@ -99,7 +96,6 @@ class BxDolCmtsQuery extends BxDolDb
             $sWhereParent = $this->prepare(" AND `{$this->_sTable}`.`cmt_vparent_id` = ?", $iCmtVParentId);
 
         if(in_array($sFilter, array(BX_CMT_FILTER_FRIENDS, BX_CMT_FILTER_SUBSCRIPTIONS))) {
-            bx_import('BxDolConnection');
             $oConnection = BxDolConnection::getObjectInstance($this->_oMain->getConnectionObject($sFilter));
 
             $aQueryParts = $oConnection->getConnectedContentAsSQLParts($this->_sTable, 'cmt_author_id', $iAuthorId);

+ 0 - 8
inc/classes/BxDolConnection.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolConnectionQuery');
-
 /**
  * Default limit for connections lists
  */
@@ -99,7 +97,6 @@ define('BX_CONNECTIONS_CONTENT_TYPE_COMMON', 'common');
  *
  * Check if two profiles are friends:
  * @code
- *   bx_import('BxDolConnection'); // import connection class
  *   $oConnectionFriends = BxDolConnection::getObjectInstance('bx_profiles_friends'); // get friends connections object
  *   if ($oConnectionFriends) // check if connections is available for using
  *      echo $oConnectionFriends->isConnected (100, 200, true) ? "100 and 200 are friends" : "100 and 200 aren't friends"; // check if profiles with IDs 100 and 200 have mutual connections
@@ -107,7 +104,6 @@ define('BX_CONNECTIONS_CONTENT_TYPE_COMMON', 'common');
  *
  * Get mutual content IDs (friends IDs)
  * @code
- *   bx_import('BxDolConnection'); // import connection class
  *   $oConnectionFriends = BxDolConnection::getObjectInstance('bx_profiles_friends'); // get friends connections object
  *   if ($oConnectionFriends) // check if connections is available for using
  *       print_r($oConnection->getConnectedContent(100, 1)); // print array of friends IDs of 100's profile
@@ -156,8 +152,6 @@ class BxDolConnection extends BxDol implements iBxDolFactoryObject
         $sClass = empty($aObject['override_class_name']) ? 'BxDolConnection' : $aObject['override_class_name'];
         if (!empty($aObject['override_class_file']))
             require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-        else
-            bx_import($sClass);
 
         $o = new $sClass($aObject);
 
@@ -209,8 +203,6 @@ class BxDolConnection extends BxDol implements iBxDolFactoryObject
 
     protected function _action ($iInitiator, $iContent, $sMethod, $sErrorKey, $isMutual = false)
     {
-        bx_import('BxDolLanguages');
-
         if (!$iContent || !$iInitiator)
             return array ('err' => true, 'msg' => _t('_sys_conn_err_input_data_is_not_defined'));
 

+ 0 - 2
inc/classes/BxDolConnectionQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for Connection objects.
  * @see BxDolConnection

+ 0 - 10
inc/classes/BxDolCronPruning.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCron');
-
 class BxDolCronPruning extends BxDolCron
 {
     protected function start()
@@ -25,7 +23,6 @@ class BxDolCronPruning extends BxDolCron
         if (!($sOutput = ob_get_clean()))
             return;
 
-        bx_import('BxDolEmailTemplates');
         $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_Pruning', array('pruning_output' => $sOutput, 'site_title' => getParam('site_title')), 0, 0);
         if ($aTemplate)
             sendMail(getParam('site_email'), $aTemplate['Subject'], $aTemplate['Body'], 0, array(), BX_EMAIL_NOTIFY);
@@ -37,34 +34,27 @@ class BxDolCronPruning extends BxDolCron
     protected function cleanDatabase()
     {
         // clean expired membership levels
-        bx_import('BxDolAcl');
         $oAcl = BxDolAcl::getInstance();
         $iDeleteMemLevels = $oAcl ? $oAcl->maintenance() : 0;
 
         //--- Clean sessions ---//
-        bx_import('BxDolSession');
         $oSession = BxDolSession::getInstance();
         $iSessions = $oSession ? $oSession->maintenance() : 0;
 
         // clean old views
-        bx_import('BxDolView');
         $iDeletedViews = BxDolView::maintenance ();
 
         // clean storage engine expired private file tokens
-        bx_import('BxDolStorage');
         $iDeletedExpiredTokens = BxDolStorage::pruning();
 
         // clean outdated transcoded images
-        bx_import('BxDolTranscoderImage');
         $iDeletedTranscodedImages = BxDolTranscoderImage::pruning();
 
         // clean expired keys
-        bx_import('BxDolKey');
         $oKey = BxDolKey::getInstance();
         $iDeletedKeys = $oKey ? $oKey->prune() : 0;
 
         // clean old votes
-        bx_import('BxDolVote');
         $iDeletedVotes = BxDolVote::maintenance();
 
         echo _t('_sys_pruning_db', $iDeleteMemLevels, $iSessions, $iDeletedViews, $iDeletedVotes, $iDeletedKeys, $iDeletedExpiredTokens, $iDeletedTranscodedImages);

+ 0 - 2
inc/classes/BxDolCronQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for Cron
  * @see BxDolCron

+ 1 - 6
inc/classes/BxDolCronStorage.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCron');
-
 class BxDolCronStorage extends BxDolCron
 {
     public function processing()
@@ -16,11 +14,8 @@ class BxDolCronStorage extends BxDolCron
         set_time_limit(36000);
         ignore_user_abort();
 
-        bx_import('BxDolStorage');
-        if (BxDolStorage::pruneDeletions()) { // if any files were deleted
-            bx_import('BxDolInstallerUtils');
+        if (BxDolStorage::pruneDeletions()) // if any files were deleted
             BxDolInstallerUtils::checkModulesPendingUninstall(); // try to uninstall modules pending for uninstall
-        }
     }
 }
 

+ 0 - 4
inc/classes/BxDolCronTranscoder.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCron');
-
 class BxDolCronTranscoder extends BxDolCron
 {
     public function processing()
@@ -16,8 +14,6 @@ class BxDolCronTranscoder extends BxDolCron
         set_time_limit(10800);
         ignore_user_abort();
 
-        bx_import('BxDolTranscoder');
-
         if (!defined('BX_TRANSCODER_NO_TRANSCODING'))
             BxDolTranscoder::processQueue();
 

+ 0 - 2
inc/classes/BxDolCronUpgradeCheck.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCron');
-
 class BxDolCronUpgradeCheck extends BxDolCron
 {
     public function processing()

+ 0 - 3
inc/classes/BxDolCronUpgradeModulesCheck.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolCron');
-
 class BxDolCronUpgradeModulesCheck extends BxDolCron
 {
     public function processing()
@@ -16,7 +14,6 @@ class BxDolCronUpgradeModulesCheck extends BxDolCron
         if('on' != getParam('sys_autoupdate_modules'))
             return;
 
-		bx_import('BxDolStudioInstallerUtils');
 		BxDolStudioInstallerUtils::getInstance()->performModulesUpgrade();
     }
 }

+ 0 - 5
inc/classes/BxDolEditor.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolEditorQuery');
-
 /**
  * Standard WYSIWYG editor view.
  * @see BxDolEditor::attachEditor
@@ -59,7 +57,6 @@ define('BX_EDITOR_MINI', 3);
  * @code
  *  echo '<textarea id="my_textarea" rows="20" cols="80">some text here</textarea>'; // print text area element
  *
- *  bx_import('BxDolEditor'); // import editor class
  *  $oEditor = BxDolEditor::getObjectInstance(); // get default editor object instance
  *  if ($oEditor) // check if editor is available for using
  *      echo $oEditor->attachEditor ('#my_textarea', BX_EDITOR_STANDARD); // output HTML which will automatically apply editor to textarea element by its id
@@ -106,8 +103,6 @@ class BxDolEditor extends BxDol implements iBxDolFactoryObject
         $sClass = $aObject['override_class_name'];
         if (!empty($aObject['override_class_file']))
             require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-        else
-            bx_import($sClass);
 
         $o = new $sClass($aObject);
 

+ 0 - 2
inc/classes/BxDolEditorQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for editor objects.
  * @see BxDolEditor

+ 0 - 9
inc/classes/BxDolEmailTemplates.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolLanguages');
-bx_import('BxDolEmailTemplatesQuery');
-
 /**
  * @page objects
  * @section email_templates Email Templates
@@ -44,7 +41,6 @@ bx_import('BxDolEmailTemplatesQuery');
  *     $aPlus['conf_link'] = BX_DOL_URL_ROOT . 'page.php?i=confirm-email&code=123456';
  *     $aPlus['conf_form_link'] = BX_DOL_URL_ROOT . 'page.php?i=confirm-email';
  *
- *     bx_import('BxDolEmailTemplates'); // import class
  *     $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_Confirmation', $aPlus); // get class instance and parse template
  *
  *     if ($aTemplate && sendMail('ktoto@example.com', $aTemplate['Subject'], $aTemplate['Body'])) // send email if template exists
@@ -77,7 +73,6 @@ class BxDolEmailTemplates extends BxDol implements iBxDolSingleton
         $this->iDefaultLangId = $oLang->getCurrentLangId();
         $this->iFallbackLangId = $oLang->getLangId('en');
 
-        bx_import('BxDolPermalinks');
         $sAboutUsLink = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=about');
 
         $this->aDefaultKeys = array(
@@ -120,7 +115,6 @@ class BxDolEmailTemplates extends BxDol implements iBxDolSingleton
     {
         $iUseLang = $this->iDefaultLangId;
         if ($iAccountId) {
-            bx_import('BxDolAccount');
             $oAccount = BxDolAccount::getInstance($iAccountId);
             if ($oAccount) {
                 $aAccountInfo = $oAccount->getInfo();
@@ -156,7 +150,6 @@ class BxDolEmailTemplates extends BxDol implements iBxDolSingleton
         $aResultKeys = $this->aDefaultKeys;
 
         if ($iAccountId) {
-            bx_import('BxDolAccount');
             $oAccount = BxDolAccount::getInstance($iAccountId);
             if ($oAccount && ($aAccountInfo = $oAccount->getInfo())) {
                 $aResultKeys = array_merge($aResultKeys, array(
@@ -168,7 +161,6 @@ class BxDolEmailTemplates extends BxDol implements iBxDolSingleton
         }
 
         if ($iProfileId) {
-            bx_import('BxDolProfile');
             $oProfile = BxDolProfile::getInstance($iProfileId);
             if ($oProfile && ($aProfileInfo = $oProfile->getInfo())) {
                 $aResultKeys = array_merge($aResultKeys, array(
@@ -188,7 +180,6 @@ class BxDolEmailTemplates extends BxDol implements iBxDolSingleton
         if (is_array($aKeys))
             $aResultKeys = array_merge($aResultKeys, $aKeys);
 
-        bx_import('BxDolTemplate');
         return BxDolTemplate::getInstance()->parseHtmlByContent($sContent, $aResultKeys, array('{', '}'));
     }
 }

+ 0 - 2
inc/classes/BxDolEmailTemplatesQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for BxDolEmailTemplates object.
  * @see BxDolEmailTemplates

+ 0 - 14
inc/classes/BxDolForm.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolSession');
-
 define('BX_DOL_FORM_METHOD_GET', 'get');
 define('BX_DOL_FORM_METHOD_POST', 'post');
 define('BX_DOL_FORM_METHOD_SPECIFIC', 'specific');
@@ -553,7 +551,6 @@ define('BX_DATA_VALUES_ADDITIONAL', 'LKey2'); ///< Use additional values for dat
  * Printing the form for adding new record to the database:
  *
  * @code
- *      bx_import('BxDolForm');
  *      $oForm = BxDolForm::getObjectInstance('sample_form_objects', 'sample_form_objects_add'); // get form instance for specified form object and display
  *      if (!$oForm)
  *          die('"sample_form_objects_add" form object or "sample_form_objects_add" display is not defined');
@@ -573,7 +570,6 @@ define('BX_DATA_VALUES_ADDITIONAL', 'LKey2'); ///< Use additional values for dat
  *      if (!$aRecord)
  *          die("$iEditId record wasn't found.");
  *
- *      bx_import('BxDolForm');
  *      $oForm = BxDolForm::getObjectInstance('sample_form_objects', 'sample_form_objects_edit'); // get form instance for specified form object and display
  *      if (!$oForm)
  *          die('"sample_form_objects_edit" form object or "sample_form_objects_edit" display is not defined');
@@ -586,8 +582,6 @@ define('BX_DATA_VALUES_ADDITIONAL', 'LKey2'); ///< Use additional values for dat
  * Example of custom form class and custom checking helper class:
  *
  * @code
- *      bx_import('BxTemplFormView');
- *
  *      class BxSampleForm extends BxTemplFormView {
  *
  *          public function __construct ($aInfo, $oTemplate = false) {
@@ -772,19 +766,15 @@ class BxDolForm extends BxDol implements iBxDolReplaceable
         if (isset($GLOBALS['bxDolClasses']['BxDolForm!'.$sObject.'!'.$sDisplayName]))
             return $GLOBALS['bxDolClasses']['BxDolForm!'.$sObject.'!'.$sDisplayName];
 
-        bx_import('BxDolFormQuery');
         $aObject = BxDolFormQuery::getFormArray($sObject, $sDisplayName);
         if (!$aObject || !is_array($aObject))
             return false;
 
-        bx_import('BxTemplFormView');
         $sClass = 'BxTemplFormView';
         if (!empty($aObject['override_class_name'])) {
             $sClass = $aObject['override_class_name'];
             if (!empty($aObject['override_class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-            else
-                bx_import($sClass);
         }
 
         $o = new $sClass($aObject, $oTemplate);
@@ -801,7 +791,6 @@ class BxDolForm extends BxDol implements iBxDolReplaceable
      */
     public static function getDataItems($sKey, $isUseForSet = false, $sUseValues = BX_DATA_VALUES_DEFAULT)
     {
-        bx_import('BxDolFormQuery');
         return BxDolFormQuery::getDataItems($sKey, $isUseForSet, $sUseValues);
     }
 
@@ -998,7 +987,6 @@ class BxDolForm extends BxDol implements iBxDolReplaceable
             if ((isset($aInput['type']) && $aInput['type'] != 'files') || !isset($aInput['ghost_template']))
                 continue;
 
-            bx_import('BxDolFormNested');
             if (!(is_array($aInput['ghost_template']) && isset($aInput['ghost_template']['inputs'])) && !(is_object($aInput['ghost_template']) && $aInput['ghost_template'] instanceof BxDolFormNested))
                 continue;
 
@@ -1050,7 +1038,6 @@ class BxDolForm extends BxDol implements iBxDolReplaceable
      */
     protected function _isVisible ($aInput)
     {
-        bx_import('BxDolAcl');
         return BxDolAcl::getInstance()->isMemberLevelInSet($aInput['visible_for_levels']);
     }
 
@@ -1359,7 +1346,6 @@ class BxDolFormCheckerHelper
     }
     static public function checkCaptcha($s)
     {
-        bx_import('BxDolCaptcha');
         $oCaptcha = BxDolCaptcha::getObjectInstance();
         if (!$oCaptcha)
             return true;

+ 0 - 2
inc/classes/BxDolFormNested.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxTemplFormView');
-
 /**
  * Nested form. It is used in file uploaders to show uploaded file as nested form.
  * @see BxDolUploader

+ 1 - 5
inc/classes/BxDolFormQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for forms.
  * @see BxDolForm
@@ -62,10 +60,8 @@ class BxDolFormQuery extends BxDolDb
         $aForm['form_attrs'] = array_merge($aDefaultsFormAttrs, !empty($aAddFormAttrs) && is_array($aAddFormAttrs) ? $aAddFormAttrs : array());
 
         // form action
-        if (!empty($aForm['form_attrs']['action']) && 0 != strncasecmp($aForm['form_attrs']['action'], 'http://', 7) && 0 != strncasecmp($aForm['form_attrs']['action'], 'https://', 8)) {
-            bx_import('BxDolPermalinks');
+        if (!empty($aForm['form_attrs']['action']) && 0 != strncasecmp($aForm['form_attrs']['action'], 'http://', 7) && 0 != strncasecmp($aForm['form_attrs']['action'], 'https://', 8))
             $aForm['form_attrs']['action'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($aForm['form_attrs']['action']);
-        }
 
         // params
         if (!empty($aObject['params']))

+ 0 - 2
inc/classes/BxDolFtp.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolFile');
-
 class BxDolFtp extends BxDolFile
 {
     protected $_sHost;

+ 0 - 6
inc/classes/BxDolGrid.php

@@ -275,19 +275,15 @@ class BxDolGrid extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
         if (isset($GLOBALS['bxDolClasses']['BxDolGrid!'.$sObject]))
             return $GLOBALS['bxDolClasses']['BxDolGrid!'.$sObject];
 
-        bx_import('BxDolGridQuery');
         $aObject = BxDolGridQuery::getGridObject($sObject);
         if (!$aObject || !is_array($aObject))
             return false;
 
-        bx_import('BxTemplGrid');
         $sClass = 'BxTemplGrid';
         if (!empty($aObject['override_class_name'])) {
             $sClass = $aObject['override_class_name'];
             if (!empty($aObject['override_class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-            else
-                bx_import($sClass);
         }
 
         $o = new $sClass($aObject);
@@ -483,7 +479,6 @@ class BxDolGrid extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
             if (is_array($this->_aOptions['sorting_fields_translatable']) && in_array($sOrderField, $this->_aOptions['sorting_fields_translatable'])) {
 
                 // translatable fields
-                bx_import('BxDolLanguages');
                 $iLang = BxDolLanguages::getInstance()->getCurrentLangId();
                 $oDb = BxDolDb::getInstance();
                 $sOrderClause = $oDb->prepare("ORDER BY (SELECT `s`.`string` FROM `sys_localization_strings` AS `s` INNER JOIN `sys_localization_keys` AS `k` ON (`k`.`ID` = `s`.`IDKey`) WHERE `k`.`KEY` = `$sOrderField` AND `s`.`IDLanguage` = ? LIMIT 1) ", $iLang) . $sDir;
@@ -545,7 +540,6 @@ class BxDolGrid extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
 
     protected function _isVisibleGrid ($a)
     {
-        bx_import('BxDolAcl');
         if (!isset($a['visible_for_levels']))
             return true;
         return BxDolAcl::getInstance()->isMemberLevelInSet($a['visible_for_levels']);

+ 0 - 10
inc/classes/BxDolGridConnections.php

@@ -9,8 +9,6 @@
 
 require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
 
-bx_import('BxTemplGrid');
-
 class BxDolGridConnections extends BxTemplGrid
 {
     protected $_bOwner = false;
@@ -26,12 +24,10 @@ class BxDolGridConnections extends BxTemplGrid
         if (!$iProfileId)
             return;
 
-        bx_import('BxDolProfile');
         $oProfile = BxDolProfile::getInstance($iProfileId);
         if (!$oProfile)
             return;
 
-        bx_import('BxDolConnection');
         $oConnection = BxDolConnection::getObjectInstance($this->_sObjectConnections);
         if (!$oConnection)
             return;
@@ -63,7 +59,6 @@ class BxDolGridConnections extends BxTemplGrid
             exit;
         }
 
-        bx_import('BxDolConnection');
         $oConn = BxDolConnection::getObjectInstance($this->_sObjectConnections);
 
         $a = $oConn->actionAdd($iId);
@@ -83,7 +78,6 @@ class BxDolGridConnections extends BxTemplGrid
 
     protected function _delete ($mixedId)
     {
-        bx_import('BxDolConnection');
         $oConn = BxDolConnection::getObjectInstance($this->_sObjectConnections);
 
         if ($oConn->isConnected(bx_get_logged_profile_id(), (int)$mixedId, true))
@@ -96,7 +90,6 @@ class BxDolGridConnections extends BxTemplGrid
 
     protected function _getCellName ($mixedValue, $sKey, $aField, $aRow)
     {
-        bx_import('BxDolProfile');
         $oProfile = BxDolProfile::getInstance($aRow['id']);
         if (!$oProfile)
             return _t('_sys_txt_error_occured');
@@ -107,7 +100,6 @@ class BxDolGridConnections extends BxTemplGrid
     protected function _getCellInfo ($mixedValue, $sKey, $aField, $aRow)
     {
         $s = '';
-        bx_import('BxDolConnection');
         $oConn = BxDolConnection::getObjectInstance($this->_sObjectConnections);
 
         // for friend requests display mutual friends
@@ -116,7 +108,6 @@ class BxDolGridConnections extends BxTemplGrid
             $i = count($a);
             if (1 == $i) {
                 $iProfileId = array_pop($a);
-                bx_import('BxDolProfile');
                 $oProfile = BxDolProfile::getInstance($iProfileId);
                 $s = _t('_sys_txt_one_mutual_friend', $oProfile->getUrl(), $oProfile->getDisplayName());
             } elseif ($i) {
@@ -154,7 +145,6 @@ class BxDolGridConnections extends BxTemplGrid
         if ($this->_bOwner || $aRow['id'] == bx_get_logged_profile_id())
             return '';
 
-        bx_import('BxDolConnection');
         $oConn = BxDolConnection::getObjectInstance($this->_sObjectConnections);
         if ($oConn->isConnected($aRow['id'], bx_get_logged_profile_id()) || $oConn->isConnected(bx_get_logged_profile_id(), $aRow['id']))
             return '';

+ 0 - 2
inc/classes/BxDolGridQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for grid.
  * @see BxDolGrid

+ 0 - 4
inc/classes/BxDolInformer.php

@@ -27,7 +27,6 @@ define('BX_INFORMER_ERROR', 3);
  * Adding message to informer:
  *
  * @code
- *  bx_import('BxDolInformer'); // import informer class
  *  $oInformer = BxDolInformer::getInstance(); // get object instance
  *  if ($oInformer) // check if Informer is available for using
  *      echo $oInformer->add ('my_id', 'Some important information here', BX_INFORMER_ALERT); // add an alert message
@@ -67,7 +66,6 @@ class BxDolInformer extends BxDol
         if (isset($GLOBALS['bxDolClasses']['BxDolInformer']))
             return $GLOBALS['bxDolClasses']['BxDolInformer'];
 
-        bx_import('BxTemplInformer');
         $o = new BxTemplInformer($oTemplate);
 
         return ($GLOBALS['bxDolClasses']['BxDolInformer'] = $o);
@@ -104,12 +102,10 @@ class BxDolInformer extends BxDol
     {
         // add account & profile related permament messages
         if (isLogged()) {
-            bx_import('BxDolAccount');
             $oAccount = BxDolAccount::getInstance();
             if ($oAccount)
                 $oAccount->addInformerPermanentMessages($this);
                 
-			bx_import('BxDolProfile');
             $oProfile = BxDolProfile::getInstance();
             if ($oProfile)
                 $oProfile->addInformerPermanentMessages($this);

+ 0 - 2
inc/classes/BxDolInstallerHasher.php

@@ -9,8 +9,6 @@
 
 define('BX_SYSTEM_MODULE_ID', 0);
 
-bx_import('BxDolInstallerUtils');
-
 /**
  * Functions for hashing system files.
  * Hashing functions for module file are in @see BxDolInstallerUtils class.

+ 0 - 7
inc/classes/BxDolInstallerUtils.php

@@ -6,7 +6,6 @@
  * @defgroup    TridentCore Trident Core
  * @{
  */
-bx_import('BxDolIO');
 
 define('BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT', 0.05);
 define('BX_FORCE_USE_FTP_FILE_TRANSFER', false);
@@ -49,7 +48,6 @@ class BxDolInstallerUtils extends BxDolIO
 
     static public function isModuleInstalled($sUri)
     {
-        bx_import('BxDolModuleQuery');
         return BxDolModuleQuery::getInstance()->isModule($sUri);
     }
 
@@ -58,7 +56,6 @@ class BxDolInstallerUtils extends BxDolIO
      */
     static public function setModulePendingUninstall($sUri, $bPendingUninstall = true)
     {
-        bx_import('BxDolModuleQuery');
         return BxDolModuleQuery::getInstance()->setModulePendingUninstall($sUri, $bPendingUninstall);
     }
 
@@ -67,7 +64,6 @@ class BxDolInstallerUtils extends BxDolIO
      */
     static public function isModulePendingUninstall($sUri)
     {
-        bx_import('BxDolModuleQuery');
         $a = BxDolModuleQuery::getInstance()->getModuleByUri($sUri);
         return $a['pending_uninstall'];
     }
@@ -77,7 +73,6 @@ class BxDolInstallerUtils extends BxDolIO
      */
     static public function checkModulesPendingUninstall()
     {
-        bx_import('BxDolModuleQuery');
         $a = BxDolModuleQuery::getInstance()->getModules();
         foreach ($a as $aModule) {
 
@@ -89,7 +84,6 @@ class BxDolInstallerUtils extends BxDolIO
             self::setModulePendingUninstall($aModule['uri'], false);
 
             // perform uninstallation
-            bx_import('BxDolStudioInstallerUtils');
             $aResult = BxDolStudioInstallerUtils::getInstance()->perform($aModule['path'], 'uninstall');
 
             // send email nofitication
@@ -104,7 +98,6 @@ class BxDolInstallerUtils extends BxDolIO
                 $aTemplateKeys['Message'] = $aResult['message'];
             }
 
-            bx_import('BxDolEmailTemplates');
             $aMessage = BxDolEmailTemplates::getInstance()->parseTemplate('t_DelayedModuleUninstall', $aTemplateKeys);
             sendMail (getParam('site_email'), $aMessage['Subject'], $aMessage['Body'], 0, array(), BX_EMAIL_SYSTEM);
         }

+ 0 - 4
inc/classes/BxDolKey.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolKeyQuery');
-
 /**
  * @page objects
  * @section key Keys
@@ -23,7 +21,6 @@ bx_import('BxDolKeyQuery');
  * Generate new hashed key:
  *
  * @code
- *  bx_import('BxDolKey'); // import class
  *  $oKeys = BxDolKey::getInstance(); // get object instance
  *  if ($oKeys) // check if object is available for using
  *      echo $oKeys->getNewKey (false, 3600); // get new hashed key, which will be automatically deleted after 1 hour
@@ -32,7 +29,6 @@ bx_import('BxDolKeyQuery');
  * Check if hashed key exists:
  *
  * @code
- *  bx_import('BxDolKey'); // import class
  *  $oKeys = BxDolKey::getInstance(); // get object instance
  *  if ($oKeys && $oKeys->isKeyExists ($sKey)) // check key exists
  *      echo 'key exists';

+ 0 - 2
inc/classes/BxDolKeyQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for BxDolKey object.
  * @see BxDolKey

+ 1 - 9
inc/classes/BxDolLanguages.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDol');
-bx_import('BxDolLanguagesQuery');
-
 define('BX_DOL_LANGUAGE_DEFAULT', 'en');
 
 define('BX_DOL_LANGUAGE_CATEGORY_SYSTEM', 1);
@@ -209,17 +206,14 @@ class BxDolLanguages extends BxDol implements iBxDolSingleton
         $GLOBALS['sCurrentLanguage'] = $GLOBALS['bxDolClasses'][__CLASS__]->getCurrentLangName(false);
         if($GLOBALS['sCurrentLanguage'] != '') {
             $sPath = BX_DIRECTORY_PATH_CACHE . 'lang-' . $GLOBALS['sCurrentLanguage'] . '.php';
-            if(!file_exists($sPath)) {
-                bx_import('BxDolStudioLanguagesUtils');
+            if(!file_exists($sPath))
                 BxDolStudioLanguagesUtils::getInstance()->compileLanguage();
-            }
 
             require($sPath);
         }
 
         $GLOBALS['bxDolClasses'][__CLASS__]->getCurrentLangName(true);
         if(isset($_GET['lang'])) {
-            bx_import('BxDolPermalinks');
             if(BxDolPermalinks::getInstance()->redirectIfNecessary(array('lang')))
                 exit;
         }
@@ -284,7 +278,6 @@ class BxDolLanguages extends BxDol implements iBxDolSingleton
         if(file_exists( BX_DIRECTORY_PATH_CACHE . "lang-{$sLang}.php"))
             return true;
 
-        bx_import('BxDolStudioLanguagesUtils');
         if(BxDolStudioLanguagesUtils::getInstance()->compileLanguage($iLangId))
             return true;
 
@@ -301,7 +294,6 @@ class BxDolLanguages extends BxDol implements iBxDolSingleton
                 $iLangId = 0;
 
             $iAccountId = getLoggedId();
-            bx_import('BxDolAccountQuery');
             $oAccountQuery = BxDolAccountQuery::getInstance();
             $oAccountQuery->updateLanguage($iAccountId, $iLangId);
         }

+ 0 - 2
inc/classes/BxDolLanguagesQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 class BxDolLanguagesQuery extends BxDolDb implements iBxDolSingleton
 {
     function __construct()

+ 1 - 6
inc/classes/BxDolLiveUpdates.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDol');
-bx_import('BxDolLiveUpdatesQuery');
-
 /**
  * @page objects
  * @section live updates Live Updates
@@ -54,10 +51,8 @@ class BxDolLiveUpdates extends BxDol
      */
     public static function getInstance()
     {
-		if(!isset($GLOBALS['bxDolClasses'][__CLASS__])) {
-			bx_import('BxTemplLiveUpdates');
+		if(!isset($GLOBALS['bxDolClasses'][__CLASS__]))
 			$GLOBALS['bxDolClasses'][__CLASS__] = new BxTemplLiveUpdates();
-		}
 
 		return $GLOBALS['bxDolClasses'][__CLASS__];
     }

+ 0 - 2
inc/classes/BxDolLiveUpdatesQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * @see BxDolLiveUpdates
  */

+ 0 - 10
inc/classes/BxDolMenu.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolMenuQuery');
-bx_import('BxDolPermalinks');
-
 /**
  * @page objects
  * @section menu Menu
@@ -75,7 +72,6 @@ bx_import('BxDolPermalinks');
  * 4. Display Menu.
  * Use the following sample code to display menu:
  * @code
- *     bx_import('BxTemplMenu');
  *     $oMenu = BxTemplMenu::getObjectInstance('sample_menu'); // 'sample_menu' is 'object' field from 'sys_objects_menu' table.
  *     if ($oMenu)
  *         echo $oMenu->getCode; // display menu
@@ -113,7 +109,6 @@ class BxDolMenu extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
         $this->_oPermalinks = BxDolPermalinks::getInstance();
 
         if (isLogged()) {
-            bx_import('BxDolProfile');
             $oProfile = BxDolProfile::getInstance();
             if ($oProfile) {
                 $this->addMarkers(array(
@@ -139,14 +134,11 @@ class BxDolMenu extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
         if (!$aObject || !is_array($aObject))
             return false;
 
-        bx_import('BxTemplMenu');
         $sClass = 'BxTemplMenu';
         if (!empty($aObject['override_class_name'])) {
             $sClass = $aObject['override_class_name'];
             if (!empty($aObject['override_class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-            else
-                bx_import($sClass);
         }
 
         $o = new $sClass($aObject, $oTemplate);
@@ -176,7 +168,6 @@ class BxDolMenu extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
     static public function processMenuTrigger ($sMenuTriggerName)
     {
         // get list of active modules
-        bx_import('BxDolModuleQuery');
         $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array(
             'type' => 'modules',
             'active' => 1,
@@ -254,7 +245,6 @@ class BxDolMenu extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
      */
     protected function _isVisible ($a)
     {
-        bx_import('BxDolAcl');
         return BxDolAcl::getInstance()->isMemberLevelInSet($a['visible_for_levels']);
     }
 

+ 0 - 2
inc/classes/BxDolMenuQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for menus.
  * @see BxDolMenu

+ 3 - 11
inc/classes/BxDolMetatags.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolMetatagsQuery');
-
 define('BX_METATAGS_KEYWORDS_MAX', 9);
 
 /**
@@ -164,8 +162,6 @@ class BxDolMetatags extends BxDol implements iBxDolFactoryObject
         $sClass = $aObject['override_class_name'] ? $aObject['override_class_name'] : 'BxDolMetatags';
         if (!empty($aObject['override_class_file']))
             require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-        else
-            bx_import($sClass);
 
         $o = new $sClass($aObject);
 
@@ -186,14 +182,11 @@ class BxDolMetatags extends BxDol implements iBxDolFactoryObject
 
         if ($mixedImage && is_array($mixedImage)) {
             
-            if (!empty($mixedImage['object'])) {
-                bx_import('BxDolStorage');
+            if (!empty($mixedImage['object']))
                 $o = BxDolStorage::getObjectInstance($mixedImage['object']);
-            } 
-            elseif (!empty($mixedImage['transcoder'])) {
-                bx_import('BxDolTranscoder');
+            elseif (!empty($mixedImage['transcoder']))
                 $o = BxDolTranscoder::getObjectInstance($mixedImage['transcoder']);
-            }
+
             $mixedImage = $o ? $o->getFileUrlById($mixedImage['id']) : false;
         }
 
@@ -390,7 +383,6 @@ class BxDolMetatags extends BxDol implements iBxDolFactoryObject
     public function locationsString($iId)
     {
         bx_import('BxDolForm');
-        bx_import('BxDolFormQuery');
         $aCountries = BxDolFormQuery::getDataItems('Country');
         $aLocation = $this->locationGet($iId);
         if (!$aLocation || !$aLocation['country'] || !isset($aCountries[$aLocation['country']]))

+ 0 - 2
inc/classes/BxDolMetatagsQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for metatags objects.
  * @see BxDolMetatag

+ 0 - 1
inc/classes/BxDolModule.php

@@ -82,7 +82,6 @@ class BxDolModule extends BxDol
         if (empty($sName))
             return null;
 
-        bx_import('BxDolModuleQuery');
         $aModule = BxDolModuleQuery::getInstance()->getModuleByName($sName);
         if (empty($aModule) || !is_array($aModule))
             return null;

+ 0 - 1
inc/classes/BxDolModuleConfig.php

@@ -113,7 +113,6 @@ class BxDolModuleConfig extends BxDol
      */
     function getBaseUri()
     {
-        bx_import('BxDolPermalinks');
         return BxDolPermalinks::getInstance()->permalink('modules/?r=' . $this->_sUri . '/');
     }
     /**

+ 0 - 2
inc/classes/BxDolModuleQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 class BxDolModuleQuery extends BxDolDb implements iBxDolSingleton
 {
     function __construct()

+ 0 - 5
inc/classes/BxDolModuleTemplate.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolTemplate');
-
 class BxDolModuleTemplate extends BxDolTemplate
 {
     protected $_oDb;
@@ -50,13 +48,11 @@ class BxDolModuleTemplate extends BxDolTemplate
 
     function addStudioCss($mixedFiles, $bDynamic = false, $bSearchInModule = true)
     {
-        bx_import('BxDolStudioTemplate');
         return $this->_addFiles(BxDolStudioTemplate::getInstance(), 'addCss', 'addLocation', 'removeLocation', '', $mixedFiles, $bDynamic, $bSearchInModule);
     }
 
     function addStudioJs($mixedFiles, $bDynamic = false, $bSearchInModule = true)
     {
-        bx_import('BxDolStudioTemplate');
         return $this->_addFiles(BxDolStudioTemplate::getInstance(), 'addJs', 'addLocationJs', 'removeLocationJs', 'js/', $mixedFiles, $bDynamic, $bSearchInModule);
     }
 
@@ -72,7 +68,6 @@ class BxDolModuleTemplate extends BxDolTemplate
 
     function addStudioInjection($sKey, $sType, $sData, $iReplace = 0)
     {
-        bx_import('BxDolStudioTemplate');
         BxDolStudioTemplate::getInstance()->aPage['injections']['page_0'][$sKey][] = array(
             'page_index' => 0,
             'key' => $sKey,

+ 0 - 9
inc/classes/BxDolPage.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolPageQuery');
-
 /**
  * @page objects
  * @section page Page
@@ -111,7 +109,6 @@ bx_import('BxDolPageQuery');
  * 3. Display Page.
  * Use the following sample code to display page:
  * @code
- *     bx_import('BxDolPage');
  *     $oPage = BxDolPage::getObjectInstance('sample'); // 'sample' is 'object' field from 'sys_objects_page' table, it automatically creates instance of default or custom class by object name
  *     if ($oPage)
  *         echo $oPage->getCode(); // print page
@@ -163,14 +160,11 @@ class BxDolPage extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
         if (!$aObject || !is_array($aObject))
             return false;
 
-        bx_import('BxTemplPage');
         $sClass = 'BxTemplPage';
         if (!empty($aObject['override_class_name'])) {
             $sClass = $aObject['override_class_name'];
             if (!empty($aObject['override_class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-            else
-                bx_import($sClass);
         }
 
         $o = new $sClass($aObject);
@@ -189,7 +183,6 @@ class BxDolPage extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
     static public function processPageTrigger ($sPageTriggerName)
     {
         // get list of active modules
-        bx_import('BxDolModuleQuery');
         $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array(
             'type' => 'modules',
             'active' => 1,
@@ -244,7 +237,6 @@ class BxDolPage extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
      */
     protected function _isVisibleBlock ($a)
     {
-        bx_import('BxDolAcl');
         return BxDolAcl::getInstance()->isMemberLevelInSet($a['visible_for_levels']);
     }
 
@@ -253,7 +245,6 @@ class BxDolPage extends BxDol implements iBxDolFactoryObject, iBxDolReplaceable
      */
     protected function _isVisiblePage ($a)
     {
-        bx_import('BxDolAcl');
         return BxDolAcl::getInstance()->isMemberLevelInSet($a['visible_for_levels']);
     }
 

+ 0 - 2
inc/classes/BxDolPaginate.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolTemplate');
-
 define('BX_DOL_PAGINATE_PER_PAGE_DEFAULT', 10);
 
 /**

+ 0 - 2
inc/classes/BxDolPermalinks.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * @page objects
  * @section permalinks Permalinks

+ 0 - 7
inc/classes/BxDolPrivacy.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolPrivacyQuery');
-
 define('BX_DOL_PG_HIDDEN', '1');
 define('BX_DOL_PG_MEONLY', '2');
 define('BX_DOL_PG_ALL', '3');
@@ -91,19 +89,15 @@ class BxDolPrivacy extends BxDol implements iBxDolFactoryObject
         if(isset($GLOBALS['bxDolClasses']['BxDolPrivacy!' . $sObject]))
             return $GLOBALS['bxDolClasses']['BxDolPrivacy!' . $sObject];
 
-        bx_import('BxDolPrivacyQuery');
         $aObject = BxDolPrivacyQuery::getPrivacyObject($sObject);
         if(!$aObject || !is_array($aObject))
             return false;
 
-        bx_import('BxTemplPrivacy');
         $sClass = 'BxTemplPrivacy';
         if(!empty($aObject['override_class_name'])) {
             $sClass = $aObject['override_class_name'];
             if(!empty($aObject['override_class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-            else
-                bx_import($sClass);
         }
 
         $o = new $sClass($aObject);
@@ -281,7 +275,6 @@ class BxDolPrivacy extends BxDol implements iBxDolFactoryObject
 
     public function checkConnections($iOwnerId, $iViewerId)
     {
-        bx_import('BxDolConnection');
         return BxDolConnection::getObjectInstance('sys_profiles_friends')->isConnected($iOwnerId, $iViewerId, true);
     }
 

+ 0 - 2
inc/classes/BxDolPrivacyQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 class BxDolPrivacyQuery extends BxDolDb
 {
     protected $_aObject;

+ 1 - 12
inc/classes/BxDolProfile.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolProfileQuery');
-
 define('BX_PROFILE_ACTION_AUTO', 0); ///< automatic action without any checking
 define('BX_PROFILE_ACTION_MANUAL', 1); ///< manual action performed by human
 define('BX_PROFILE_ACTION_ROBOT', 2); ///< action peformed by some robot based on some conditions
@@ -127,7 +125,6 @@ class BxDolProfile extends BxDol implements iBxDolProfile
      */
     public function getAccountObject()
     {
-        bx_import('BxDolAccount');
         return BxDolAccount::getInstance($this->getAccountId());
     }
 
@@ -265,7 +262,6 @@ class BxDolProfile extends BxDol implements iBxDolProfile
             return false;
 
         // switch profile context if deleted profile is active profile context
-        bx_import('BxDolAccount');
         $oAccount = BxDolAccount::getInstance ($aProfileInfo['account_id']);
         $aAccountInfo = $oAccount->getInfo();
         if (!$bForceDelete && $ID == $aAccountInfo['profile_id']) {
@@ -280,13 +276,10 @@ class BxDolProfile extends BxDol implements iBxDolProfile
             return false;
 
         // delete associated comments
-        if($bDeleteWithContent) {
-	        bx_import('BxDolCmts');
+        if($bDeleteWithContent)
 	        BxDolCmts::onAuthorDelete($ID);
-        }
 
         // delete connections
-        bx_import('BxDolConnection');
         $oConn = BxDolConnection::getObjectInstance('sys_profiles_friends');
         $oConn->onDeleteInitiatorAndContent($ID);
 
@@ -294,7 +287,6 @@ class BxDolProfile extends BxDol implements iBxDolProfile
         $oConn->onDeleteInitiatorAndContent($ID);
 
         // delete profile's acl levels
-        bx_import('BxDolAcl');
         BxDolAcl::getInstance()->onProfileDelete($ID);
 
         // delete profile
@@ -402,8 +394,6 @@ class BxDolProfile extends BxDol implements iBxDolProfile
         if ($iViewerAccountId != $this->getAccountId() ||  $iViewerProfileId == $this->id())
             return;
 
-        bx_import('BxDolInformer');
-        bx_import('BxDolPermalinks');
         $oInformer = BxDolInformer::getInstance($oTemplate);
         if ($oInformer)
             $oInformer->add('sys-switch-profile-context', _t('_sys_txt_account_profile_context_change_suggestion', BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher', array('switch_to_profile' => $this->id()))), BX_INFORMER_INFO);
@@ -419,7 +409,6 @@ class BxDolProfile extends BxDol implements iBxDolProfile
     	$aProfiles = $this->_oQuery->getProfilesByAccount($aInfo['account_id']);
 
         if ($aInfo['type'] == 'system' && count($aProfiles) == 1) {
-            bx_import('BxDolPermalinks');
             $sUrl = BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher');
 
             $oInformer->add('sys-account-profile-system', _t('_sys_txt_account_profile_system', $sUrl), BX_INFORMER_ALERT);

+ 2 - 3
inc/classes/BxDolProfileForms.php

@@ -22,10 +22,9 @@ class BxDolProfileForms extends BxDol
 
     protected function _redirectAndExit ($sUrl, $isPermalink = true, $aMarkers = false)
     {
-        if ($isPermalink) {
-            bx_import('BxDolPermalinks');
+        if ($isPermalink)
             $sUrl = BxDolPermalinks::getInstance()->permalink($sUrl);
-        }
+
         header('Location: ' . BX_DOL_URL_ROOT . $this->_replaceMarkers($sUrl, $aMarkers));
         exit;
     }

+ 0 - 4
inc/classes/BxDolProfileQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * All queries related to profiles
  */
@@ -49,7 +47,6 @@ class BxDolProfileQuery extends BxDolDb implements iBxDolSingleton
      */
     public function getProfilesByAccount ($iAccountId)
     {
-        bx_import('BxDolAccountQuery');
         $oAccountQuery = BxDolAccountQuery::getInstance();
         $aAccountInfo = $oAccountQuery->getInfoById($iAccountId);
 
@@ -123,7 +120,6 @@ class BxDolProfileQuery extends BxDolDb implements iBxDolSingleton
             if (!$iProfileId)
                 return false;
 
-            bx_import('BxDolAccountQuery');
             if (!BxDolAccountQuery::getInstance()->updateCurrentProfile($iAccountId, $iProfileId))
                 return false;
         }

+ 1 - 4
inc/classes/BxDolProfileUndefined.php

@@ -13,12 +13,9 @@
  * @section example Example of usage
  *
  * @code
- * bx_import('BxDolProfile');
  * $oProfile = BxDolProfile::getInstance($iId);
- * if (!$oProfile) {
- *     bx_import('BxDolProfileUndefined');
+ * if (!$oProfile)
  *     $oProfile = BxDolProfileUndefined::getInstance();
- * }
  * @endcode
  */
 class BxDolProfileUndefined extends BxDol implements iBxDolSingleton, iBxDolProfile

+ 2 - 6
inc/classes/BxDolRequest.php

@@ -111,8 +111,7 @@ class BxDolRequest extends BxDol
                 return false;
 
             require_once($sFile);
-        } else
-            bx_import($sClass);
+        } 
 
         if(!class_exists($sClass))
             return false;
@@ -123,10 +122,8 @@ class BxDolRequest extends BxDol
     protected static function _methodExists($mixedModule, $sMethodType, $sMethodName, $sClass = "Module")
     {
         $aModule = $mixedModule;
-        if(is_string($mixedModule)) {
-            bx_import('BxDolModuleQuery');
+        if(is_string($mixedModule)) 
             $aModule = BxDolModuleQuery::getInstance()->getModuleByName($mixedModule);
-        }
 
         if (!$aModule)
             return false;
@@ -144,7 +141,6 @@ class BxDolRequest extends BxDol
         header('HTTP/1.0 404 Not Found');
 
         require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
-        bx_import('BxDolTemplate');
         bx_import('BxDolLanguages');
         $oTemplate = BxDolTemplate::getInstance();
         $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);

+ 0 - 7
inc/classes/BxDolRss.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolRssQuery');
-
 /**
  * @page objects
  * @section rss Rss
@@ -41,7 +39,6 @@ bx_import('BxDolRssQuery');
  * Step 2:
  * Get an RSS placeholder to display somewhere on a page
  * @code
- *  bx_import('BxDolRss');
  *  BxDolRss::getObjectInstance('my_module_rss_object')->getHolder($mixedRssId, $iRssNum);
  * @endcode
  *
@@ -78,19 +75,15 @@ class BxDolRss extends BxDol implements iBxDolFactoryObject
         if(isset($GLOBALS['bxDolClasses']['BxDolRss!' . $sObject]))
             return $GLOBALS['bxDolClasses']['BxDolRss!' . $sObject];
 
-        bx_import('BxDolRssQuery');
         $aObject = BxDolRssQuery::getRssObject($sObject);
         if(!$aObject || !is_array($aObject))
             return false;
 
-        bx_import('BxTemplRss');
         $sClass = 'BxTemplRss';
         if(!empty($aObject['class_name'])) {
             $sClass = $aObject['class_name'];
             if(!empty($aObject['class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aObject['class_file']);
-            else
-                bx_import($sClass);
         }
 
         $o = new $sClass($aObject);

+ 0 - 2
inc/classes/BxDolRssBoonEx.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxTemplRss');
-
 class BxDolRssBoonEx extends BxTemplRss
 {
 	protected $aFeeds;

+ 0 - 3
inc/classes/BxDolRssPageBlock.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxTemplRss');
-
 class BxDolRssPageBlock extends BxTemplRss
 {
     function __construct($aObject)
@@ -17,7 +15,6 @@ class BxDolRssPageBlock extends BxTemplRss
     }
 
     public function getUrl($mixedId) {
-    	bx_import('BxDolPageQuery');
 	    $oPageQuery = new BxDolPageQuery(array());
 
 	    $sContent = $oPageQuery->getPageBlockContent($mixedId);

+ 0 - 2
inc/classes/BxDolRssQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 class BxDolRssQuery extends BxDolDb
 {
 

+ 0 - 6
inc/classes/BxDolSearch.php

@@ -82,8 +82,6 @@ class BxDolSearch extends BxDol
      */
     public function response ()
     {
-    	bx_import('BxTemplSearchResult');		
-
         $sCode = '';
         foreach ($this->aChoice as $sKey => $aValue) {
         	$sClassName = 'BxTemplSearchResult';
@@ -91,8 +89,6 @@ class BxDolSearch extends BxDol
 	            $sClassName = $aValue['class'];
 	            if(!empty($aValue['file']))
 	                require_once(BX_DIRECTORY_PATH_ROOT . $aValue['file']);
-	            else
-	                bx_import($sClassName);
 	        }
 
             $oEx = new $sClassName();
@@ -369,7 +365,6 @@ class BxDolSearchResult implements iBxDolReplaceable
                 $aData[$k][$f['Link']] = $this->getRssUnitLink ($a);
         }
 
-        bx_import('BxDolRssFactory');
         $oRss = new BxDolRssFactory ();
 
         return $oRss->GenRssByCustomData(
@@ -593,7 +588,6 @@ class BxDolSearchResult implements iBxDolReplaceable
         
         // meta info
         if ($this->_sMetaType && !empty($this->aCurrent['object_metatags'])) {
-            bx_import('BxDolMetatags');
             $o = BxDolMetatags::getObjectInstance($this->aCurrent['object_metatags']);
             if ($o) {
                 unset($this->aCurrent['restriction']['keyword']);

+ 0 - 3
inc/classes/BxDolService.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolRequest');
-
 /**
  * Service calls to modules' methods.
  *
@@ -41,7 +39,6 @@ class BxDolService extends BxDol
      */
     public static function call($mixed, $sMethod, $aParams = array(), $sClass = 'Module')
     {
-        bx_import('BxDolModuleQuery');
         $oDb = BxDolModuleQuery::getInstance();
 
         $aModule = array();

+ 0 - 2
inc/classes/BxDolSession.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolSessionQuery');
-
 define('BX_DOL_SESSION_LIFETIME', 3600);
 define('BX_DOL_SESSION_COOKIE', 'memberSession');
 

+ 0 - 2
inc/classes/BxDolSessionQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * @see BxDolSession
  */

+ 0 - 4
inc/classes/BxDolSocialSharing.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolSocialSharingQuery');
-
 /**
  * @page objects
  * @section social_sharing Social Sharing Buttons
@@ -24,7 +22,6 @@ bx_import('BxDolSocialSharingQuery');
  * @section example Example of usage:
  *
  * @code
- * bx_import('BxTemplSocialSharing');
  * echo BxTemplSocialSharing::getInstance()->getCode($iId, $sModuleName, $sUrl, $sTitle);
  * @endcode
  *
@@ -64,7 +61,6 @@ class BxDolSocialSharing extends BxDol implements iBxDolSingleton
         if (isset($GLOBALS['bxDolClasses']['BxDolSocialSharing']))
             return $GLOBALS['bxDolClasses']['BxDolSocialSharing'];
 
-        bx_import('BxTemplSocialSharing');
         $o = new BxTemplSocialSharing();
 
         return ($GLOBALS['bxDolClasses']['BxDolSocialSharing'] = $o);

+ 0 - 2
inc/classes/BxDolSocialSharingQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * @see BxDolSocialSharing
  */

+ 0 - 5
inc/classes/BxDolStorage.php

@@ -57,8 +57,6 @@ define('BX_DOL_STORAGE_DEFAULT_ICON', 'mime-type-any.png'); ///< default icon if
 
 define('BX_DOL_STORAGE_QUEUED_DELETIONS_PER_RUN', 200); ///< max number of file deletions per one cron run, @see BxDolStorage::pruneDeletions
 
-bx_import('BxDolStorageQuery');
-
 /**
  * @page objects
  * @section storage Storage
@@ -150,7 +148,6 @@ bx_import('BxDolStorageQuery');
  * require_once('./inc/header.inc.php');
  * require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  *
- * bx_import('BxDolStorage');
  * BxDolStorage::pruning(); // pruning is needed to clear expired security tokens, you can call it on cron when your server is not busy
  * $oStorage = BxDolStorage::getObjectInstance('my_module'); // create storage object instance, 'my_module' is value of 'object' field in 'sys_objects_storage' table
  *
@@ -180,7 +177,6 @@ bx_import('BxDolStorageQuery');
  * require_once('./inc/header.inc.php');
  * require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  *
- * bx_import('BxDolStorage');
  * $oStorage = BxDolStorage::getObjectInstance('my_module');
  *
  * $iId = 1234; // since you've saved it somewhere in the previous step, you can retrieve it here
@@ -229,7 +225,6 @@ abstract class BxDolStorage extends BxDol implements iBxDolFactoryObject
             return false;
 
         $sClass = 'BxDolStorage' . $aObject['engine'];
-        bx_import($sClass);
         $o = new $sClass($aObject);
 
         if (!$o->isInstalled() || !$o->isAvailable())

+ 0 - 3
inc/classes/BxDolStorageLocal.php

@@ -10,8 +10,6 @@
 define ('BX_DOL_STORAGE_DIR_RIGHTS', BX_DOL_DIR_RIGHTS);
 define ('BX_DOL_STORAGE_FILE_RIGHTS', BX_DOL_FILE_RIGHTS);
 
-bx_import('BxDolStorage');
-
 /**
  * File storage in local folder.
  * @see BxDolStorage
@@ -126,7 +124,6 @@ class BxDolStorageLocal extends BxDolStorage
 
     protected function getObjectBaseUrl ($isPrivate = false)
     {
-        bx_import('BxDolPermalinks');
         return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('storage.php?o=' . $this->_aObject['object'] . '&f=');
     }
 

+ 0 - 3
inc/classes/BxDolStorageQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for File storage class.
  * @see BxDolStorage
@@ -92,7 +90,6 @@ class BxDolStorageQuery extends BxDolDb
             $a = array ('current_size' => 0, 'current_number' => 0, 'quota_size' => 0, 'quota_number' => 0, 'max_file_size' => 0);
 
         // get quota_number and quota_size from user's acl/membership
-        bx_import('BxDolAcl');
         $aMembershipInfo = BxDolAcl::getInstance()->getMemberMembershipInfo($iProfileId);
         if ($aMembershipInfo) {
             if (isset($aMembershipInfo['quota_size']))

+ 0 - 2
inc/classes/BxDolStorageS3.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolStorage');
-
 require_once(BX_DIRECTORY_PATH_PLUGINS . 'amazon-s3/S3.php');
 
 /**

+ 7 - 14
inc/classes/BxDolTemplate.php

@@ -219,7 +219,6 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
             $this->_sSubPath = 'boonex/uni/';
 
         if(isset($_GET[$this->_sCodeKey])) {
-            bx_import('BxDolPermalinks');
             if(BxDolPermalinks::getInstance()->redirectIfNecessary(array($this->_sCodeKey)))
                 exit;
         }
@@ -378,7 +377,7 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
 
         $this->aPage['injections'] = $aInjections;
 
-        bx_import('BxTemplConfig');
+        bx_import('BxTemplConfig'); // TODO: for some reason autoloader isn't working here....
         $this->_oConfigTemplate = BxTemplConfig::getInstance();
     }
 
@@ -518,12 +517,10 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
         if(empty($sCode) || !preg_match('/^[A-Za-z0-9_-]+$/', $sCode))
             return;
 
-        bx_import('BxDolModuleQuery');
         $aModule = BxDolModuleQuery::getInstance()->getModuleByUri($sCode);
         if(empty($aModule) || !is_array($aModule) || (int)$aModule['enabled'] != 1 || !file_exists($this->_sRootPath . 'modules/' . $aModule['path'] . 'data/template/'))
             return;
 
-        bx_import('BxDolModuleConfig');
         $oConfig = new BxDolModuleConfig($aModule);
 
         $this->_sCode = $oConfig->getUri();
@@ -783,12 +780,10 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
                 <meta name="geo.position" content="' . $this->aPage['location']['lat'] . ';' . $this->aPage['location']['lng'] . '" />
                 <meta name="geo.region" content="' . bx_html_attribute($this->aPage['location']['country']) . '" />';
 
-        if (!empty($this->aPage['image'])) {
+        if (!empty($this->aPage['image']))
             $sRet .= '<meta property="og:image" content="' . $this->aPage['image'] . '" />';
-        } else {
-            bx_import('BxTemplFunctions');
+        else
             $sRet .= BxTemplFunctions::getInstance()->getMetaIcons();
-        }
 
         if (!empty($this->aPage['rss']) && !empty($this->aPage['rss']['url']))
             $sRet .= '<link rel="alternate" type="application/rss+xml" title="' . bx_html_attribute($this->aPage['rss']['title'], BX_ESCAPE_STR_QUOTE) . '" href="' . $this->aPage['rss']['url'] . '" />';
@@ -888,7 +883,6 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
      */
     function getMenu ($s)
     {
-        bx_import('BxDolMenu');
         $oMenu = BxDolMenu::getObjectInstance($s);
         return $oMenu ? $oMenu->getCode () : '';
     }
@@ -1033,11 +1027,9 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
                     $sRet = bx_process_output($this->aPage['header_text']);
                 break;
             case 'popup_loading':
-                bx_import('BxTemplFunctions');
                 $s = $this->parsePageByName('popup_loading.html', array());
                 $sRet = BxTemplFunctions::getInstance()->transBox('bx-popup-loading', $s, true);
 
-                bx_import('BxTemplSearch');
                 $oSearch = new BxTemplSearch();
                 $oSearch->setLiveSearch(true);
                 $sRet .= $this->parsePageByName('search.html', array(
@@ -1053,11 +1045,9 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
                 $sRet = bx_lang_name();
                 break;
             case 'main_logo':
-                bx_import('BxTemplFunctions');
                 $sRet = BxTemplFunctions::getInstance()->getMainLogo();
                 break;
             case 'informer':
-                bx_import('BxDolInformer');
                 $oInformer = BxDolInformer::getInstance($this);
                 $sRet = $oInformer ? $oInformer->display() : '';
                 break;
@@ -1084,7 +1074,6 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
                 break;
 
             default:
-                bx_import('BxTemplFunctions');
                 $sRet = ($sTemplAdd = BxTemplFunctions::getInstance()->TemplPageAddComponent($sKey)) !== false ? $sTemplAdd : $aKeyWrappers['left'] . $sKey . $aKeyWrappers['right'];
         }
 
@@ -2137,21 +2126,25 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
      */
     function displayAccessDenied ($sMsg = '')
     {
+        bx_import('BxDolLanguages');
         header("HTTP/1.0 403 Forbidden");
         $this->displayMsg($sMsg ? $sMsg : _t('_Access denied'));
     }
     function displayNoData ($sMsg = '')
     {
+        bx_import('BxDolLanguages');
         header("HTTP/1.0 204 No Content");
         $this->displayMsg($sMsg ? $sMsg : _t('_Empty'));
     }
     function displayErrorOccured ($sMsg = '')
     {
+        bx_import('BxDolLanguages');
         header("HTTP/1.0 500 Internal Server Error");
         $this->displayMsg($sMsg ? $sMsg : _t('_error occured'));
     }
     function displayPageNotFound ($sMsg = '')
     {
+        bx_import('BxDolLanguages');
         header("HTTP/1.0 404 Not Found");
         $this->displayMsg($sMsg ? $sMsg : _t('_sys_request_page_not_found_cpt'));
     }

+ 0 - 7
inc/classes/BxDolTranscoder.php

@@ -7,10 +7,6 @@
  * @{
  */
 
-bx_import('BxDolStorage');
-bx_import('BxDolTranscoder');
-bx_import('BxDolTranscoderQuery');
-
 define('BX_DOL_QUEUE_PENDING', 'pending'); ///< file is pending for processing
 define('BX_DOL_QUEUE_PROCESSING', 'processing'); ///< file is in the process
 define('BX_DOL_QUEUE_COMPLETE', 'complete'); ///< file is already processed
@@ -70,8 +66,6 @@ class BxDolTranscoder extends BxDol implements iBxDolFactoryObject
         $sClass = $aObject['override_class_name'] ? $aObject['override_class_name'] : 'BxDolTranscoderImage';
         if (!empty($aObject['override_class_file']))
             require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-        else
-            bx_import($sClass);
 
         $o = new $sClass ($aObject, $oStorage);
 
@@ -590,7 +584,6 @@ class BxDolTranscoder extends BxDol implements iBxDolFactoryObject
 
     protected function applyFilter_Resize ($sFile, $aParams)
     {
-        bx_import ('BxDolImageResize');
         $o = BxDolImageResize::getInstance();
         $o->removeCropOptions ();
 

+ 0 - 5
inc/classes/BxDolTranscoderImage.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolTranscoder');
-bx_import('BxDolTranscoderImageQuery');
-
 /**
  * @page objects
  * @section transcoder_images Images Transcoder
@@ -74,7 +71,6 @@ bx_import('BxDolTranscoderImageQuery');
  *
  * Example of usage:
  * @code
- * bx_import('BxDolTranscoderImage');
  * $oTranscoder = BxDolTranscoderImage::getObjectInstance('bx_images_thumb'); // change images transcode object name to your own
  * $oTranscoder->registerHandlers(); // make sure to call it only once! before the first usage, no need to call it every time
  * $sTranscodedImageUrl = $oTranscoder->getFileUrl('my_dog.jpg'); // the name of file, in the case of 'Folder' storage type this is file name
@@ -145,7 +141,6 @@ class BxDolTranscoderImage extends BxDolTranscoder implements iBxDolFactoryObjec
 
     protected function applyFilter_Grayscale ($sFile, $aParams)
     {
-        bx_import ('BxDolImageResize');
         $o = BxDolImageResize::getInstance();
         $o->removeCropOptions ();
 

+ 0 - 2
inc/classes/BxDolTranscoderImageQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolTranscoderQuery');
-
 /**
  * @see BxDolTranscoderVideo
  */

+ 0 - 4
inc/classes/BxDolTranscoderProxy.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolTranscoder');
-bx_import('BxDolTranscoderImageQuery');
-
 /**
  * @page objects
  * @section transcoder_proxy Proxy Transcoder 
@@ -58,7 +55,6 @@ class BxDolTranscoderProxy extends BxDolTranscoder implements iBxDolFactoryObjec
             if (empty($this->_aObject['source_params']['video']))
                 continue;
 
-            bx_import('BxDolTranscoderVideo');
             foreach ($this->_aObject['source_params']['video'] as $sVideoTranscoder) {
                 if (!($oTranscoder = BxDolTranscoderVideo::getObjectInstance($sVideoTranscoder)))
                     continue;

+ 0 - 2
inc/classes/BxDolTranscoderQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 define('BX_DOL_QUEUE_PRUNE_FAILED', 604800); ///< timeout in seconds when 'failed' items are deleted
 define('BX_DOL_QUEUE_PRUNE_PROCESSING', 86400); ///< timeout in seconds when 'processing' items are deleted, in case when something went wrong during processing
 

+ 0 - 7
inc/classes/BxDolTranscoderVideo.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolTranscoder');
-bx_import('BxDolTranscoderVideoQuery');
-
 /**
  * @page objects
  * @section transcoder_videos Videos Transcoder
@@ -56,8 +53,6 @@ bx_import('BxDolTranscoderVideoQuery');
  *
  * Example of usage:
  * @code
- * bx_import('BxDolTranscoder');
- *
  * // transcoder objects which generate .mp4, .webm videos and image poster
  * $oTranscoderMp4 = BxDolTranscoder::getObjectInstance('bx_video_mp4'); 
  * $oTranscoderWebm = BxDolTranscoder::getObjectInstance('bx_video_webm');
@@ -106,7 +101,6 @@ class BxDolTranscoderVideo extends BxDolTranscoder implements iBxDolFactoryObjec
      */
     protected function applyFilter_Poster ($sFile, $aParams)
     {
-	    bx_import('BxDolImageResize');
     	$oImage = BxDolImageResize::getInstance();
 
         $sFileOut = $this->getTmpFilename('.jpg');
@@ -232,7 +226,6 @@ class BxDolTranscoderVideo extends BxDolTranscoder implements iBxDolFactoryObjec
             return false;
         }
 
-	    bx_import('BxDolImageResize');
     	$oImage = BxDolImageResize::getInstance();
         $aSize = $oImage->getImageSize($sFileOut);
 

+ 0 - 2
inc/classes/BxDolTranscoderVideoQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolTranscoderQuery');
-
 /**
  * @see BxDolTranscoderVideo
  */

+ 0 - 1
inc/classes/BxDolUpgrader.php

@@ -187,7 +187,6 @@ class BxDolUpgrader extends BxDol
     public function setTransientUpgradeCronJob ($sUnpackedPath)
     {
         $sUnpackedPath = rtrim($sUnpackedPath, '/') . '/';
-        bx_import('BxDolCronQuery');
         return BxDolCronQuery::getInstance()->addTransientJobClass('sys_perform_upgrade', 'BxDolUpgradeCron', bx_ltrim_str($sUnpackedPath, BX_DIRECTORY_PATH_ROOT) . 'BxDolUpgradeCron.php');
     }
 

+ 1 - 13
inc/classes/BxDolUploader.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolUploaderQuery');
-
 /**
  * @page objects
  * @section uploader Uploader
@@ -89,7 +87,6 @@ bx_import('BxDolUploaderQuery');
  * to create instance use the same form array as in the previous variant, for example:
  *
  * @code
- * bx_import('BxDolFormNested');
  * $oFormNested = new BxDolFormNested('attachment', $aFormNested, 'do_submit');
  * @endcode
  *
@@ -155,8 +152,6 @@ abstract class BxDolUploader extends BxDol
         $sClass = $aObject['override_class_name'];
         if (!empty($aObject['override_class_file']))
             require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
-        else
-            bx_import($sClass);
 
         $o = new $sClass($aObject, $sStorageObject, $sResultContainerId);
 
@@ -216,7 +211,6 @@ abstract class BxDolUploader extends BxDol
      */
     public function handleUploads ($iProfileId, $mixedFiles, $isMultiple = true, $iContentId = false, $bPrivate = true)
     {
-        bx_import('BxDolStorage');
         $oStorage = BxDolStorage::getObjectInstance($this->_sStorageObject);
 
         if (false == ($aMultipleFiles = $oStorage->convertMultipleFilesArray($mixedFiles)))
@@ -320,14 +314,11 @@ abstract class BxDolUploader extends BxDol
      */
     public function getGhosts($iProfileId, $sFormat, $sImagesTranscoder = false, $iContentId = false)
     {
-        bx_import('BxDolStorage');
         $oStorage = BxDolStorage::getObjectInstance($this->_sStorageObject);
 
         $oImagesTranscoder = false;
-        if ($sImagesTranscoder) {
-            bx_import('BxDolTranscoderImage');
+        if ($sImagesTranscoder)
             $oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($sImagesTranscoder);
-        }
 
         $a = '';
         $aGhosts = $oStorage->getGhosts($iProfileId, $iContentId);
@@ -365,7 +356,6 @@ abstract class BxDolUploader extends BxDol
      */
     public function deleteGhost($iFileId, $iProfileId)
     {
-        bx_import('BxDolStorage');
         $oStorage = BxDolStorage::getObjectInstance($this->_sStorageObject);
 
         $aFile = $oStorage->getFile ($iFileId);
@@ -389,7 +379,6 @@ abstract class BxDolUploader extends BxDol
     {
         $iCount = 0;
 
-        bx_import('BxDolStorage');
         $oStorage = BxDolStorage::getObjectInstance($this->_sStorageObject);
 
         $aGhosts = $oStorage->getGhosts($iProfileId, $iContentId);
@@ -412,7 +401,6 @@ abstract class BxDolUploader extends BxDol
     protected function getRestrictionsText ()
     {
         $sTextRestrictions = '';
-        bx_import('BxDolStorage');
         $oStorage = BxDolStorage::getObjectInstance($this->_sStorageObject);
         if (!$oStorage)
             return '';

+ 0 - 2
inc/classes/BxDolUploaderQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * Database queries for uploader objects.
  * @see BxDolUploader

+ 0 - 6
inc/classes/BxDolView.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolObject');
-bx_import('BxDolViewQuery');
-
 define ('BX_DOL_VIEW_OLD_VIEWS', 3 * 86400); ///< views older than this number of seconds will be deleted automatically
 
 /**
@@ -83,14 +80,11 @@ class BxDolView extends BxDolObject
         if(!isset($aSystems[$sSys]))
             return null;
 
-        bx_import('BxTemplView');
         $sClassName = 'BxTemplView';
         if(!empty($aSystems[$sSys]['class_name'])) {
             $sClassName = $aSystems[$sSys]['class_name'];
             if(!empty($aSystems[$sSys]['class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aSystems[$sSys]['class_file']);
-            else
-                bx_import($sClassName);
         }
 
         $o = new $sClassName($sSys, $iId, $iInit);

+ 0 - 2
inc/classes/BxDolViewQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * @see BxDolView
  */

+ 1 - 11
inc/classes/BxDolVote.php

@@ -7,9 +7,6 @@
  * @{
  */
 
-bx_import('BxDolObject');
-bx_import('BxDolVoteQuery');
-
 define('BX_DOL_VOTE_OLD_VOTES', 365 * 86400); ///< votes older than this number of seconds will be deleted automatically
 
 define('BX_DOL_VOTE_TYPE_STARS', 'stars');
@@ -63,7 +60,6 @@ define('BX_DOL_VOTE_USAGE_DEFAULT', BX_DOL_VOTE_USAGE_BLOCK);
  * for MinValue and MaxValue (for example 1) and IsUndo should be equal to 1. After filling the other
  * paramenters in the table you can show vote in any place, using the following code:
  * @code
- * bx_import('BxDolVote');
  * $o = BxDolVote::getObjectInstance('system object name', $iYourEntryId);
  * if (!$o->isEnabled()) return '';
  *     echo $o->getElementBlock();
@@ -113,14 +109,11 @@ class BxDolVote extends BxDolObject
         if(!isset($aSystems[$sSys]))
             return null;
 
-        bx_import('BxTemplVote');
         $sClassName = 'BxTemplVote';
         if(!empty($aSystems[$sSys]['class_name'])) {
             $sClassName = $aSystems[$sSys]['class_name'];
             if(!empty($aSystems[$sSys]['class_file']))
                 require_once(BX_DIRECTORY_PATH_ROOT . $aSystems[$sSys]['class_file']);
-            else
-                bx_import($sClassName);
         }
 
         $o = new $sClassName($sSys, $iId, $iInit);
@@ -360,12 +353,9 @@ class BxDolVote extends BxDolObject
 
     protected function _getAuthorObject($iAuthorId = 0)
     {
-        bx_import('BxDolProfile');
         $oProfile = BxDolProfile::getInstance($iAuthorId);
-        if (!$oProfile) {
-            bx_import('BxDolProfileUndefined');
+        if (!$oProfile)
             $oProfile = BxDolProfileUndefined::getInstance();
-        }
 
         return $oProfile;
     }

+ 0 - 2
inc/classes/BxDolVoteQuery.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDolDb');
-
 /**
  * @see BxDolVote
  */

+ 0 - 2
inc/classes/BxDolXmlParser.php

@@ -7,8 +7,6 @@
  * @{
  */
 
-bx_import('BxDol');
-
 class BxDolXmlParser extends BxDol implements iBxDolSingleton
 {
     protected $rParser;

+ 0 - 5
inc/design.inc.php

@@ -69,7 +69,6 @@ define('BX_FORMAT_DATE_TIME', 'sys_format_datetime'); ///< datetime format ident
  */
 function DesignBoxContent ($sTitle, $sContent, $iTemplateNum = BX_DB_DEF, $mixedMenu = false)
 {
-    bx_import('BxTemplFunctions');
     return BxTemplFunctions::getInstance()->designBoxContent ($sTitle, $sContent, $iTemplateNum, $mixedMenu);
 }
 
@@ -88,13 +87,11 @@ function send_headers_page_changed()
 
 function MsgBox($sText, $iTimer = 0)
 {
-    bx_import('BxTemplFunctions');
     return BxTemplFunctions::getInstance()->msgBox($sText, $iTimer);
 }
 
 function PopupBox($sName, $sTitle, $sContent, $isHiddenByDefault = false)
 {
-    bx_import('BxTemplFunctions');
     return BxTemplFunctions::getInstance()->popupBox($sName, $sTitle, $sContent, $isHiddenByDefault);
 }
 
@@ -139,7 +136,6 @@ function getSiteStatUser()
  */
 function bx_time_js ($iUnixTimestamp, $sFormatIdentifier = BX_FORMAT_DATE, $bForceFormat = false)
 {
-    bx_import('BxTemplFunctions');
     return BxTemplFunctions::getInstance()->timeForJs ($iUnixTimestamp, $sFormatIdentifier, $bForceFormat);
 }
 
@@ -153,7 +149,6 @@ function bx_time_utc ($iUnixTimestamp)
     return gmdate(DATE_ISO8601, (int)$iUnixTimestamp);
 }
 
-bx_import('BxDolAlerts');
 $oZ = new BxDolAlerts('system', 'design_included', 0);
 $oZ->alert();
 

+ 1 - 3
inc/params.inc.php

@@ -82,9 +82,7 @@ require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDol.php');
 require_once(BX_DIRECTORY_PATH_INC . 'utils.inc.php');
 require_once(BX_DIRECTORY_PATH_INC . 'version.inc.php');
 
-bx_import('BxDolService');
-bx_import('BxDolAlerts');
-bx_import('BxDolDb');
+spl_autoload_register('bx_autoload');
 
 require_once(BX_DIRECTORY_PATH_INC . 'profiles.inc.php');
 

+ 0 - 8
inc/profiles.inc.php

@@ -12,7 +12,6 @@
  */
 function bx_get_logged_profile_id ()
 {
-    bx_import('BxDolProfile');
     $o = BxDolProfile::getInstance();
     return $o ? $o->id() : false;
 }
@@ -72,7 +71,6 @@ function isRole($iRole, $iId = 0)
     if (!(int)$iId)
         $iId = getLoggedId();
 
-    bx_import('BxDolAccount');
     $oAccount = BxDolAccount::getInstance($iId);
     if (!$oAccount)
         return false;
@@ -95,7 +93,6 @@ function isRole($iRole, $iId = 0)
  */
 function bx_login($iId, $bRememberMe = false)
 {
-    bx_import('BxDolAccountQuery');
     $oAccountQuery = BxDolAccountQuery::getInstance();
 
     $sPassword = $oAccountQuery->getPassword($iId);
@@ -111,7 +108,6 @@ function bx_login($iId, $bRememberMe = false)
     setcookie("memberPassword", $sPassword, $iCookieTime, $sPath, $sHost, false, true /* http only */);
     $_COOKIE['memberPassword'] = $sPassword;
 
-    bx_import('BxDolSession');
     BxDolSession::getInstance()->setUserId($iId);
 
     $oAccountQuery->updateLoggedIn($iId);
@@ -138,7 +134,6 @@ function bx_logout($bNotify = true)
     unset($_COOKIE['memberID']);
     unset($_COOKIE['memberPassword']);
 
-    bx_import('BxDolSession');
     BxDolSession::getInstance()->destroy();
 }
 
@@ -173,7 +168,6 @@ function check_logged()
  */
 function bx_check_password($sLogin, $sPassword, $iRole = BX_DOL_ROLE_MEMBER)
 {
-    bx_import('BxDolAccount');
     $oAccount = BxDolAccount::getInstance($sLogin);
     if (!$oAccount) {
         bx_import('BxDolLanguages');
@@ -202,7 +196,6 @@ function bx_check_password($sLogin, $sPassword, $iRole = BX_DOL_ROLE_MEMBER)
  */
 function bx_check_login($iID, $sPassword, $iRole = BX_DOL_ROLE_MEMBER)
 {
-    bx_import('BxDolAccount');
     $oAccount = BxDolAccount::getInstance((int)$iID);
 
     // If no such account available
@@ -258,7 +251,6 @@ function bx_require_authentication ($bStudio = false)
 function bx_login_form($bStudio = false, $bAjaxMode = false)
 {
     if ($bStudio == 1) {
-        bx_import("BxTemplStudioFunctions");
         BxTemplStudioFunctions::getInstance()->getLoginForm();
         exit;
     }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików