Changeset 13258


Ignore:
Timestamp:
Feb 19, 2012, 8:59:22 PM (12 years ago)
Author:
plg
Message:

convert tabulations into 2-spaces for indentation (introduced in r13240)

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r13240 r13258  
    256256    or ( !empty($_POST) and in_array($page['page'],
    257257        array(
    258                                         'photo',
    259                                         'album',        // public/private; lock/unlock, permissions
     258          'photo',
     259          'album',        // public/private; lock/unlock, permissions
    260260          'batch_manager',  // associate/dissociate; delete; set level
    261261          'user_list',    // group assoc; user level
  • trunk/admin/derivatives.php

    r13240 r13258  
    5353      continue;
    5454
    55                 if ($type==IMG_THUMB)
    56                 {
    57                         $w = intval($pderivative['w']);
    58                         if ($w<=0)
    59                         {
    60                                 $errors[$type]['w'] = '>0';
    61                         }
    62                         $h = intval($pderivative['h']);
    63                         if ($h<=0)
    64                         {
    65                                 $errors[$type]['h'] = '>0';
    66                         }
    67                         if (max($w,$h) <= $prev_w)
    68                         {
    69                                 $errors[$type]['w'] = $errors[$type]['h'] = '>'.$prev_w;
    70                         }
    71                 }
    72                 else
    73                 {
    74                         $v = intval($pderivative['w']);
    75                         if ($v<=0 || $v<=$prev_w)
    76                         {
    77                                 $errors[$type]['w'] = '>'.$prev_w;
    78                         }
    79                         $v = intval($pderivative['h']);
    80                         if ($v<=0 || $v<=$prev_h)
    81                         {
    82                                 $errors[$type]['h'] = '>'.$prev_h;
    83                         }
    84                 }
     55    if ($type==IMG_THUMB)
     56    {
     57      $w = intval($pderivative['w']);
     58      if ($w<=0)
     59      {
     60        $errors[$type]['w'] = '>0';
     61      }
     62      $h = intval($pderivative['h']);
     63      if ($h<=0)
     64      {
     65        $errors[$type]['h'] = '>0';
     66      }
     67      if (max($w,$h) <= $prev_w)
     68      {
     69        $errors[$type]['w'] = $errors[$type]['h'] = '>'.$prev_w;
     70      }
     71    }
     72    else
     73    {
     74      $v = intval($pderivative['w']);
     75      if ($v<=0 || $v<=$prev_w)
     76      {
     77        $errors[$type]['w'] = '>'.$prev_w;
     78      }
     79      $v = intval($pderivative['h']);
     80      if ($v<=0 || $v<=$prev_h)
     81      {
     82        $errors[$type]['h'] = '>'.$prev_h;
     83      }
     84    }
    8585    $v = intval($pderivative['crop']);
    8686    if ($v<0 || $v>100)
  • trunk/include/functions.inc.php

    r13242 r13258  
    891891  global $lang, $conf;
    892892
    893         if ( ($val=@$lang[$key]) == null)
    894         {
    895                 if ($conf['debug_l10n'] and !isset($lang[$key]) and !empty($key))
    896                 {
    897                         trigger_error('[l10n] language key "'.$key.'" is not defined', E_USER_WARNING);
    898                 }
    899                 $val = $key;
    900         }
     893  if ( ($val=@$lang[$key]) == null)
     894  {
     895    if ($conf['debug_l10n'] and !isset($lang[$key]) and !empty($key))
     896    {
     897      trigger_error('[l10n] language key "'.$key.'" is not defined', E_USER_WARNING);
     898    }
     899    $val = $key;
     900  }
    901901  return $val;
    902902}
  • trunk/include/functions_url.inc.php

    r13240 r13258  
    3434  {// TODO - add HERE the possibility to call PWG functions from external scripts
    3535    $root_url = PHPWG_ROOT_PATH;
    36                 if ( strncmp($root_url, './', 2) == 0 )
    37                 {
    38                         return substr($root_url, 2);
    39                 }
    40   }
    41         return $root_url;
     36    if ( strncmp($root_url, './', 2) == 0 )
     37    {
     38      return substr($root_url, 2);
     39    }
     40  }
     41  return $root_url;
    4242}
    4343
     
    301301  global $conf;
    302302  $section_string = '';
    303         $section = @$params['section'];
    304         if (!isset($section))
    305         {
    306                 $section_of = array(
    307                         'category' => 'categories',
    308                         'tags'     => 'tags',
    309                         'list'     => 'list',
    310                         'search'   => 'search',
    311                         );
    312 
    313                 foreach ($section_of as $param => $s)
    314                 {
    315                         if (isset($params[$param]))
    316                         {
    317                                 $section = $s;
    318                         }
    319                 }
    320 
    321                 if (!isset($section))
    322                 {
    323                         $section = 'none';
    324                 }
    325         }
     303  $section = @$params['section'];
     304  if (!isset($section))
     305  {
     306    $section_of = array(
     307      'category' => 'categories',
     308      'tags'     => 'tags',
     309      'list'     => 'list',
     310      'search'   => 'search',
     311      );
     312
     313    foreach ($section_of as $param => $s)
     314    {
     315      if (isset($params[$param]))
     316      {
     317        $section = $s;
     318      }
     319    }
     320
     321    if (!isset($section))
     322    {
     323      $section = 'none';
     324    }
     325  }
    326326
    327327  switch($section)
  • trunk/include/section_init.inc.php

    r13240 r13258  
    7070if ( strncmp($page['root_path'], './', 2) == 0 )
    7171{
    72         $page['root_path'] = substr($page['root_path'], 2);
     72  $page['root_path'] = substr($page['root_path'], 2);
    7373}
    7474
Note: See TracChangeset for help on using the changeset viewer.