1
0
Fork 0

Use short form array syntax everywhere

- Add short form array syntax to po2php.php generation
This commit is contained in:
Hypolite Petovan 2018-01-15 08:05:12 -05:00
commit e36f2bb1fb
212 changed files with 5160 additions and 5160 deletions

View file

@ -59,10 +59,10 @@ function parse_url_content(App $a) {
// the URL with the corresponding BBCode media tag
$redirects = 0;
// Fetch the header of the URL
$result = z_fetch_url($url, false, $redirects, array("novalidate" => true, "nobody" => true));
$result = z_fetch_url($url, false, $redirects, ["novalidate" => true, "nobody" => true]);
if($result["success"]) {
// Convert the header fields into an array
$hdrs = array();
$hdrs = [];
$h = explode("\n", $result["header"]);
foreach ($h as $l) {
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
@ -89,7 +89,7 @@ function parse_url_content(App $a) {
$template = "[bookmark=%s]%s[/bookmark]%s";
$arr = array("url" => $url, "text" => "");
$arr = ["url" => $url, "text" => ""];
call_hooks("parse_link", $arr);
@ -102,7 +102,7 @@ function parse_url_content(App $a) {
// need to parse the url for content.
if ($url && $title && $text) {
$title = str_replace(array("\r","\n"),array("",""),$title);
$title = str_replace(["\r","\n"],["",""],$title);
$text = "[quote]" . trim($text) . "[/quote]" . $br;