Changeset 2038 for trunk


Ignore:
Timestamp:
Jun 21, 2007, 10:49:45 PM (17 years ago)
Author:
rub
Message:

Resolved issue 0000708: Error on synchronization

Resolved issue 0000709: Error with $confdefault_admin_layout

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/site_update.php

    r1903 r2038  
    55// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    7 // | branch        : BSF (Best So Far)
    8 // | file          : $RCSfile$
     7// | file          : $Id$
    98// | last update   : $Date$
    109// | last modifier : $Author$
     
    128127// +-----------------------------------------------------------------------+
    129128if (isset($_POST['submit'])
    130     and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files')
    131     and !$general_failure)
     129    and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files'))
    132130{
    133131  $counts['new_categories'] = 0;
     
    136134  $counts['new_elements'] = 0;
    137135  $counts['upd_elements'] = 0;
    138 
     136}
     137
     138
     139if (isset($_POST['submit'])
     140    and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files')
     141    and !$general_failure)
     142{
    139143  $start = get_moment();
    140144  // which categories to update ?
  • trunk/include/common.inc.php

    r2030 r2038  
    171171
    172172// template instance
    173 $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme'] );
     173if
     174  (
     175      defined('IN_ADMIN') and IN_ADMIN and
     176      isset($user['admin_template']) and
     177      isset($user['admin_theme'])
     178  )
     179{
     180  // Admin template
     181  $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['admin_template'], $user['admin_theme'] );
     182}
     183else
     184{
     185  // Classic template
     186  $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme'] );
     187}
    174188
    175189if ($conf['gallery_locked'])
  • trunk/include/functions_user.inc.php

    r2032 r2038  
    146146{
    147147  global $conf;
     148
    148149  $user['id'] = $user_id;
    149150  $user = array_merge( $user, getuserdata($user_id, $use_cache) );
     
    152153  $user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page'];
    153154
    154   // include template/theme configuration
    155   if (defined('IN_ADMIN') and IN_ADMIN)
    156   {
    157     list($user['template'], $user['theme']) =
     155  list($user['template'], $user['theme']) = explode('/', $user['template']);
     156
     157  if (is_admin($user['status']))
     158  {
     159    list($user['admin_template'], $user['admin_theme']) =
    158160      explode
    159161      (
     
    162164                                             : $user['template']
    163165      );
    164     // TODO : replace $conf['admin_layout'] by $user['admin_layout']
    165   }
    166   else
    167   {
    168     list($user['template'], $user['theme']) = explode('/', $user['template']);
    169166  }
    170167
Note: See TracChangeset for help on using the changeset viewer.