HomeHelpTrac

Changeset 8251 for trunk/periodic


Ignore:
Timestamp:
01/05/09 22:59:11 (3 years ago)
Author:
Anton Lesnikov
Message:
  1. Chat module added, removed an old one.
  2. Removed an old modules mechanism.
  3. Request and Service classes for module engine.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/periodic/cmd.php

    r7387 r8251  
    2323require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); 
    2424require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' ); 
    25 require_once( BX_DIRECTORY_PATH_INC . 'modules.inc.php' ); 
    2625require_once( BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php' ); 
    2726 
     
    147146} 
    148147 
    149  
    150  
    151 function modules_proceed() 
    152 { 
    153     // select all profiles and check who can't use chat or forum 
    154     $p_res = db_res( "SELECT `ID` FROM `Profiles`"); 
    155     while ( $p_arr = mysql_fetch_array($p_res) ) 
    156     { 
    157         $check_res = checkAction($p_arr['ID'], ACTION_ID_USE_CHAT); 
    158         if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED ) 
    159         { 
    160             modules_block($p_arr['ID'], 'chat'); 
    161         } 
    162         else  
    163         { 
    164             modules_unblock($p_arr['ID'], 'chat'); 
    165         } 
    166          
    167         $check_res = checkAction($p_arr['ID'], ACTION_ID_USE_FORUM); 
    168         if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED ) 
    169         { 
    170             modules_block($p_arr['ID'], 'forum'); 
    171         } 
    172         else  
    173         { 
    174             modules_unblock($p_arr['ID'], 'forum'); 
    175         }        
    176     } 
    177  
    178     echo "\n- Modules check -\n"; 
    179     echo "Profiles processed successfully\n"; 
    180 } 
    181  
    182148// ------------- 
    183149 
     
    247213        if ( $current_membership_arr['ID'] != $last_membership_arr['ID'] ) 
    248214        { 
    249             modules_update($row['ID']); // Handle membership level change 
    250215            if ($further_membership_arr['ID'] == MEMBERSHIP_ID_STANDARD)         
    251216            { 
     
    289254clean_database(); 
    290255 
    291 modules_proceed(); 
    292  
    293256finish(); 
    294257 
Note: See TracChangeset for help on using the changeset viewer.