Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
This commit is contained in:
parent
77dfbaa0bf
commit
e36f2bb1fb
212 changed files with 5160 additions and 5160 deletions
|
|
@ -104,7 +104,7 @@ function proxy_init(App $a) {
|
|||
$url = substr($url, 0, $pos + 1);
|
||||
}
|
||||
|
||||
$url = str_replace(array('.jpg', '.jpeg', '.gif', '.png'), array('','','',''), $url);
|
||||
$url = str_replace(['.jpg', '.jpeg', '.gif', '.png'], ['','','',''], $url);
|
||||
|
||||
$url = base64_decode(strtr($url, '-_', '+/'), true);
|
||||
|
||||
|
|
@ -186,10 +186,10 @@ function proxy_init(App $a) {
|
|||
die();
|
||||
}
|
||||
|
||||
$fields = array('uid' => 0, 'contact-id' => 0, 'guid' => get_guid(), 'resource-id' => $urlhash, 'created' => datetime_convert(), 'edited' => datetime_convert(),
|
||||
$fields = ['uid' => 0, 'contact-id' => 0, 'guid' => get_guid(), 'resource-id' => $urlhash, 'created' => datetime_convert(), 'edited' => datetime_convert(),
|
||||
'filename' => basename($_REQUEST['url']), 'type' => '', 'album' => '', 'height' => imagesy($image), 'width' => imagesx($image),
|
||||
'datasize' => 0, 'data' => $img_str, 'scale' => 100, 'profile' => 0,
|
||||
'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '', 'desc' => $mime);
|
||||
'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '', 'desc' => $mime];
|
||||
dba::insert('photo', $fields);
|
||||
} else {
|
||||
$Image = new Image($img_str, $mime);
|
||||
|
|
@ -286,7 +286,7 @@ function proxy_url($url, $writemode = false, $size = '') {
|
|||
// Extract the URL extension
|
||||
$extension = pathinfo(parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION);
|
||||
|
||||
$extensions = array('jpg', 'jpeg', 'gif', 'png');
|
||||
$extensions = ['jpg', 'jpeg', 'gif', 'png'];
|
||||
if (in_array($extension, $extensions)) {
|
||||
$shortpath .= '.' . $extension;
|
||||
$longpath .= '.' . $extension;
|
||||
|
|
@ -340,7 +340,7 @@ function proxy_parse_query($url) {
|
|||
$query = parse_url($url, PHP_URL_QUERY);
|
||||
$query = html_entity_decode($query);
|
||||
$query_list = explode('&', $query);
|
||||
$arr = array();
|
||||
$arr = [];
|
||||
|
||||
foreach ($query_list as $key_value) {
|
||||
$key_value_list = explode('=', $key_value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue