Ignore:
Timestamp:
Dec 21, 2013, 5:33:24 PM (10 years ago)
Author:
mistic100
Message:

update for Piwigo 2.6 + code clean

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GuestBook/admin/pending.php

    r24889 r26065  
    1212  if (empty($_POST['comments']))
    1313  {
    14     array_push(
    15       $page['errors'],
    16       l10n('Select at least one comment')
    17       );
     14    $page['errors'][] =l10n('Select at least one comment');
    1815  }
    1916  else
    2017  {
    21     include_once( GUESTBOOK_PATH .'include/functions_comment.inc.php' );
     18    include_once(GUESTBOOK_PATH .'include/functions_comment.inc.php');
    2219    check_input_parameter('comments', $_POST, true, PATTERN_ID);
    2320   
     
    2623      validate_user_comment_guestbook($_POST['comments']);
    2724
    28       array_push(
    29         $page['infos'],
    30         l10n_dec(
    31           '%d user comment validated', '%d user comments validated',
    32           count($_POST['comments'])
    33           )
     25      $page['infos'][] = l10n_dec(
     26        '%d user comment validated', '%d user comments validated',
     27        count($_POST['comments'])
    3428        );
    3529    }
     
    3933      delete_user_comment_guestbook($_POST['comments']);
    4034
    41       array_push(
    42         $page['infos'],
    43         l10n_dec(
    44           '%d user comment rejected', '%d user comments rejected',
    45           count($_POST['comments'])
    46           )
     35      $page['infos'][] =l10n_dec(
     36        '%d user comment rejected', '%d user comments rejected',
     37        count($_POST['comments'])
    4738        );
    4839    }
     
    7566;';
    7667$result = pwg_query($query);
     68
    7769while ($row = pwg_db_fetch_assoc($result))
    7870{
     
    10193    );
    10294
    103   array_push($list, $row['id']);
     95  $list[] = $row['id'];
    10496}
    10597
    106 $template->assign('LIST', implode(',', $list) );
    10798
    108 $template->assign('F_ACTION', GUESTBOOK_ADMIN . '-pending');
    109 
     99$template->assign(array(
     100  'LIST' => implode(',', $list),
     101  'F_ACTION' => GUESTBOOK_ADMIN . '-pending',
     102  ));
    110103
    111104$template->set_filename('guestbook', realpath(GUESTBOOK_PATH . 'admin/template/pending.tpl'));
    112 
    113 ?>
Note: See TracChangeset for help on using the changeset viewer.