Skip to content

Commit b501233

Browse files
committed
We're on PHP 5.4
1 parent d82286b commit b501233

File tree

271 files changed

+580
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+580
-580
lines changed

phpmyfaq/add.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* This is the page there a user can add a FAQ record.
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/ajax.attachment.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: handles an attachment with the given id
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/ajax.autosave.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Autosave handler.
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -63,12 +63,12 @@
6363

6464
$tagging = new PMF_Tags($faqConfig);
6565

66-
$category = new PMF_Category($faqConfig, array(), false);
66+
$category = new PMF_Category($faqConfig, [], false);
6767
$category->setUser($currentAdminUser);
6868
$category->setGroups($currentAdminGroups);
6969

7070
if (!isset($categories['rubrik'])) {
71-
$categories['rubrik'] = array();
71+
$categories['rubrik'] = [];
7272
}
7373

7474
$recordData = array(

phpmyfaq/admin/ajax.category.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: handling of Ajax category calls
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -32,7 +32,7 @@
3232

3333
case 'getpermissions':
3434

35-
$category = new PMF_Category($faqConfig, array(), false);
35+
$category = new PMF_Category($faqConfig, [], false);
3636
$category->setUser($currentAdminUser);
3737
$category->setGroups($currentAdminGroups);
3838

phpmyfaq/admin/ajax.comment.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: deletes comments with the given id
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/ajax.group.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: handling of Ajax group calls
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -33,11 +33,11 @@
3333

3434
$user = new PMF_User($faqConfig);
3535
$userList = $user->getAllUsers();
36-
$groupList = ($user->perm instanceof PMF_Perm_Medium) ? $user->perm->getAllGroups() : array();
36+
$groupList = ($user->perm instanceof PMF_Perm_Medium) ? $user->perm->getAllGroups() : [];
3737

3838
// Returns all groups
3939
if ('get_all_groups' == $ajaxAction) {
40-
$groups = array();
40+
$groups = [];
4141
foreach ($groupList as $groupId) {
4242
$data = $user->perm->getGroupData($groupId);
4343
$groups[] = array(
@@ -60,7 +60,7 @@
6060

6161
// Return all users
6262
if ('get_all_users' == $ajaxAction) {
63-
$users = array();
63+
$users = [];
6464
foreach ($userList as $single_user) {
6565
$user->getUserById($single_user);
6666
$users[] = array('user_id' => $user->getUserId(),
@@ -72,7 +72,7 @@
7272
// Returns all group members
7373
if ('get_all_members' == $ajaxAction) {
7474
$memberList = $user->perm->getGroupMembers($groupId);
75-
$members = array();
75+
$members = [];
7676
foreach ($memberList as $single_member) {
7777
$user->getUserById($single_member);
7878
$members[] = array('user_id' => $user->getUserId(),

phpmyfaq/admin/ajax.ondemandurl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Performs link verification at demand of the user.
99
*
10-
* PHP Version 5.3
10+
* PHP Version 5.4
1111
*
1212
* This Source Code Form is subject to the terms of the Mozilla Public License,
1313
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/ajax.records.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: handling of Ajax record calls
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -33,7 +33,7 @@
3333
// array( 0 => array((int)id, (string)langugage, (int) checked)),
3434
// 1 => .....
3535
// )
36-
$items = isset($_GET['items']) && is_array($_GET['items']) ? $_GET['items'] : array();
36+
$items = isset($_GET['items']) && is_array($_GET['items']) ? $_GET['items'] : [];
3737

3838
if (!isset($items[0][2])) {
3939
$items[0][2] = 0;

phpmyfaq/admin/ajax.search.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: handling of Ajax search calls
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/ajax.tags_list.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: Search for tags
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -45,7 +45,7 @@
4545

4646
if ($permission['editbt']) {
4747
$i = 0;
48-
$tagNames = array();
48+
$tagNames = [];
4949
foreach ($tags as $tagName) {
5050
$i++;
5151
if ($i <= PMF_TAGS_AUTOCOMPLETE_RESULT_SET_SIZE) {

phpmyfaq/admin/ajax.trans.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
// in an array $valArr contents like "number substring", "substring", "number substring", "substring", ...
6868
$numVal = count($valArr);
6969
if ($numVal > 1) {
70-
$newValArr = array();
70+
$newValArr = [];
7171
for ($i = 0; $i < $numVal; $i += 2) {
7272
if (is_numeric($valArr[$i])) {
7373
// clearing quotes
@@ -114,7 +114,7 @@
114114
}
115115

116116
$newFileContents = '';
117-
$tmpLines = array();
117+
$tmpLines = [];
118118

119119
/**
120120
* Read in the head of the file we're writing to
@@ -203,7 +203,7 @@
203203
/**
204204
* %s
205205
*
206-
* PHP Version 5.3
206+
* PHP Version 5.4
207207
*
208208
* This Source Code Form is subject to the terms of the Mozilla Public License,
209209
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/ajax.user.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* AJAX: handling of Ajax user calls
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -42,7 +42,7 @@
4242
switch ($ajaxAction) {
4343

4444
case 'get_user_list':
45-
$users = array();
45+
$users = [];
4646
foreach ($user->searchUsers($usersearch) as $singleUser) {
4747
$users[] = array(
4848
'user_id' => $singleUser['user_id'],
@@ -54,7 +54,7 @@
5454

5555
case 'get_user_data':
5656
$user->getUserById($userId);
57-
$userdata = array();
57+
$userdata = [];
5858
$userdata = $user->userdata->get('*');
5959
$userdata['status'] = $user->getStatus();
6060
$userdata['login'] = $user->getLogin();
@@ -74,7 +74,7 @@
7474
if (!$user->deleteUser()) {
7575
$message = $PMF_LANG['ad_user_error_delete'];
7676
} else {
77-
$category = new PMF_Category($faqConfig, array(), false);
77+
$category = new PMF_Category($faqConfig, [], false);
7878
$category->moveOwnership($userId, 1);
7979

8080
// Remove the user from groups

phpmyfaq/admin/ajax.verifyurl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Performs link verification when entries are shown in record.show.php
99
*
10-
* PHP Version 5.3
10+
* PHP Version 5.4
1111
*
1212
* This Source Code Form is subject to the terms of the Mozilla Public License,
1313
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/att.main.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Ajax interface for attachments
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/attachment.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Select an attachment and save it
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -67,7 +67,7 @@
6767
//
6868
// Get current user rights
6969
//
70-
$permission = array();
70+
$permission = [];
7171
if ($auth === true) {
7272
// read all rights, set them FALSE
7373
$allRights = $user->perm->getAllRightsData();

phpmyfaq/admin/backup.export.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* The export function to import the phpMyFAQ backups
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -44,7 +44,7 @@
4444
//
4545
// Get current user rights
4646
//
47-
$permission = array();
47+
$permission = [];
4848
if ($auth === true) {
4949
// read all rights, set them FALSE
5050
$allRights = $user->perm->getAllRightsData();

phpmyfaq/admin/backup.import.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* The import function to import the phpMyFAQ backups
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/backup.main.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Frontend for Backup and Restore
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can

phpmyfaq/admin/category.add.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Adds a new (sub-)category, a new sub-category inherits the permissions from
44
* its parent category.
55
*
6-
* PHP Version 5.3
6+
* PHP Version 5.4
77
*
88
* This Source Code Form is subject to the terms of the Mozilla Public License,
99
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -34,7 +34,7 @@
3434
<?php
3535
if ($permission['addcateg']) {
3636

37-
$category = new PMF_Category($faqConfig, array(), false);
37+
$category = new PMF_Category($faqConfig, [], false);
3838
$category->setUser($currentAdminUser);
3939
$category->setGroups($currentAdminGroups);
4040
$parentId = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT, 0);

phpmyfaq/admin/category.cut.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Cuts out a category
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -27,7 +27,7 @@
2727
}
2828

2929
if ($permission["editcateg"]) {
30-
$category = new PMF_Category($faqConfig, array(), false);
30+
$category = new PMF_Category($faqConfig, [], false);
3131
$category->setUser($currentAdminUser);
3232
$category->setGroups($currentAdminGroups);
3333
$category->buildTree();

phpmyfaq/admin/category.delete.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Deletes a category
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -34,7 +34,7 @@
3434

3535
<?php
3636
if ($permission['delcateg']) {
37-
$category = new PMF_Category($faqConfig, array(), false);
37+
$category = new PMF_Category($faqConfig, [], false);
3838
$category->setUser($currentAdminUser);
3939
$category->setGroups($currentAdminGroups);
4040
$categories = $category->getAllCategories();

phpmyfaq/admin/category.edit.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Edits a category
44
*
5-
* PHP Version 5.3
5+
* PHP Version 5.4
66
*
77
* This Source Code Form is subject to the terms of the Mozilla Public License,
88
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
@@ -29,7 +29,7 @@
2929
if ($permission['editcateg']) {
3030

3131
$categoryId = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT, 0);
32-
$category = new PMF_Category($faqConfig, array(), false);
32+
$category = new PMF_Category($faqConfig, [], false);
3333
$category->setUser($currentAdminUser);
3434
$category->setGroups($currentAdminGroups);
3535
$categories = $category->getAllCategories();

0 commit comments

Comments
 (0)