[phpMyAdmin Git] [phpmyadmin/phpmyadmin] 03f2e3: Simplify code to get largest table

Michal Čihař michal at cihar.com
Tue Jan 5 12:38:36 CET 2016


  Branch: refs/heads/master
  Home:   https://github.com/phpmyadmin/phpmyadmin
  Commit: 03f2e37ef4c56729b3e622ba489d541472551724
      https://github.com/phpmyadmin/phpmyadmin/commit/03f2e37ef4c56729b3e622ba489d541472551724
  Author: Michal Čihař <michal at cihar.com>
  Date:   2016-01-05 (Tue, 05 Jan 2016)

  Changed paths:
    M libraries/DbQbe.php

  Log Message:
  -----------
  Simplify code to get largest table

We really do not have to sort the array, we just need the maximal value.

Signed-off-by: Michal Čihař <michal at cihar.com>


  Commit: 2bdd046b06b3af9c03981e057d8eb5048788edde
      https://github.com/phpmyadmin/phpmyadmin/commit/2bdd046b06b3af9c03981e057d8eb5048788edde
  Author: Michal Čihař <michal at cihar.com>
  Date:   2016-01-05 (Tue, 05 Jan 2016)

  Changed paths:
    M libraries/mysql_charsets.inc.php

  Log Message:
  -----------
  Remove not needed reset()

The variable is used only with foreach(), which does reset internally
(or uses different pointer with PHP 7).

Signed-off-by: Michal Čihař <michal at cihar.com>


  Commit: a74efb0c30572af23f1d3de71de335a448951a73
      https://github.com/phpmyadmin/phpmyadmin/commit/a74efb0c30572af23f1d3de71de335a448951a73
  Author: Michal Čihař <michal at cihar.com>
  Date:   2016-01-05 (Tue, 05 Jan 2016)

  Changed paths:
    M libraries/DatabaseInterface.php
    M libraries/DbQbe.php
    M libraries/controllers/server/ServerDatabasesController.php

  Log Message:
  -----------
  Simplify getting first element of an array

Calling current() after reset() is duplicate as reset() already returns
current index value.

Signed-off-by: Michal Čihař <michal at cihar.com>


Compare: https://github.com/phpmyadmin/phpmyadmin/compare/c9b0935e7dea...a74efb0c3057


More information about the Git mailing list