Changeset 2040


Ignore:
Timestamp:
Jun 21, 2007, 11:00:09 PM (17 years ago)
Author:
rub
Message:

Resolved issue 0000708: Error on synchronization

Resolved issue 0000709: Error with $confdefault_admin_layout

Merge BSF 2037:2039 into branch-1_7

Location:
branches/branch-1_7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_7/admin/site_update.php

    r1903 r2040  
    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 ?
  • branches/branch-1_7/include/common.inc.php

    r2031 r2040  
    172172
    173173// template instance
    174 $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme'] );
     174if
     175  (
     176      defined('IN_ADMIN') and IN_ADMIN and
     177      isset($user['admin_template']) and
     178      isset($user['admin_theme'])
     179  )
     180{
     181  // Admin template
     182  $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['admin_template'], $user['admin_theme'] );
     183}
     184else
     185{
     186  // Classic template
     187  $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme'] );
     188}
    175189
    176190if ($conf['gallery_locked'])
  • branches/branch-1_7/include/functions_user.inc.php

    r1986 r2040  
    145145{
    146146  global $conf;
     147
    147148  $user['id'] = $user_id;
    148149  $user = array_merge( $user, getuserdata($user_id, $use_cache) );
     
    153154  $user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page'];
    154155
    155   // include template/theme configuration
    156   if (defined('IN_ADMIN') and IN_ADMIN)
    157   {
    158     list($user['template'], $user['theme']) =
     156  if (is_admin($user['status']))
     157  {
     158    list($user['admin_template'], $user['admin_theme']) =
    159159      explode
    160160      (
     
    163163                                             : $user['template']
    164164      );
    165     // TODO : replace $conf['admin_layout'] by $user['admin_layout']
    166   }
    167   else
    168   {
    169     list($user['template'], $user['theme']) = explode('/', $user['template']);
    170   }
     165  }
     166
     167  list($user['template'], $user['theme']) = explode('/', $user['template']);
    171168
    172169  return $user;
Note: See TracChangeset for help on using the changeset viewer.