Changeset 2467

Show
Ignore:
Timestamp:
09/09/06 09:35:17 (5 months ago)
Author:
demian
Message:

added hooks for debug block

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.6-bugfix/CHANGELOG.txt

    r2461 r2467  
    1717 
    1818IMPROVEMENTS 
     1909-09-06    Add abililty to include a debug block in development rebuilds 
    192006-09-06    Added Comment module, can be used with all existing modules 
    202105-08-06    Added getCurrentUrl() to Output object so <a href="{getCurrentUrl()}">foo</a> 
  • branches/0.6-bugfix/etc/default.conf.dist.ini

    r2341 r2467  
    7171emailAdminThreshold     = 'PEAR_LOG_EMERG' 
    7272showBugReporterLink     = true 
     73enableDebugBlock        = false 
    7374showUntranslated        = true 
    7475dataObject              = 0 
  • branches/0.6-bugfix/lib/SGL/Task/Install.php

    r2425 r2467  
    781781} 
    782782 
     783/** 
     784 * @package Task 
     785 */ 
     786class SGL_Task_EnableDebugBlock extends SGL_Task 
     787{ 
     788    function run($data) 
     789    { 
     790        require_once SGL_MOD_DIR . '/block/classes/BlockDAO.php'; 
     791        $da = & BlockDAO::singleton(); 
     792        if (!empty($da->conf['debug']['enableDebugBlock'])) { 
     793            $oBlock = new stdClass(); 
     794            $oBlock->name = 'Default_Block_Debug'; 
     795            $oBlock->title = 'Debug Block'; 
     796            $oBlock->is_enabled = 1; 
     797            $oBlock->position = 'Left'; 
     798            $oBlock->sections = array(0); // all 
     799            $oBlock->roles = array(SGL_ADMIN); 
     800            $ok = $da->addBlock($oBlock); 
     801        } 
     802    } 
     803} 
     804 
    783805 
    784806/** 
  • branches/0.6-bugfix/modules/default/classes/MaintenanceMgr.php

    r2425 r2467  
    211211        $runner->addTask(new SGL_Task_CreateAdminUser()); 
    212212        $runner->addTask(new SGL_Task_CreateMemberUser()); 
     213        $runner->addTask(new SGL_Task_EnableDebugBlock()); 
    213214        $runner->addTask(new SGL_Task_InstallerCleanup()); 
    214215 
  • branches/0.6-bugfix/modules/default/lang/english-iso-8859-15.php

    r2309 r2467  
    236236        'Enable custom error handler'=>'Enable custom error handler', 
    237237        'Enable debug session'=>'Enable debug session', 
     238        'Enable debug block'=>'Enable debug block - [USE WITH CAUTION!]', 
     239        'Your database can be dropped if this block is enabled'=>'Your database can be dropped if this block is enabled, use for development purposes only', 
    238240        'Production website'=>'Production website', 
    239241        'Show backtrace'=>'Show backtrace', 
  • branches/0.6-bugfix/modules/default/templates/admin_configEdit.html

    r2362 r2467  
    286286            </p> 
    287287            <p> 
     288                <label class="tipOwner" for="conf[debug][enableDebugBlock]">{translate(#Enable debug block#)} 
     289                <span class="tipText">{translate(#Your database can be dropped if this block is enabled#)}</span> 
     290                </label> 
     291                {generateRadioPair(#conf[debug][enableDebugBlock]#,conf[debug][enableDebugBlock]):h} 
     292            </p> 
     293            <p> 
    288294                <label class="tipOwner" for="conf[debug][production]">{translate(#Production website#)} 
    289295                <span class="tipText">{translate(#Setting this to true will disable all screen-based error messages#)}</span>