mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[ticket/10631] Fixing some issues spotted in extensions admin
Removing whitespace, cast the items from the json file straight into template vars (not via variables) and fixing some double quotes to single quotes. PHPBB3-10631
This commit is contained in:
parent
29a9f3e70d
commit
305b5fe939
@ -37,7 +37,7 @@ class acp_extensions
|
||||
// Set action to list if not set
|
||||
if (empty($action))
|
||||
{
|
||||
$action = "list";
|
||||
$action = 'list';
|
||||
}
|
||||
|
||||
// What are we doing?
|
||||
@ -226,28 +226,17 @@ class acp_extensions
|
||||
$metadatafile = file_get_contents($filepath);
|
||||
$metadata = json_decode($metadatafile,true);
|
||||
|
||||
$name = $metadata["name"];
|
||||
$type = $metadata["type"];
|
||||
$description = $metadata["description"];
|
||||
$homepage = $metadata["homepage"];
|
||||
$version = $metadata["version"];
|
||||
$time = $metadata["time"];
|
||||
$licence = $metadata["licence"];
|
||||
$require_php = $metadata["require"]["php"];
|
||||
$require_phpbb = $metadata["require"]["phpbb"];
|
||||
$display_name = $metadata["extra"]["display-name"];
|
||||
|
||||
$template->assign_vars(array(
|
||||
'NAME' => $name,
|
||||
'TYPE' => $type,
|
||||
'DESCRIPTION' => $description,
|
||||
'HOMEPAGE' => $homepage,
|
||||
'VERSION' => $version,
|
||||
'TIME' => $time,
|
||||
'LICENSE' => $licence,
|
||||
'REQUIRE_PHP' => $require_php,
|
||||
'REQUIRE_PHPBB' => $require_phpbb,
|
||||
'DISPLAY_NAME' => $display_name,
|
||||
'NAME' => $metadata['name'],
|
||||
'TYPE' => $metadata['type'],
|
||||
'DESCRIPTION' => $metadata['description'],
|
||||
'HOMEPAGE' => $metadata['homepage'],
|
||||
'VERSION' => $metadata['version'],
|
||||
'TIME' => $metadata['time'],
|
||||
'LICENSE' => $metadata['licence'],
|
||||
'REQUIRE_PHP' => $metadata['require']['php'],
|
||||
'REQUIRE_PHPBB' => $metadata['require']['phpbb'],
|
||||
'DISPLAY_NAME' => $metadata['extra']['display-name'],
|
||||
)
|
||||
);
|
||||
|
||||
@ -258,7 +247,7 @@ class acp_extensions
|
||||
'AUTHOR_USERNAME' => $author["username"],
|
||||
'AUTHOR_EMAIL' => $author["email"],
|
||||
'AUTHOR_HOMEPAGE' => $author["homepage"],
|
||||
'AUTHOR_TYPE' => $author["type"],
|
||||
'AUTHOR_ROLE' => $author["role"],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user