Ignore:
Timestamp:
Nov 24, 2013, 3:50:19 PM (10 years ago)
Author:
mistic100
Message:

fix typo + indent code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdminTools/include/events.inc.php

    r25657 r25675  
    2020
    2121  $tpl_vars = array(
    22     'U_SITE_ADMIN' => $url_root . 'admin.php?page=',
    23     'MULTIVIEW' => $MultiView->get_data(),
    24     'U_SELF' => $MultiView->get_clean_url(true),
    25     'USER' => $MultiView->get_user(),
     22    'U_SITE_ADMIN' =>     $url_root . 'admin.php?page=',
     23    'MULTIVIEW' =>        $MultiView->get_data(),
     24    'U_SELF' =>           $MultiView->get_clean_url(true),
     25    'USER' =>             $MultiView->get_user(),
    2626    'CURRENT_USERNAME' => $user['id']==$conf['guest_id'] ? l10n('guest') : $user['username'],
    27     'PWG_TOKEN' => get_pwg_token(),
     27    'PWG_TOKEN' =>        get_pwg_token(),
    2828    );
    2929
     
    5252    $template->set_prefilter('picture', 'admintools_remove_privacy');
    5353
    54     $query = 'SELECT element_id FROM ' . CADDIE_TABLE . '
    55       WHERE element_id = ' . $page['image_id'] .';';
     54    $query = '
     55SELECT element_id FROM ' . CADDIE_TABLE . '
     56  WHERE element_id = ' . $page['image_id'] .'
     57;';
    5658    $tpl_vars['IS_IN_CADDIE'] = pwg_db_num_rows(pwg_query($query)) > 0;
    5759
     
    6567        );
    6668
    67       $query = 'SELECT id FROM ' . CATEGORIES_TABLE.'
    68         WHERE id = ' . $page['category']['id'] .'
    69         AND representative_picture_id = ' . $page['image_id'] .';';
     69      $query = '
     70SELECT id FROM ' . CATEGORIES_TABLE.'
     71  WHERE id = ' . $page['category']['id'] .'
     72    AND representative_picture_id = ' . $page['image_id'] .'
     73;';
    7074      $tpl_vars['IS_REPRESENTATIVE'] = pwg_db_num_rows(pwg_query($query)) > 0;
    7175    }
     
    9599
    96100    $tpl_vars['QUICK_EDIT'] = array(
    97       'img' => $picture['current']['derivatives']['square'],
    98       'name' => $picture['current']['name'],
    99       'comment' => $picture['current']['comment'],
    100       'author' => $picture['current']['author'],
    101       'level' => $picture['current']['level'],
    102       'date_creation' => substr($picture['current']['date_creation'], 0, 10),
     101      'img' =>                $picture['current']['derivatives']['square'],
     102      'name' =>               $picture['current']['name'],
     103      'comment' =>            $picture['current']['comment'],
     104      'author' =>             $picture['current']['author'],
     105      'level' =>              $picture['current']['level'],
     106      'date_creation' =>      substr($picture['current']['date_creation'], 0, 10),
    103107      'date_creation_time' => substr($picture['current']['date_creation'], 11, 5),
    104       'tag_selection' => $tag_selection,
    105       'tags' => $tags,
    106       );
    107   }
    108   else if (@$page['section'] = 'categories' and isset($page['category']))
     108      'tag_selection' =>      $tag_selection,
     109      'tags' =>               $tags,
     110      );
     111  }
     112  else if (@$page['section'] == 'categories' and isset($page['category']))
    109113  {
    110114    $url_self = duplicate_index_url();
     
    128132    }
    129133
    130     $query = 'SELECT * FROM '.IMAGES_TABLE.' WHERE id = '. $page['category']['representative_picture_id'] .';';
     134    $query = '
     135SELECT * FROM '.IMAGES_TABLE.'
     136  WHERE id = '. $page['category']['representative_picture_id'] .'
     137;';
    131138    $image_infos = pwg_db_fetch_assoc(pwg_query($query));
    132139
    133140    $tpl_vars['QUICK_EDIT'] = array(
    134       'img' => DerivativeImage::get_one(IMG_SQUARE, $image_infos),
    135       'name' => $page['category']['name'],
    136       'comment' => $page['category']['comment'],
     141      'img' =>      DerivativeImage::get_one(IMG_SQUARE, $image_infos),
     142      'name' =>     $page['category']['name'],
     143      'comment' =>  $page['category']['comment'],
    137144      );
    138145  }
     
    172179  ));
    173180
    174   $template->set_filename('ato', realpath(ADMINTOOLS_PATH . 'template/public_controller.tpl'));
    175   $template->parse('ato');
     181  $template->set_filename('ato_public_controller', realpath(ADMINTOOLS_PATH . 'template/public_controller.tpl'));
     182  $template->parse('ato_public_controller');
    176183
    177184  switch_lang_back();
     
    222229
    223230    $data = array(
    224       'name' => $_POST['name'],
     231      'name' =>   $_POST['name'],
    225232      'author' => $_POST['author'],
    226       'level' => $_POST['level'],
     233      'level' =>  $_POST['level'],
    227234      );
    228235
Note: See TracChangeset for help on using the changeset viewer.