Browse Source

Use Plugin::staticPath instead of custom code

Chimo 1 year ago
parent
commit
f6e459383c
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      actions/filesadminpanel.php

+ 2
- 4
actions/filesadminpanel.php View File

@@ -12,9 +12,6 @@ class FilesadminpanelAction extends AdminPanelAction
12 12
     function prepare(array $args=array()) {
13 13
         parent::prepare($args);
14 14
 
15
-        $this->pluginDir = common_root_url() .
16
-            str_replace(array(INSTALLDIR . '/', '/actions'), '', dirname(__FILE__));
17
-
18 15
         $this->page = $this->int('page', 1, null, 1);
19 16
         $this->sortBy = $this->trimmed('sort-by', 'id');
20 17
         $this->sortDir = $this->trimmed('sort-dir', 'asc');
@@ -86,9 +83,10 @@ class FilesadminpanelAction extends AdminPanelAction
86 83
     }
87 84
 
88 85
     function showSort($by, $direction) {
86
+        $pluginPath = Plugin::staticPath('FileManager', "");
89 87
         $klass = 'sort-icon';
90 88
         $href = '?sort-by=' . $by . '&sort-dir=' . $direction . '&page=' . $this->page;
91
-        $img_src = $this->pluginDir . '/images/sort-' . $direction . '.png';
89
+        $img_src = $pluginPath . '/images/sort-' . $direction . '.png';
92 90
 
93 91
         if ($this->sortBy === $by && $this->sortDir === $direction) {
94 92
             $klass .= ' active';

Loading…
Cancel
Save