HomeHelpTrac

Changeset 15751 for trunk/inc


Ignore:
Timestamp:
12/12/11 22:16:28 (6 months ago)
Author:
Anton Lesnikov
Message:
  1. Modules/Store? Installer improvements and updates
  2. Related changes in Articles module.
Location:
trunk/inc/classes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/classes/BxDolModuleConfig.php

    r15336 r15751  
    8181        return $this->_sDbPrefix; 
    8282    } 
     83    function getDirectory() { 
     84        return $this->_sDirectory; 
     85    } 
    8386    function getHomePath() { 
    8487        return $this->_sHomePath; 
  • trunk/inc/classes/BxDolModuleQuery.php

    r15722 r15751  
    3535    } 
    3636    function getModuleById($iId) { 
    37         $sSql = $this->prepare("SELECT `id`, `title`, `vendor`, `version`, `product_url`, `update_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `date`, `enabled` FROM `sys_modules` WHERE `id`=? LIMIT 1", $iId); 
     37        $sSql = $this->prepare("SELECT `id`, `name`, `title`, `vendor`, `version`, `product_url`, `update_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `date`, `enabled` FROM `sys_modules` WHERE `id`=? LIMIT 1", $iId); 
    3838        return $this->fromMemory('sys_modules_' . $iId, 'getRow', $sSql); 
    3939    } 
     40    function getModuleByName($sName) { 
     41        $sSql = $this->prepare("SELECT `id`, `name`, `title`, `vendor`, `version`, `product_url`, `update_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `date`, `enabled` FROM `sys_modules` WHERE `name`=? LIMIT 1", $sName); 
     42        return $this->fromMemory('sys_modules_' . $sName, 'getRow', $sSql); 
     43    } 
    4044    function getModuleByUri($sUri) { 
    41         $sSql = $this->prepare("SELECT `id`, `title`, `vendor`, `version`, `product_url`, `update_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `date`, `enabled` FROM `sys_modules` WHERE `uri`=? LIMIT 1", $sUri); 
     45        $sSql = $this->prepare("SELECT `id`, `name`, `title`, `vendor`, `version`, `product_url`, `update_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `date`, `enabled` FROM `sys_modules` WHERE `uri`=? LIMIT 1", $sUri); 
    4246        return $this->fromMemory('sys_modules_' . $sUri, 'getRow', $sSql); 
    4347    } 
     
    5256    function isModule($sUri) { 
    5357        $sSql = $this->prepare("SELECT `id` FROM `sys_modules` WHERE `uri`=? LIMIT 1", $sUri); 
     58        return (int)$this->getOne($sSql) > 0; 
     59    } 
     60    function isModuleByName($sName) { 
     61        $sSql = $this->prepare("SELECT `id` FROM `sys_modules` WHERE `name`=? LIMIT 1", $sName); 
    5462        return (int)$this->getOne($sSql) > 0; 
    5563    } 
     
    8189        } 
    8290 
    83         $sSql = "SELECT `id`, `type`, `title`, `vendor`, `version`, `product_url`, `update_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `date`, `enabled` FROM `sys_modules` WHERE 1" . $sWhereClause . " ORDER BY `title`"; 
     91        $sSql = "SELECT  
     92                `id`, 
     93                IF(`vendor`='BoonEx', CONCAT('bx_', `uri`), `uri`) AS `name`, 
     94                `type`,  
     95                `title`,  
     96                `vendor`,  
     97                `version`,  
     98                `product_url`,  
     99                `update_url`,  
     100                `path`,  
     101                `uri`,  
     102                `class_prefix`,  
     103                `db_prefix`,  
     104                `lang_category`,  
     105                `date`,  
     106                `enabled`  
     107            FROM `sys_modules`  
     108            WHERE 1" . $sWhereClause . "  
     109            ORDER BY `title`"; 
    84110        return $this->fromMemory('sys_modules' . $sPostfix, 'getAll', $sSql); 
    85111    } 
  • trunk/inc/classes/BxDolTextData.php

    r15211 r15751  
    3434bx_import('BxDolForm'); 
    3535bx_import('BxDolPrivacy'); 
    36 bx_import('BxDolCategories'); 
     36//bx_import('BxDolCategories'); 
    3737bx_import('BxTemplFormView'); 
    38 bx_import('BxDolCategories'); 
    3938 
    4039class BxDolTextData { 
     
    5049 
    5150        $this->_iOwnerId = BxDolTextData::getAuthorId(); 
    52         $oCategories = new BxDolCategories(); 
    53         $oCategories->getTagObjectConfig(); 
     51        //$oCategories = new BxDolCategories(); 
     52        //$oCategories->getTagObjectConfig(); 
    5453 
    5554        $this->_aForm = array( 
     
    156155                    ), 
    157156                ), 
    158                 'categories' => $oCategories->getGroupChooser ('bx_' . $this->_sSystem, $this->_iOwnerId, true), 
     157                //'categories' => $oCategories->getGroupChooser ('bx_' . $this->_sSystem, $this->_iOwnerId, true), 
    159158                'allow_comment_to' => array(), 
    160159                'allow_vote_to' => array(), 
  • trunk/inc/classes/BxDolTextDb.php

    r15287 r15751  
    2424***************************************************************************/ 
    2525 
    26 bx_import('BxDolModuleQuery'); 
     26bx_import('BxDolModuleDb'); 
    2727 
    28 class BxDolTextDb extends BxDolModuleQuery { 
     28class BxDolTextDb extends BxDolModuleDb { 
    2929    var $_oConfig; 
    3030 
    3131    function BxDolTextDb(&$oConfig) { 
    32         parent::BxDolModuleQuery(); 
     32        parent::__construct($oConfig); 
    3333 
    3434        $this->_oConfig = &$oConfig; 
  • trunk/inc/classes/BxDolTextModule.php

    r15585 r15751  
    2828bx_import('BxDolModule'); 
    2929bx_import('BxDolPaginate'); 
    30 bx_import('BxDolCategories'); 
     30//bx_import('BxDolCategories'); 
    3131bx_import('BxDolRssFactory'); 
    3232bx_import('BxDolSubscription'); 
    33 bx_import('BxDolAdminSettings'); 
    34 bx_import('BxTemplTagsModule'); 
    35 bx_import('BxTemplCategoriesModule'); 
     33//bx_import('BxTemplTagsModule'); 
     34//bx_import('BxTemplCategoriesModule'); 
    3635 
    3736require_once(BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php'); 
  • trunk/inc/classes/BxDolTextTemplate.php

    r15260 r15751  
    4343        $this->_oModule = $oModule; 
    4444 
     45        /* 
    4546        $this->oPaginate = new BxDolPaginate(array( 
    4647            'page_url' => 'javascript:void(0);', 
     
    5152            'on_change_page' => $this->_oConfig->getJsObject() . '.changePage({start}, {per_page})' 
    5253        )); 
     54        */ 
    5355    } 
    5456    function displayAdminBlock($aParams) { 
Note: See TracChangeset for help on using the changeset viewer.