plugins/admin/ThemeManager.php
changeset 471 7906fb190fc1
parent 465 fe8b8c9b54e8
child 477 c4d6e9b3b964
equal deleted inserted replaced
470:a044ad834691 471:7906fb190fc1
    22     echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
    22     echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>';
    23     echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
    23     echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>';
    24     return;
    24     return;
    25   }
    25   }
    26   
    26   
    27   $system_themes = array('admin', 'printable');
    27   $system_themes =& $template->system_themes;
    28   
    28   
    29   // Obtain the list of themes (both available and already installed) and the styles available for each
    29   // Obtain the list of themes (both available and already installed) and the styles available for each
    30   $dh = @opendir(ENANO_ROOT . '/themes');
    30   $dh = @opendir(ENANO_ROOT . '/themes');
    31   if ( !$dh )
    31   if ( !$dh )
    32     die('Couldn\'t open themes directory');
    32     die('Couldn\'t open themes directory');
   308                         ' ' . $lang->get('acptm_warn_access_with_default') . ' ' :
   308                         ' ' . $lang->get('acptm_warn_access_with_default') . ' ' :
   309                         ' ';
   309                         ' ';
   310       if ( $enable == 0 && ( $theme_default === $theme_data['theme_id'] || $theme_data['make_default'] ) )
   310       if ( $enable == 0 && ( $theme_default === $theme_data['theme_id'] || $theme_data['make_default'] ) )
   311       {
   311       {
   312         $enable = '1';
   312         $enable = '1';
   313         $warn_default .= $lang->get('acptm_warn_cant_disable_default');
   313         $warn_default .= '<b>' . $lang->get('acptm_warn_cant_disable_default') . '</b>';
   314       }
   314       }
   315       
   315       
   316       // We're good. Update the theme...
   316       // We're good. Update the theme...
   317       $q = $db->sql_query('UPDATE ' . table_prefix . 'themes SET
   317       $q = $db->sql_query('UPDATE ' . table_prefix . 'themes SET
   318                                theme_name = \'' . $db->escape($theme_data['theme_name']) . '\',
   318                                theme_name = \'' . $db->escape($theme_data['theme_name']) . '\',