Changeset 8251 for trunk/periodic
- Timestamp:
- 01/05/09 22:59:11 (3 years ago)
- File:
-
- 1 edited
-
trunk/periodic/cmd.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/periodic/cmd.php
r7387 r8251 23 23 require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); 24 24 require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' ); 25 require_once( BX_DIRECTORY_PATH_INC . 'modules.inc.php' );26 25 require_once( BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php' ); 27 26 … … 147 146 } 148 147 149 150 151 function modules_proceed()152 {153 // select all profiles and check who can't use chat or forum154 $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 else163 {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 else173 {174 modules_unblock($p_arr['ID'], 'forum');175 }176 }177 178 echo "\n- Modules check -\n";179 echo "Profiles processed successfully\n";180 }181 182 148 // ------------- 183 149 … … 247 213 if ( $current_membership_arr['ID'] != $last_membership_arr['ID'] ) 248 214 { 249 modules_update($row['ID']); // Handle membership level change250 215 if ($further_membership_arr['ID'] == MEMBERSHIP_ID_STANDARD) 251 216 { … … 289 254 clean_database(); 290 255 291 modules_proceed();292 293 256 finish(); 294 257
Note: See TracChangeset
for help on using the changeset viewer.