Index: inc/core/class.dc.media.php
===================================================================
--- inc/core/class.dc.media.php	(revision 3872)
+++ inc/core/class.dc.media.php	(revision 3874)
@@ -23,5 +23,5 @@
     protected $file_sort = 'name-asc';
 
-    protected $file_handler = array(); ///< <b>array</b> Array of callbacks
+    protected $file_handler = []; ///< <b>array</b> Array of callbacks
 
     public $thumb_tp       = '%s/.%s_%s.jpg'; ///< <b>string</b> Thumbnail file pattern
@@ -35,10 +35,10 @@
     - sq: square image
      */
-    public $thumb_sizes = array(
-        'm'  => array(448, 'ratio', 'medium'),
-        's'  => array(240, 'ratio', 'small'),
-        't'  => array(100, 'ratio', 'thumbnail'),
-        'sq' => array(48, 'crop', 'square')
-    );
+    public $thumb_sizes = [
+        'm'  => [448, 'ratio', 'medium'],
+        's'  => [240, 'ratio', 'small'],
+        't'  => [100, 'ratio', 'thumbnail'],
+        'sq' => [48, 'crop', 'square']
+    ];
 
     public $icon_img = 'images/media/%s.png'; ///< <b>string</b> Icon file pattern
@@ -91,25 +91,25 @@
 
         # Event handlers
-        $this->addFileHandler('image/jpeg', 'create', array($this, 'imageThumbCreate'));
-        $this->addFileHandler('image/png', 'create', array($this, 'imageThumbCreate'));
-        $this->addFileHandler('image/gif', 'create', array($this, 'imageThumbCreate'));
-
-        $this->addFileHandler('image/png', 'update', array($this, 'imageThumbUpdate'));
-        $this->addFileHandler('image/jpeg', 'update', array($this, 'imageThumbUpdate'));
-        $this->addFileHandler('image/gif', 'update', array($this, 'imageThumbUpdate'));
-
-        $this->addFileHandler('image/png', 'remove', array($this, 'imageThumbRemove'));
-        $this->addFileHandler('image/jpeg', 'remove', array($this, 'imageThumbRemove'));
-        $this->addFileHandler('image/gif', 'remove', array($this, 'imageThumbRemove'));
-
-        $this->addFileHandler('image/jpeg', 'create', array($this, 'imageMetaCreate'));
-
-        $this->addFileHandler('image/jpeg', 'recreate', array($this, 'imageThumbCreate'));
-        $this->addFileHandler('image/png', 'recreate', array($this, 'imageThumbCreate'));
-        $this->addFileHandler('image/gif', 'recreate', array($this, 'imageThumbCreate'));
-
-        $this->addFileHandler('image/jpeg', 'recreate', array($this, 'imageThumbCreate'));
-        $this->addFileHandler('image/png', 'recreate', array($this, 'imageThumbCreate'));
-        $this->addFileHandler('image/gif', 'recreate', array($this, 'imageThumbCreate'));
+        $this->addFileHandler('image/jpeg', 'create', [$this, 'imageThumbCreate']);
+        $this->addFileHandler('image/png', 'create', [$this, 'imageThumbCreate']);
+        $this->addFileHandler('image/gif', 'create', [$this, 'imageThumbCreate']);
+
+        $this->addFileHandler('image/png', 'update', [$this, 'imageThumbUpdate']);
+        $this->addFileHandler('image/jpeg', 'update', [$this, 'imageThumbUpdate']);
+        $this->addFileHandler('image/gif', 'update', [$this, 'imageThumbUpdate']);
+
+        $this->addFileHandler('image/png', 'remove', [$this, 'imageThumbRemove']);
+        $this->addFileHandler('image/jpeg', 'remove', [$this, 'imageThumbRemove']);
+        $this->addFileHandler('image/gif', 'remove', [$this, 'imageThumbRemove']);
+
+        $this->addFileHandler('image/jpeg', 'create', [$this, 'imageMetaCreate']);
+
+        $this->addFileHandler('image/jpeg', 'recreate', [$this, 'imageThumbCreate']);
+        $this->addFileHandler('image/png', 'recreate', [$this, 'imageThumbCreate']);
+        $this->addFileHandler('image/gif', 'recreate', [$this, 'imageThumbCreate']);
+
+        $this->addFileHandler('image/jpeg', 'recreate', [$this, 'imageThumbCreate']);
+        $this->addFileHandler('image/png', 'recreate', [$this, 'imageThumbCreate']);
+        $this->addFileHandler('image/gif', 'recreate', [$this, 'imageThumbCreate']);
 
         # Thumbnails sizes
@@ -291,5 +291,5 @@
 
             # Thumbnails
-            $f->media_thumb = array();
+            $f->media_thumb = [];
             $p              = path::info($f->relname);
 
@@ -331,5 +331,5 @@
     public function setFileSort($type = 'name')
     {
-        if (in_array($type, array('name-asc', 'name-desc', 'date-asc', 'date-desc'))) {
+        if (in_array($type, ['name-asc', 'name-desc', 'date-asc', 'date-desc'])) {
             $this->file_sort = $type;
         }
@@ -402,5 +402,5 @@
         parent::getDir();
 
-        $f_res = array();
+        $f_res = [];
         $p_dir = $this->dir;
 
@@ -414,5 +414,5 @@
         }
 
-        $f_reg = array();
+        $f_reg = [];
 
         while ($rs->fetch()) {
@@ -467,5 +467,5 @@
         }
         try {
-            usort($this->dir['files'], array($this, 'sortFileHandler'));
+            usort($this->dir['files'], [$this, 'sortFileHandler']);
         } catch (Exception $e) {}
     }
@@ -532,6 +532,6 @@
         $rs = $this->con->select($strReq);
 
-        $this->dir = array('dirs' => array(), 'files' => array());
-        $f_res     = array();
+        $this->dir = ['dirs' => [], 'files' => []];
+        $f_res     = [];
         while ($rs->fetch()) {
             $fr = $this->fileRecord($rs);
@@ -543,5 +543,5 @@
 
         try {
-            usort($this->dir['files'], array($this, 'sortFileHandler'));
+            usort($this->dir['files'], [$this, 'sortFileHandler']);
         } catch (Exception $e) {}
 
@@ -560,8 +560,8 @@
     public function getPostMedia($post_id, $media_id = null, $link_type = null)
     {
-        $params = array(
+        $params = [
             'post_id'    => $post_id,
             'media_path' => $this->path
-        );
+        ];
         if ($media_id) {
             $params['media_id'] = (integer) $media_id;
@@ -572,5 +572,5 @@
         $rs = $this->postmedia->getPostMedia($params);
 
-        $res = array();
+        $res = [];
 
         while ($rs->fetch()) {
@@ -647,5 +647,5 @@
         $delReq = 'DELETE FROM ' . $this->table . ' ' .
             'WHERE media_id IN (%s) ';
-        $del_ids = array();
+        $del_ids = [];
 
         while ($rs->fetch()) {
@@ -1115,5 +1115,5 @@
 
             if (!is_array($args)) {
-                $args = array(
+                $args = [
                     'showvolume'      => 1,
                     'loadingcolor'    => 'ff9900',
@@ -1125,5 +1125,5 @@
                     'slidercolor2'    => '999999',
                     'sliderovercolor' => '0066cc'
-                );
+                ];
             }
 
@@ -1137,5 +1137,5 @@
             }
 
-            $vars = array();
+            $vars = [];
             foreach ($args as $k => $v) {
                 $vars[] = $k . '=' . $v;
@@ -1201,5 +1201,5 @@
 
             if (!is_array($args)) {
-                $args = array(
+                $args = [
                     'margin'          => 1,
                     'showvolume'      => 1,
@@ -1210,5 +1210,5 @@
                     'slidercolor2'    => '999999',
                     'sliderovercolor' => '0066cc'
-                );
+                ];
             }
 
@@ -1222,5 +1222,5 @@
             }
 
-            $vars = array();
+            $vars = [];
             foreach ($args as $k => $v) {
                 $vars[] = $k . '=' . $v;
@@ -1264,5 +1264,5 @@
 
         if (!is_array($args)) {
-            $args = array(
+            $args = [
                 'showvolume'      => 1,
                 'loadingcolor'    => 'ff9900',
@@ -1274,5 +1274,5 @@
                 'slidercolor2'    => '999999',
                 'sliderovercolor' => '0066cc'
-            );
+            ];
         }
 
@@ -1286,5 +1286,5 @@
         }
 
-        $vars = array();
+        $vars = [];
         foreach ($args as $k => $v) {
             $vars[] = $k . '=' . $v;
@@ -1321,5 +1321,5 @@
 
         if (!is_array($args)) {
-            $args = array(
+            $args = [
                 'margin'          => 1,
                 'showvolume'      => 1,
@@ -1330,5 +1330,5 @@
                 'slidercolor2'    => '999999',
                 'sliderovercolor' => '0066cc'
-            );
+            ];
         }
 
@@ -1342,5 +1342,5 @@
         }
 
-        $vars = array();
+        $vars = [];
         foreach ($args as $k => $v) {
             $vars[] = $k . '=' . $v;
