Ignore:
Timestamp:
Oct 19, 2013, 7:43:04 PM (11 years ago)
Author:
mistic100
Message:

remove all array_push (50% slower than []) + some changes missing for feature:2978

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_comment.inc.php

    r21817 r25018  
    9494      if ($conf['comments_author_mandatory'])
    9595      {
    96         array_push($infos, l10n('Username is mandatory') );
     96        $infos[] = l10n('Username is mandatory');
    9797        $comment_action='reject';
    9898      }
     
    111111      if ( $row['user_exists'] == 1 )
    112112      {
    113         array_push($infos, l10n('This login is already used by another user') );
     113        $infos[] = l10n('This login is already used by another user');
    114114        $comment_action='reject';
    115115      }
     
    142142    if (!url_check_format($comm['website_url']))
    143143    {
    144       array_push($infos, l10n('Your website URL is invalid'));
     144      $infos[] = l10n('Your website URL is invalid');
    145145      $comment_action='reject';
    146146    }
     
    156156    else if ($conf['comments_email_mandatory'])
    157157    {
    158       array_push($infos, l10n('Email address is missing. Please specify an email address.') );
     158      $infos[] = l10n('Email address is missing. Please specify an email address.');
    159159      $comment_action='reject';
    160160    }
     
    162162  else if (!email_check_format($comm['email']))
    163163  {
    164     array_push($infos, l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'));
     164    $infos[] = l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)');
    165165    $comment_action='reject';
    166166  }
     
    193193    if ( $counter > 0 )
    194194    {
    195       array_push( $infos, l10n('Anti-flood system : please wait for a moment before trying to post another comment') );
     195      $infos[] = l10n('Anti-flood system : please wait for a moment before trying to post another comment');
    196196      $comment_action='reject';
    197197    }
Note: See TracChangeset for help on using the changeset viewer.