upgrade.php
changeset 290 1201c9412cb6
parent 289 2b60c89dc27f
child 297 ee1fc84f12a8
equal deleted inserted replaced
289:2b60c89dc27f 290:1201c9412cb6
    90 $this_version   = '1.0.2';
    90 $this_version   = '1.0.2';
    91 $func_list = Array(
    91 $func_list = Array(
    92     '1.0' => Array('u_1_0_1_update_del_votes'),
    92     '1.0' => Array('u_1_0_1_update_del_votes'),
    93     '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text'), // ,
    93     '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text'), // ,
    94     // '1.0RC2' => Array('u_1_0_populate_userpage_comments')
    94     // '1.0RC2' => Array('u_1_0_populate_userpage_comments')
    95     '1.0RC3' => Array('u_1_0_RC3_make_users_extra')
    95     '1.0RC3' => Array('u_1_0_RC3_make_users_extra'),
       
    96     '1.0.2b1' => Array('u_1_0_2_nuke_template_cache')
    96   );
    97   );
    97 
    98 
    98 if(!isset($_GET['mode'])) 
    99 if(!isset($_GET['mode'])) 
    99 {
   100 {
   100   $_GET['mode'] = 'login';
   101   $_GET['mode'] = 'login';
   436     return false;
   437     return false;
   437   $sql = "INSERT INTO " . table_prefix . "users_extra(user_id) VALUES$ids;";
   438   $sql = "INSERT INTO " . table_prefix . "users_extra(user_id) VALUES$ids;";
   438   
   439   
   439   if ( !$db->sql_query($sql) )
   440   if ( !$db->sql_query($sql) )
   440     $db->_die();
   441     $db->_die();
       
   442 }
       
   443 
       
   444 function u_1_0_2_nuke_template_cache()
       
   445 {
       
   446   $dir = @opendir(ENANO_ROOT . '/cache');
       
   447   if ( !$dir )
       
   448   {
       
   449     return false;
       
   450   }
       
   451   while ( ($fname = @readdir($dir)) )
       
   452   {
       
   453     if ( preg_match('/\.tpl\.php$/', $fname) )
       
   454     {
       
   455       unlink( ENANO_ROOT . '/cache/' . $fname );
       
   456     }
       
   457   }
   441 }
   458 }
   442 
   459 
   443 switch($_GET['mode'])
   460 switch($_GET['mode'])
   444 {
   461 {
   445   case "login":
   462   case "login":