Changeset 25018 for trunk/profile.php


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/profile.php

    r20609 r25018  
    202202      if (!empty($_POST['use_new_pwd']))
    203203      {
    204         array_push($fields, $conf['user_fields']['password']);
     204        $fields[] = $conf['user_fields']['password'];
    205205        // password is hashed with function $conf['password_hash']
    206206        $data{$conf['user_fields']['password']} = $conf['password_hash']($_POST['use_new_pwd']);
     
    212212        if ($_POST['username'] != $userdata['username'] and get_userid($_POST['username']))
    213213        {
    214           array_push($page['errors'], l10n('this login is already used'));
     214          $page['errors'][] = l10n('this login is already used');
    215215          unset($_POST['redirect']);
    216216        }
    217217        else
    218218        {
    219           array_push($fields, $conf['user_fields']['username']);
     219          $fields[] = $conf['user_fields']['username'];
    220220          $data{$conf['user_fields']['username']} = $_POST['username'];
    221221         
     
    263263      if ($conf['activate_comments'])
    264264      {
    265         array_push($fields, 'show_nb_comments');
     265        $fields[] = 'show_nb_comments';
    266266      }
    267267
Note: See TracChangeset for help on using the changeset viewer.