@@ -15,8 +15,11 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | public static function has($key) |
| 17 | 17 | { |
| 18 | - if(file_exists(app_path("CBPlugins/".$key))) return true; |
|
| 19 | - else return false; |
|
| 18 | + if(file_exists(app_path("CBPlugins/".$key))) { |
|
| 19 | + return true; |
|
| 20 | + } else { |
|
| 21 | + return false; |
|
| 22 | + } |
|
| 20 | 23 | } |
| 21 | 24 | |
| 22 | 25 | public static function isNeedUpgrade($pluginKey, $versionToCompare) |
@@ -24,7 +27,7 @@ discard block |
||
| 24 | 27 | $pluginJson = json_decode(file_get_contents(app_path("CBPlugins/".$pluginKey."/plugin.json")), true); |
| 25 | 28 | if($pluginJson) { |
| 26 | 29 | return version_compare($pluginJson['version'], $versionToCompare,"!="); |
| 27 | - }else{ |
|
| 30 | + } else{ |
|
| 28 | 31 | return false; |
| 29 | 32 | } |
| 30 | 33 | } |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } else { |
| 61 | 61 | return cb()->redirectBack("Failed to install/update, can't open the plugin archive"); |
| 62 | 62 | } |
| 63 | - }else{ |
|
| 63 | + } else{ |
|
| 64 | 64 | return cb()->redirectBack('Failed to install/update, plugin key is not found'); |
| 65 | 65 | } |
| 66 | 66 | } |