Ver Fonte

#53 - reorganizing js files, cleanup system classes

Alex Trofimov há 12 anos atrás
pai
commit
848d8b2e16
34 ficheiros alterados com 307 adições e 344 exclusões
  1. 2 3
      inc/classes/BxDol.php
  2. 2 2
      inc/classes/BxDolAccount.php
  3. 1 1
      inc/classes/BxDolAcl.php
  4. 12 12
      inc/classes/BxDolAlerts.php
  5. 14 14
      inc/classes/BxDolCache.php
  6. 23 25
      inc/classes/BxDolCacheAPC.php
  7. 24 23
      inc/classes/BxDolCacheEAccelerator.php
  8. 27 18
      inc/classes/BxDolCacheFile.php
  9. 16 18
      inc/classes/BxDolCacheFileHtml.php
  10. 28 18
      inc/classes/BxDolCacheMemcache.php
  11. 11 5
      inc/classes/BxDolCacheUtilities.php
  12. 24 25
      inc/classes/BxDolCacheXCache.php
  13. 3 2
      inc/classes/BxDolCmts.php
  14. 11 7
      inc/classes/BxDolCmtsQuery.php
  15. 30 23
      inc/classes/BxDolConfig.php
  16. 21 18
      inc/classes/BxDolCron.php
  17. 18 16
      inc/classes/BxDolCronCmd.php
  18. 0 59
      inc/classes/BxDolCronNotifies.php
  19. 1 1
      inc/classes/BxDolCronStorage.php
  20. 1 1
      inc/classes/BxDolEmailTemplates.php
  21. 0 4
      inc/classes/BxDolEmailTemplatesQuery.php
  22. 0 20
      inc/js/functions.js
  23. 0 0
      inc/js/jquery.anim.js
  24. 0 1
      install/sql/system.sql
  25. 1 1
      modules/boonex/timeline/classes/BxTimelineTemplate.php
  26. 12 9
      modules/boonex/uni/data/template/system/scripts/BxTemplCmts.php
  27. 0 0
      plugins/jquery/jquery.autoresize.js
  28. 0 0
      plugins/jquery/jquery.cookie.js
  29. 0 0
      plugins/jquery/jquery.easing.js
  30. 2 2
      studio/template/scripts/BxBaseStudioDesigns.php
  31. 2 2
      studio/template/scripts/BxBaseStudioLanguages.php
  32. 2 2
      studio/template/scripts/BxBaseStudioModules.php
  33. 1 1
      studio/template/scripts/BxBaseStudioPage.php
  34. 18 11
      template/scripts/BxBaseCmts.php

+ 2 - 3
inc/classes/BxDol.php

@@ -18,9 +18,7 @@
  * Base class for all Dolphin classes
  */
 class BxDol {
-    function BxDol () {
-
-    }
+    public function BxDol () {}
 }
 
 /**
@@ -74,3 +72,4 @@ interface iBxDolProfileService {
 }
 
 /** @} */
+

+ 2 - 2
inc/classes/BxDolAccount.php

@@ -11,8 +11,8 @@ bx_import('BxDolAccountQuery');
 
 class BxDolAccount extends BxDol {
 
-    var $_iAccountID;
-    var $_oQuery;
+    protected $_iAccountID;
+    protected $_oQuery;
 
     /**
      * Constructor

+ 1 - 1
inc/classes/BxDolAcl.php

@@ -93,7 +93,7 @@ class BxDolAcl extends BxDol implements iBxDolSingleton {
         if (isset($GLOBALS['bxDolClasses'][get_class($this)]))
             trigger_error ('Multiple instances are not allowed for the class: ' . get_class($this), E_USER_ERROR);
 
-        parent::BxDol();
+        parent::__construct();
 
         $this->oDb = new BxDolAclQuery();
     }

+ 12 - 12
inc/classes/BxDolAlerts.php

@@ -39,14 +39,14 @@ defined('BX_DOL') or die('hack attempt');
  */
 class BxDolAlerts extends BxDol {
 
-    var $sUnit;
-    var $sAction;
-    var $iObject;
-    var $iSender;
-    var $aExtras;
+    public $sUnit;
+    public $sAction;
+    public $iObject;
+    public $iSender;
+    public $aExtras;
 
-    var $_aAlerts;
-    var $_aHandlers;
+    protected $_aAlerts;
+    protected $_aHandlers;
 
     /**
      * Constructor
@@ -55,8 +55,8 @@ class BxDolAlerts extends BxDol {
      * @param int $iObjectId - object id
      * @param int $iSenderId - sender (action's author) profile id, if it is false - then currectly logged in profile id is used
      */
-    public function BxDolAlerts($sUnit, $sAction, $iObjectId, $iSender = false, $aExtras = array()) {
-        parent::BxDol();
+    public function __construct($sUnit, $sAction, $iObjectId, $iSender = false, $aExtras = array()) {
+        parent::__construct();
 
         $oDb = BxDolDb::getInstance();
         $oCache = $oDb->getDbCacheObject();
@@ -134,11 +134,11 @@ class BxDolAlerts extends BxDol {
 
 class BxDolAlertsResponse extends BxDol
 {
-    public function __construct() {
+    public function __construct() 
+    {
         parent::__construct();
     }
 
-    public function response($oAlert) {
-    }
+    public function response($oAlert) {}
 }
 

+ 14 - 14
inc/classes/BxDolCache.php

@@ -1,23 +1,20 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
-class BxDolCache extends BxDol {
-    /**
-     * constructor
-     */
-    function BxDolCache() {
-        parent::BxDol();
-    }
+class BxDolCache extends BxDol 
+{
     /**
      * Is cache engine available?
      * @return boolean
      */
-    function isAvailable() {
+    function isAvailable() 
+    {
         return true;
     }
 
@@ -25,7 +22,8 @@ class BxDolCache extends BxDol {
      * Are required php modules are installed for this cache engine ?
      * @return boolean
      */
-    function isInstalled() {
+    function isInstalled() 
+    {
         return true;
     }
 
@@ -36,3 +34,5 @@ class BxDolCache extends BxDol {
     function getSizeByPrefix ($s) {}
 }
 
+/** @} */
+

+ 23 - 25
inc/classes/BxDolCacheAPC.php

@@ -1,23 +1,17 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolCache');
 
-class BxDolCacheAPC extends BxDolCache {
-
-    var $iTTL = 3600;
-
-    /**
-     * constructor
-     */
-    function BxDolCacheAPC() {
-        parent::BxDolCache();
-    }
+class BxDolCacheAPC extends BxDolCache 
+{
+    protected $iTTL = 3600;
 
     /**
      * Get data from shared memory cache
@@ -26,8 +20,8 @@ class BxDolCacheAPC extends BxDolCache {
      * @param int $iTTL - time to live
      * @return the data is got from cache.
      */
-    function getData($sKey, $iTTL = false) {
-
+    function getData($sKey, $iTTL = false) 
+    {
         $isSucess = false;
         $mixedData = apc_fetch ($sKey, $isSucess);
         if (!$isSucess)
@@ -43,8 +37,8 @@ class BxDolCacheAPC extends BxDolCache {
      * @param int $iTTL - time to live
      * @return boolean result of operation.
      */
-    function setData($sKey, $mixedData, $iTTL = false) {
-
+    function setData($sKey, $mixedData, $iTTL = false) 
+    {
         return apc_store ($sKey, $mixedData, false === $iTTL ? $this->iTTL : $iTTL);
     }
 
@@ -54,8 +48,8 @@ class BxDolCacheAPC extends BxDolCache {
      * @param string $sKey - file name
      * @return result of the operation
      */
-    function delData($sKey) {
-
+    function delData($sKey) 
+    {
         $isSucess = false;
         apc_fetch ($sKey, $isSucess);
         if (!$isSucess)
@@ -68,7 +62,8 @@ class BxDolCacheAPC extends BxDolCache {
      * Check if apc cache functions are available
      * @return boolean
      */
-    function isAvailable() {
+    function isAvailable() 
+    {
         return function_exists('apc_store');
     }
 
@@ -76,7 +71,8 @@ class BxDolCacheAPC extends BxDolCache {
      * Check if apc extension is loaded
      * @return boolean
      */
-    function isInstalled() {
+    function isInstalled() 
+    {
         return extension_loaded('apc');
     }
 
@@ -84,8 +80,8 @@ class BxDolCacheAPC extends BxDolCache {
      * remove all data from cache by key prefix
      * @return true on success
      */
-    function removeAllByPrefix ($s) {
-
+    function removeAllByPrefix ($s) 
+    {
         $l = strlen($s);
         $aKeys = apc_cache_info('user');
         if (isset($aKeys['cache_list']) && is_array($aKeys['cache_list'])) {
@@ -99,3 +95,5 @@ class BxDolCacheAPC extends BxDolCache {
     }
 }
 
+/** @} */
+

+ 24 - 23
inc/classes/BxDolCacheEAccelerator.php

@@ -1,23 +1,17 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolCache');
 
-class BxDolCacheEAccelerator extends BxDolCache {
-
-    var $iTTL = 3600;
-
-    /**
-     * constructor
-     */
-    function BxDolCacheEAccelerator() {
-        parent::BxDolCache();
-    }
+class BxDolCacheEAccelerator extends BxDolCache 
+{
+    protected $iTTL = 3600;
 
     /**
      * Get data from shared memory cache
@@ -26,10 +20,12 @@ class BxDolCacheEAccelerator extends BxDolCache {
      * @param int $iTTL - time to live
      * @return the data is got from cache.
      */
-    function getData($sKey, $iTTL = false) {
+    function getData($sKey, $iTTL = false) 
+    {
         $sData = eaccelerator_get($sKey);
         return null === $sData ? null : unserialize($sData);
     }
+
     /**
      * Save data in shared memory cache
      *
@@ -38,7 +34,8 @@ class BxDolCacheEAccelerator extends BxDolCache {
      * @param int $iTTL - time to live
      * @return boolean result of operation.
      */
-    function setData($sKey, $mixedData, $iTTL = false) {
+    function setData($sKey, $mixedData, $iTTL = false) 
+    {
         $bResult = eaccelerator_put($sKey, serialize($mixedData), false === $iTTL ? $this->iTTL : $iTTL);
         return $bResult;
     }
@@ -49,8 +46,8 @@ class BxDolCacheEAccelerator extends BxDolCache {
      * @param string $sKey - file name
      * @return result of the operation
      */
-    function delData($sKey) {
-
+    function delData($sKey) 
+    {
         eaccelerator_lock($sKey);
 
         eaccelerator_rm($sKey);
@@ -64,7 +61,8 @@ class BxDolCacheEAccelerator extends BxDolCache {
      * Check if eAccelerator is available
      * @return boolean
      */
-    function isAvailable() {
+    function isAvailable() 
+    {
         return function_exists('eaccelerator_put');
     }
 
@@ -72,7 +70,8 @@ class BxDolCacheEAccelerator extends BxDolCache {
      * Check if eaccelerator extension is loaded
      * @return boolean
      */
-    function isInstalled() {
+    function isInstalled() 
+    {
         return extension_loaded('eaccelerator');
     }
 
@@ -80,8 +79,8 @@ class BxDolCacheEAccelerator extends BxDolCache {
      * remove all data from cache by key prefix
      * @return true on success
      */
-    function removeAllByPrefix ($s) {
-
+    function removeAllByPrefix ($s) 
+    {
         $l = strlen($s);
         $aKeys = eaccelerator_list_keys();
         foreach ($aKeys as $aKey) {
@@ -94,3 +93,5 @@ class BxDolCacheEAccelerator extends BxDolCache {
     }
 }
 
+/** @} */
+

+ 27 - 18
inc/classes/BxDolCacheFile.php

@@ -1,22 +1,24 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolCache');
 
-class BxDolCacheFile extends BxDolCache {
-    var $sPath;
+class BxDolCacheFile extends BxDolCache 
+{
+    protected $sPath;
 
     /**
      * constructor
      */
-    function BxDolCacheFile() {
-        parent::BxDolCache();
-
+    function __construct() 
+    {
+        parent::__construct();
         $this->sPath = BX_DIRECTORY_PATH_CACHE;
     }
 
@@ -27,8 +29,8 @@ class BxDolCacheFile extends BxDolCache {
      * @param int $iTTL - time to live
      * @return the data is got from cache.
      */
-    function getData($sKey, $iTTL = false) {
-
+    function getData($sKey, $iTTL = false) 
+    {
         if (!file_exists($this->sPath . $sKey))
             return null;
 
@@ -38,6 +40,7 @@ class BxDolCacheFile extends BxDolCache {
         include($this->sPath . $sKey);
         return $mixedData;
     }
+
     /**
      * Save all data in cache file.
      *
@@ -46,7 +49,8 @@ class BxDolCacheFile extends BxDolCache {
      * @param int $iTTL - time to live
      * @return boolean result of operation.
      */
-    function setData($sKey, $mixedData, $iTTL = false) {
+    function setData($sKey, $mixedData, $iTTL = false) 
+    {
         if(file_exists($this->sPath . $sKey) && !is_writable($this->sPath . $sKey))
            return false;
 
@@ -66,7 +70,8 @@ class BxDolCacheFile extends BxDolCache {
      * @param string $sKey - file name
      * @return result of the operation
      */
-    function delData($sKey) {
+    function delData($sKey) 
+    {
         $sFile = $this->sPath . $sKey;
         return !file_exists($sFile) || @unlink($sFile);
     }
@@ -75,8 +80,8 @@ class BxDolCacheFile extends BxDolCache {
      * remove all data from cache by key prefix
      * @return true on success
      */
-    function removeAllByPrefix ($s) {
-
+    function removeAllByPrefix ($s) 
+    {
         if (!($rHandler = opendir($this->sPath)))
             return false;
 
@@ -93,7 +98,8 @@ class BxDolCacheFile extends BxDolCache {
     /**
      * get size of cached data by name prefix
      */
-    function getSizeByPrefix ($s) {
+    function getSizeByPrefix ($s)
+    {
         if (!($rHandler = opendir($this->sPath)))
             return false;
 
@@ -114,7 +120,8 @@ class BxDolCacheFile extends BxDolCache {
      * @param int $iTTL - time to live in seconds
      * @return true if TTL is expired and file is deleted or false otherwise
      */
-    function _removeFileIfTtlExpired ($sFile, $iTTL) {
+    function _removeFileIfTtlExpired ($sFile, $iTTL) 
+    {
         $iTimeDiff = time() - filectime($sFile);
         if ($iTimeDiff > $iTTL) {
             @unlink ($sFile);
@@ -125,3 +132,5 @@ class BxDolCacheFile extends BxDolCache {
     }
 }
 
+/** @} */
+

+ 16 - 18
inc/classes/BxDolCacheFileHtml.php

@@ -1,22 +1,16 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolCacheFile');
 
-class BxDolCacheFileHtml extends BxDolCacheFile {
-
-    /**
-     * constructor
-     */
-    function BxDolCacheFileHtml() {
-        parent::BxDolCacheFile();
-    }
-
+class BxDolCacheFileHtml extends BxDolCacheFile
+{
     /**
      * Get all data from the cache file.
      *
@@ -24,8 +18,8 @@ class BxDolCacheFileHtml extends BxDolCacheFile {
      * @param int $iTTL - time to live
      * @return the data is got from cache.
      */
-    function getData($sKey, $iTTL = false) {
-
+    function getData($sKey, $iTTL = false)
+    {
         if(!file_exists($this->sPath . $sKey))
             return null;
 
@@ -38,7 +32,8 @@ class BxDolCacheFileHtml extends BxDolCacheFile {
     /**
      * Get full path to cache file
      */
-    function getDataFilePath($sKey, $iTTL = false) {
+    function getDataFilePath($sKey, $iTTL = false) 
+    {
         if (!file_exists($this->sPath . $sKey))
             return null;
 
@@ -56,7 +51,8 @@ class BxDolCacheFileHtml extends BxDolCacheFile {
      * @param int $iTTL - time to live
      * @return boolean result of operation.
      */
-    function setData($sKey, $mixedData, $iTTL = false) {
+    function setData($sKey, $mixedData, $iTTL = false) 
+    {
         if(file_exists($this->sPath . $sKey) && !is_writable($this->sPath . $sKey))
            return false;
 
@@ -71,3 +67,5 @@ class BxDolCacheFileHtml extends BxDolCacheFile {
     }
 }
 
+/** @} */
+

+ 28 - 18
inc/classes/BxDolCacheMemcache.php

@@ -1,24 +1,26 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolCache');
 
-class BxDolCacheMemcache extends BxDolCache {
-
-    var $iTTL = 3600;
-    var $iStoreFlag = 0;
-    var $oMemcache = null;
+class BxDolCacheMemcache extends BxDolCache 
+{
+    protected $iTTL = 3600;
+    protected $iStoreFlag = 0;
+    protected $oMemcache = null;
 
     /**
      * constructor
      */
-    function BxDolCacheMemcache() {
-        parent::BxDolCache();
+    function __construct() 
+    {
+        parent::__construct();
         if (class_exists('Memcache')) {
             $this->oMemcache = new Memcache();
             if (!$this->oMemcache->connect (getParam('sys_cache_memcache_host'), getParam('sys_cache_memcache_port')))
@@ -33,7 +35,8 @@ class BxDolCacheMemcache extends BxDolCache {
      * @param int $iTTL - time to live
      * @return the data is got from cache.
      */
-    function getData($sKey, $iTTL = false) {
+    function getData($sKey, $iTTL = false) 
+    {
         $mixedData = $this->oMemcache->get($sKey);
         return false === $mixedData ? null : $mixedData;
     }
@@ -46,7 +49,8 @@ class BxDolCacheMemcache extends BxDolCache {
      * @param int $iTTL - time to live
      * @return boolean result of operation.
      */
-    function setData($sKey, $mixedData, $iTTL = false) {
+    function setData($sKey, $mixedData, $iTTL = false) 
+    {
         return $this->oMemcache->set($sKey, $mixedData, $this->iStoreFlag, false === $iTTL ? $this->iTTL : $iTTL);
     }
 
@@ -56,7 +60,8 @@ class BxDolCacheMemcache extends BxDolCache {
      * @param string $sKey - file name
      * @return result of the operation
      */
-    function delData($sKey) {
+    function delData($sKey) 
+    {
         $this->oMemcache->delete($sKey);
         return true;
     }
@@ -65,7 +70,8 @@ class BxDolCacheMemcache extends BxDolCache {
      * Check if memcache is available
      * @return boolean
      */
-    function isAvailable() {
+    function isAvailable() 
+    {
         return $this->oMemcache == null ? false : true;
     }
 
@@ -73,7 +79,8 @@ class BxDolCacheMemcache extends BxDolCache {
      * Check if memcache extension is loaded
      * @return boolean
      */
-    function isInstalled() {
+    function isInstalled() 
+    {
         return extension_loaded('memcache');
     }
 
@@ -81,9 +88,12 @@ class BxDolCacheMemcache extends BxDolCache {
      * remove all data from cache by key prefix
      * @return true on success
      */
-    function removeAllByPrefix ($s) {
+    function removeAllByPrefix ($s) 
+    {
         // not implemented for current cache
         return false;
     }
 }
 
+/** @} */
+

+ 11 - 5
inc/classes/BxDolCacheUtilities.php

@@ -1,11 +1,13 @@
-<?php
-
+<?php defined('BX_DOL') or die('hack attempt');
 /**
  * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
 
-class BxDolCacheUtilities extends BxDolMistake
+class BxDolCacheUtilities extends BxDol
 {
     protected $oMemberMenu;
     protected $oCacheMemberMenu;
@@ -15,7 +17,7 @@ class BxDolCacheUtilities extends BxDolMistake
 
     function __construct ()
     {
-        parent::BxDolMistake();
+        parent::__construct();
 
         // member menu
         bx_import('BxDolMemberMenu');
@@ -96,6 +98,7 @@ class BxDolCacheUtilities extends BxDolMistake
         else
             return array('code' => 0, 'message' => _t('_adm_txt_dashboard_cache_clean_success'));
     }
+
     function _getSizeCacheObject($oCache, $sPrefix)
     {
         return $oCache->getSizeByPrefix ($sPrefix);
@@ -115,6 +118,7 @@ class BxDolCacheUtilities extends BxDolMistake
 
         return array('code' => 0, 'message' => _t('_adm_txt_dashboard_cache_clean_success'));
     }
+
     function _getSizeCache($sPrefix, $sPath)
     {
         if (!($rHandler = opendir($sPath)))
@@ -130,5 +134,7 @@ class BxDolCacheUtilities extends BxDolMistake
 
         return $iSize;
     }
-
 }
+
+/** @} */
+

+ 24 - 25
inc/classes/BxDolCacheXCache.php

@@ -1,23 +1,17 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolCache');
 
-class BxDolCacheXCache extends BxDolCache {
-
-    var $iTTL = 3600;
-
-    /**
-     * constructor
-     */
-    function BxDolCacheXCache() {
-        parent::BxDolCache();
-    }
+class BxDolCacheXCache extends BxDolCache 
+{
+    protected $iTTL = 3600;
 
     /**
      * Get data from shared memory cache
@@ -26,13 +20,14 @@ class BxDolCacheXCache extends BxDolCache {
      * @param int $iTTL - time to live
      * @return the data is got from cache.
      */
-    function getData($sKey, $iTTL = false) {
-
+    function getData($sKey, $iTTL = false) 
+    {
         if (!xcache_isset($sKey))
             return null;
 
         return xcache_get($sKey);
     }
+
     /**
      * Save data in shared memory cache
      *
@@ -41,8 +36,8 @@ class BxDolCacheXCache extends BxDolCache {
      * @param int $iTTL - time to live
      * @return boolean result of operation.
      */
-    function setData($sKey, $mixedData, $iTTL = false) {
-
+    function setData($sKey, $mixedData, $iTTL = false) 
+    {
         $bResult = xcache_set($sKey, $mixedData, false === $iTTL ? $this->iTTL : $iTTL);
         return $bResult;
     }
@@ -53,8 +48,8 @@ class BxDolCacheXCache extends BxDolCache {
      * @param string $sKey - file name
      * @return result of the operation
      */
-    function delData($sKey) {
-
+    function delData($sKey) 
+    {
         if (!xcache_isset($sKey))
             return true;
 
@@ -65,7 +60,8 @@ class BxDolCacheXCache extends BxDolCache {
      * Check if xcache functions are available
      * @return boolean
      */
-    function isAvailable() {
+    function isAvailable() 
+    {
         return extension_loaded('xcache');
     }
 
@@ -73,7 +69,8 @@ class BxDolCacheXCache extends BxDolCache {
      * Check if xcache extension is loaded
      * @return boolean
      */
-    function isInstalled() {
+    function isInstalled() 
+    {
         return extension_loaded('xcache');
     }
 
@@ -81,9 +78,11 @@ class BxDolCacheXCache extends BxDolCache {
      * remove all data from cache by key prefix
      * @return true on success
      */
-    function removeAllByPrefix ($s) {
-
+    function removeAllByPrefix ($s) 
+    {
         return xcache_unset_by_prefix ($s);
     }
 }
 
+/** @} */
+

+ 3 - 2
inc/classes/BxDolCmts.php

@@ -178,9 +178,9 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
      * $sSystem - comments system name
      * $iId - obect id to be commented
      */
-    function BxDolCmts( $sSystem, $iId, $iInit = 1)
+    function __construct($sSystem, $iId, $iInit = 1)
     {
-        parent::BxDol();
+        parent::__construct();
 
         $this->_aSystems = $this->getSystems();
 		if(!isset($this->_aSystems[$sSystem]))
@@ -994,3 +994,4 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 }
 
 /** @} */
+

+ 11 - 7
inc/classes/BxDolCmtsQuery.php

@@ -1,10 +1,11 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolDb');
 
@@ -24,7 +25,7 @@ class BxDolCmtsQuery extends BxDolDb
     protected $_sTableImages;
     protected $_sTableImages2Entries;
 
-    function BxDolCmtsQuery(&$oMain)
+    function __construct(&$oMain)
     {
     	$this->_oMain = $oMain;
 
@@ -38,7 +39,7 @@ class BxDolCmtsQuery extends BxDolDb
         $this->_sTableImages = $aSystem['table_images'];
         $this->_sTableImages2Entries = $aSystem['table_images2entries'];
 
-        parent::BxDolDb();
+        parent::__construct();
     }
 
     function getTableName ()
@@ -301,3 +302,6 @@ class BxDolCmtsQuery extends BxDolDb
         return $aFiles;
     }
 }
+
+/** @} */
+

+ 30 - 23
inc/classes/BxDolConfig.php

@@ -12,23 +12,25 @@ bx_import('BxDol');
 /**
  * System class for main configuration settings.
  */
-class BxDolConfig extends BxDol implements iBxDolSingleton {
-    var $aUrlStatic;
-    var $aUrlDynamic;
+class BxDolConfig extends BxDol implements iBxDolSingleton
+{
+    protected $aUrlStatic;
+    protected $aUrlDynamic;
 
-    var $aPathStatic;
-    var $aPathDynamic;
+    protected $aPathStatic;
+    protected $aPathDynamic;
 
-    var $aDb;
+    protected $aDb;
 
     /**
      * constructor
      */
-    function BxDolConfig() {
+    protected function __construct() 
+    {
         if(isset($GLOBALS['bxDolClasses'][get_class($this)]))
             trigger_error('Multiple instances are not allowed for the class: ' . get_class($this), E_USER_ERROR);
 
-        parent::BxDol();
+        parent::__construct();
 
         $this->aUrlStatic = array();
         $this->aUrlDynamic = array();
@@ -38,10 +40,12 @@ class BxDolConfig extends BxDol implements iBxDolSingleton {
 
         $this->aDb = array();
     }
+
     /**
      * Prevent cloning the instance
      */
-    public function __clone() {
+    public function __clone() 
+    {
         if (isset($GLOBALS['bxDolClasses'][get_class($this)]))
             trigger_error('Clone is not allowed for the class: ' . get_class($this), E_USER_ERROR);
     }
@@ -49,7 +53,8 @@ class BxDolConfig extends BxDol implements iBxDolSingleton {
     /**
      * Get singleton instance of the class
      */
-    public static function getInstance() {
+    public static function getInstance() 
+    {
         if(!isset($GLOBALS['bxDolClasses'][__CLASS__])) {
             $GLOBALS['bxDolClasses'][__CLASS__] = new BxDolConfig();
             $GLOBALS['bxDolClasses'][__CLASS__]->init();
@@ -58,19 +63,14 @@ class BxDolConfig extends BxDol implements iBxDolSingleton {
         return $GLOBALS['bxDolClasses'][__CLASS__];
     }
 
-    function init() {
+    function init() 
+    {
         $this->aUrlDynamic = array(
             'tmp' => BX_DOL_URL_ROOT . 'tmp/',
-            'rpr_images_main' => '', //--- For Site's main images like logo, etc
-            'rpr_images_promo' => '', //--- For Promo images
-            'rpr_images_watermark' => '' //--- For Watermarks
         );
 
         $this->aPathDynamic = array(
             'tmp' => BX_DIRECTORY_PATH_ROOT . 'tmp/',
-            'rpr_images_main' => '', //--- For Site's main images like logo, etc
-            'rpr_images_promo' => '', //--- For Promo images
-            'rpr_images_watermark' => '' //--- For Watermarks
         );
 
         $this->aDb = array(
@@ -80,22 +80,26 @@ class BxDolConfig extends BxDol implements iBxDolSingleton {
         );
     }
 
-    function get($sGroup, $sName) {
+    function get($sGroup, $sName) 
+    {
         return $this->{$this->getVarName($sGroup)}[$sName];
     }
 
-    function getGroup($sGroup) {
+    function getGroup($sGroup) 
+    {
         return $this->{$this->getVarName($sGroup)};
     }
 
-    function set($sGroup, $sName, $sValue, $bDefine = false) {
+    function set($sGroup, $sName, $sValue, $bDefine = false) 
+    {
         if($bDefine)
             define($this->getDefineName($sGroup, $sName), $sValue);
         else
             $this->{$this->getVarName($sGroup)}[$sName] = $sValue;
     }
 
-    function setGroup($sGroup, $aValue, $bDefine = false) {
+    function setGroup($sGroup, $aValue, $bDefine = false) 
+    {
         if($bDefine)
             foreach($aValue as $sName => $sValue)
                 define($this->getDefineName($sGroup, $sName), $sValue);
@@ -109,14 +113,17 @@ class BxDolConfig extends BxDol implements iBxDolSingleton {
         }
     }
 
-    private function getVarName($sVar) {
+    private function getVarName($sVar) 
+    {
         return 'a' . bx_gen_method_name($sVar);
     }
 
-    private function getDefineName() {
+    private function getDefineName() 
+    {
         $aArgs = func_get_args();
         return 'BX_' . strtoupper(implode('_', $aArgs));
     }
 }
 
 /** @} */
+

+ 21 - 18
inc/classes/BxDolCron.php

@@ -1,10 +1,11 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 /**
  * BxDolCron is parent class for all Dolphin cron jobs, except the cases when the code is evaluated directly.
@@ -17,7 +18,7 @@ defined('BX_DOL') or die('hack attempt');
  *  name - job name to be executed
  *  time - format of entries are five fields of numbers specifying the minute,
  *              hour, day of the month, month and day of the week that a task must be executed.
- * \code
+ * @code
  *              * * * * *
  *              | | | | |
  *              | | | | +--- day of week(0-6 with 0=Sunday)
@@ -25,7 +26,7 @@ defined('BX_DOL') or die('hack attempt');
  *              | | +------- day of month(1-31)
  *              | +--------- hour(0-23)
  *              +----------- minute(0-59)
- * \endcode
+ * @endcode
  *
  *  class - class name which will run
  *  file - path to class file
@@ -36,7 +37,7 @@ defined('BX_DOL') or die('hack attempt');
  * valid numbers in that field, so it translates to "always". If a given time is valid in all five
  * fields then a module function is executed. Here are a few examples that illustrate the possibilities:
  *
- * \code
+ * @code
  *  will run at 16:10:
  *  10 16
  *  will run at 2:00 on saturday:
@@ -49,13 +50,13 @@ defined('BX_DOL') or die('hack attempt');
  *  0 22 * * 1-5
  *  will run each 23 minutes, 2:00, 4:00 ..., everyday
  *  23 0-23/2
- * \endcode
+ * @endcode
  *
  * Example add new cron job:
  *
  * 1. Create new class inherited from "BxDolCron" and add method "processing"
  *
- * \code
+ * @code
  *      class BxDolCronMy extends BxDolCron {
  *
  *          function processing()
@@ -63,11 +64,11 @@ defined('BX_DOL') or die('hack attempt');
  *              // insert code
  *          }
  *      }
- * \endcode
+ * @endcode
  *
  * 2. Add record in `sys_cron_jobs` table
  *
- * @see an example of BxDolCronNotifies, BxDolCronCupid, BxDolCronCmd.
+ * @see an example of BxDolCronCmd, BxDolCronStorage.
  *
  *
  * Memberships/ACL:
@@ -78,13 +79,15 @@ defined('BX_DOL') or die('hack attempt');
  * no alerts available
  *
  */
-class BxDolCron extends BxDol {
-
-    function BxDolCron(){
-        parent::BxDol();
+class BxDolCron extends BxDol 
+{
+    public function __construct()
+    {
+        parent::__construct();
     }
 
-    function processing() {
-    }
+    public function processing() {}
 }
 
+/** @} */
+

+ 18 - 16
inc/classes/BxDolCronCmd.php

@@ -1,29 +1,27 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 // TODO: make alert for database pruning
-// TODO: move some functionality to modules, like banners, etc
-// TODO: remove command line options
 // TODO: db funtions 2 class function + prepare statements
 // TODO: other refactoring
 
 bx_import('BxDolCron');
 
-class BxDolCronCmd extends BxDolCron {
-
-    // - Functions -
-
-    function finish() {
+class BxDolCronCmd extends BxDolCron 
+{
+    protected function finish() 
+    {
         if ($output = ob_get_clean())
             sendMail(getParam('site_email'), getParam('site_title') . ": Periodic Report", $output, 0, array(), BX_EMAIL_NOTIFY, 'text'); // TODO: email template
     }
 
-    function clean_database()
+    protected function clean_database()
     {
         $oDb = BxDolDb::getInstance();
 
@@ -71,7 +69,8 @@ class BxDolCronCmd extends BxDolCron {
         echo "Deleted expired keys: $iDeletedKeys\n";
     }
 
-    function del_old_all_files() {
+    protected function del_old_all_files() 
+    {
         $num_tmp = 0;
         $num_del = 0;
 
@@ -108,8 +107,8 @@ class BxDolCronCmd extends BxDolCron {
         echo "Deleted temp files: $num_del\n";
     }
 
-    function processing() {
-
+    public function processing()    
+    {
         set_time_limit(0);
         ignore_user_abort();
 
@@ -132,3 +131,6 @@ class BxDolCronCmd extends BxDolCron {
         $this->finish();
     }
 }
+
+/** @} */
+

+ 0 - 59
inc/classes/BxDolCronNotifies.php

@@ -1,59 +0,0 @@
-<?php
-// TODO: move massmaler to separate module
-
-/***************************************************************************
-*                            Dolphin Smart Community Builder
-*                              -------------------
-*     begin                : Mon Mar 23 2006
-*     copyright            : (C) 2007 BoonEx Group
-*     website              : http://www.boonex.com
-* This file is part of Dolphin - Smart Community Builder
-*
-* Dolphin is free software; you can redistribute it and/or modify it under
-* the terms of the GNU General Public License as published by the
-* Free Software Foundation; either version 2 of the
-* License, or  any later version.
-*
-* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
-* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-* See the GNU General Public License for more details.
-* You should have received a copy of the GNU General Public License along with Dolphin,
-* see license.txt file; if not, write to marketing@boonex.com
-***************************************************************************/
-
-require_once('BxDolCron.php');
-
-class BxDolCronNotifies extends BxDolCron {
-    function processing() {
-        set_time_limit( 36000 );
-        ignore_user_abort();
-
-        $sResult = "";
-        $iPerStart = (int)trim(getParam('msgs_per_start'));
-
-        $iFullCount = (int)$GLOBALS['MySQL']->getOne('SELECT COUNT(*) FROM `sys_sbs_queue`');
-        if($iFullCount) {
-            $iProcess = $iFullCount < $iPerStart ? $iFullCount : $iPerStart;
-
-            $sResult .= "\n- Start email send -\n";
-            $sResult .= "Total queued emails: " . $iFullCount . "\n";
-            $sResult .= "Ready for send: " . $iProcess . "\n";
-
-            $aMails = $GLOBALS['MySQL']->getAll("SELECT `id`, `email`, `subject`, `body` FROM `sys_sbs_queue` ORDER BY `id` LIMIT 0, " . $iProcess);
-
-            $iSent = 0;
-            $aIds = array();
-            foreach($aMails as $aMail) {
-                $aIds[] = $aMail['id'];
-                if(sendMail($aMail['email'], $aMail['subject'], $aMail['body'], 0, array(), BX_EMAIL_MASS))
-                    $iSent++;
-                else
-                    $sResult .= "Cannot send message to " . $aMail['email'] . "\n";
-            }
-            $GLOBALS['MySQL']->query("DELETE FROM `sys_sbs_queue` WHERE `id` IN ('" . implode("','", $aIds) . "')");
-
-            $sResult .= "Processed emails: " . $iSent . "\n";
-            sendMail(getParam('site_email'), getParam('site_title') . ": Periodic Report", $sResult, 0, array(), BX_EMAIL_NOTIFY, 'text'); // TODO: email template
-        }
-    }
-}

+ 1 - 1
inc/classes/BxDolCronStorage.php

@@ -11,7 +11,7 @@ bx_import('BxDolCron');
 
 class BxDolCronStorage extends BxDolCron 
 {
-    function processing() 
+    public function processing() 
     {
         set_time_limit(36000);
         ignore_user_abort();

+ 1 - 1
inc/classes/BxDolEmailTemplates.php

@@ -70,7 +70,7 @@ class BxDolEmailTemplates extends BxDol implements iBxDolSingleton {
         if (isset($GLOBALS['bxDolClasses'][get_class($this)]))
             trigger_error ('Multiple instances are not allowed for the class: ' . get_class($this), E_USER_ERROR);
 
-        parent::BxDol();
+        parent::__construct();
 
         $oLang = BxDolLanguages::getInstance();
         $this->iDefaultLangId = $oLang->getCurrentLangId();

+ 0 - 4
inc/classes/BxDolEmailTemplatesQuery.php

@@ -15,10 +15,6 @@ bx_import('BxDolDb');
  */
 class BxDolEmailTemplatesQuery extends BxDolDb {
 
-    public function __construct() {
-        parent::__construct();
-    }
-
     public function getTemplate ($sTemplateName, $iLangAccount, $iLangDefault, $iLangFallback) {
 
         // get email templates keys

+ 0 - 20
inc/js/functions.js

@@ -136,26 +136,6 @@ function _t(s, arg0, arg1, arg2) {
     return cs;
 }
 
-
-function showPopupLoginForm() {
-    var oPopupOptions = {};
-
-    if ($('#login_div').length)
-        $('#login_div').dolPopup(oPopupOptions);
-    else {
-        $('<div id="login_div" style="visibility: none;"></div>').prependTo('body').load(
-            sUrlRoot + 'member.php',
-            {
-                action: 'show_login_form',
-                relocate: String(window.location)
-            },
-            function() {
-                $(this).dolPopup(oPopupOptions);
-            }
-        );
-    }
-}
-
 function showPopupAnyHtml(sUrl, sId) {
 
     var oPopupOptions = {};

+ 0 - 0
inc/js/common_anim.js → inc/js/jquery.anim.js


+ 0 - 1
install/sql/system.sql

@@ -985,7 +985,6 @@ CREATE TABLE `sys_cron_jobs` (
 
 INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `service_call`) VALUES
 ('cmd', '0 0 * * *', 'BxDolCronCmd', 'inc/classes/BxDolCronCmd.php', ''),
-('notifies', '*/10 * * * *', 'BxDolCronNotifies', 'inc/classes/BxDolCronNotifies.php', ''),
 ('sys_storage', '* * * * *', 'BxDolCronStorage', 'inc/classes/BxDolCronStorage.php', '');
 
 -- --------------------------------------------------------

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -27,7 +27,7 @@ class BxTimelineTemplate extends BxDolModuleTemplate
 	public function getCssJs()
     {
     	$this->addCss(array('plugins/jquery/themes/|jquery-ui.css', 'view.css', 'view-media-tablet.css', 'view-media-desktop.css', 'post.css', 'share.css'));
-        $this->addJs(array('jquery.ui.all.min.js', 'jquery.form.js', 'jquery.resize.js', 'plugins/|masonry.pkgd.min.js', 'common_anim.js', 'main.js', 'view.js', 'post.js', 'share.js'));
+        $this->addJs(array('jquery.ui.all.min.js', 'jquery.form.js', 'jquery.resize.js', 'plugins/|masonry.pkgd.min.js', 'jquery.anim.js', 'main.js', 'view.js', 'post.js', 'share.js'));
     }
 
     public function getJsCode($sType, $aRequestParams = array(), $bWrap = true)

+ 12 - 9
modules/boonex/uni/data/template/system/scripts/BxTemplCmts.php

@@ -1,20 +1,23 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxBaseCmts');
 
 /**
  * @see BxDolCmts
  */
-class BxTemplCmts extends BxBaseCmts {
-
-    function BxTemplCmts( $sSystem, $iId, $iInit = 1 ) {
-        BxBaseCmts::BxBaseCmts( $sSystem, $iId, $iInit );
+class BxTemplCmts extends BxBaseCmts 
+{
+    function __construct($sSystem, $iId, $iInit = 1) 
+    {
+        parent::__construct($sSystem, $iId, $iInit);
     }
 }
 
+/** @} */

+ 0 - 0
inc/js/jquery.autoresize.js → plugins/jquery/jquery.autoresize.js


+ 0 - 0
inc/js/jquery.cookie.js → plugins/jquery/jquery.cookie.js


+ 0 - 0
inc/js/jquery.easing.js → plugins/jquery/jquery.easing.js


+ 2 - 2
studio/template/scripts/BxBaseStudioDesigns.php

@@ -21,7 +21,7 @@ class BxBaseStudioDesigns extends BxDolStudioDesigns {
         return array('designs.css');
     }
     function getJs() {
-        return array('common_anim.js', 'page.js', 'designs.js');
+        return array('jquery.anim.js', 'page.js', 'designs.js');
     }
 }
-/** @} */
+/** @} */

+ 2 - 2
studio/template/scripts/BxBaseStudioLanguages.php

@@ -20,7 +20,7 @@ class BxBaseStudioLanguages extends BxDolStudioLanguages {
         return array('languages.css');
     }
     function getJs() {
-        return array('common_anim.js', 'page.js', 'languages.js');
+        return array('jquery.anim.js', 'page.js', 'languages.js');
     }
 }
-/** @} */
+/** @} */

+ 2 - 2
studio/template/scripts/BxBaseStudioModules.php

@@ -20,7 +20,7 @@ class BxBaseStudioModules extends BxDolStudioModules {
         return array('modules.css');
     }
     function getJs() {
-        return array('common_anim.js', 'page.js', 'modules.js');
+        return array('jquery.anim.js', 'page.js', 'modules.js');
     }
     function getJsCode() {
         return BxDolStudioTemplate::getInstance()->parseHtmlByName($this->sTemplPrefix . '_js.html', array(
@@ -39,4 +39,4 @@ class BxBaseStudioModules extends BxDolStudioModules {
         );
     }
 }
-/** @} */
+/** @} */

+ 1 - 1
studio/template/scripts/BxBaseStudioPage.php

@@ -32,7 +32,7 @@ class BxBaseStudioPage extends BxDolStudioPage {
     }
 
     function getPageJs() {
-        return array('common_anim.js', 'page.js');
+        return array('jquery.anim.js', 'page.js');
     }
 
     function getPageJsClass() {

+ 18 - 11
template/scripts/BxBaseCmts.php

@@ -1,10 +1,11 @@
-<?php
+<?php defined('BX_DOL') or die('hack attempt');
 /**
- * @package     Dolphin Core
- * @copyright   Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * @license     CC-BY - http://creativecommons.org/licenses/by/3.0/
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinCore Dolphin Core
+ * @{
  */
-defined('BX_DOL') or die('hack attempt');
 
 bx_import('BxDolCmts');
 bx_import('BxDolProfile');
@@ -13,13 +14,15 @@ bx_import('BxTemplPaginate');
 /**
  * @see BxDolCmts
  */
-class BxBaseCmts extends BxDolCmts {
+class BxBaseCmts extends BxDolCmts 
+{
 	protected $_sJsObjName;
     protected $_sStylePrefix;
 
-    function BxBaseCmts( $sSystem, $iId, $iInit = 1 ) {
-        BxDolCmts::BxDolCmts( $sSystem, $iId, $iInit );
-        if(empty($sSystem))
+    function __construct( $sSystem, $iId, $iInit = 1 ) 
+    {
+        parent::__construct( $sSystem, $iId, $iInit );
+        if (empty($sSystem))
             return;
 
         $this->_sJsObjName = 'oCmts' . bx_gen_method_name($sSystem, array('_' , '-')) . $iId;
@@ -36,7 +39,7 @@ class BxBaseCmts extends BxDolCmts {
     	$oTemplate = BxDolTemplate::getInstance();
 
         $oTemplate->addCss(array('cmts.css'));
-        $oTemplate->addJs(array('common_anim.js', 'jquery.form.js', 'BxDolCmts.js'));
+        $oTemplate->addJs(array('jquery.anim.js', 'jquery.form.js', 'BxDolCmts.js'));
 
         bx_import('BxDolForm');
         $oForm = BxDolForm::getObjectInstance($this->_sFormObject, $this->_sFormDisplayPost);
@@ -73,7 +76,8 @@ class BxBaseCmts extends BxDolCmts {
     /**
      * get full comments block with initializations
      */
-    function getCommentsBlock($iParentId = 0, $iVParentId = 0, $bInDesignbox = true) {
+    function getCommentsBlock($iParentId = 0, $iVParentId = 0, $bInDesignbox = true) 
+    {
     	$aBp = array('parent_id' => $iParentId, 'vparent_id' => $iVParentId);
 
     	$sCmts = $this->getComments($aBp);
@@ -710,3 +714,6 @@ class BxBaseCmts extends BxDolCmts {
         echo $s;
     }
 }
+
+/** @} */
+