aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-12-04 19:33:29 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-12-04 19:33:29 +0100
commit86f69ca396572ca4d7668a33e84cb4f3b523fc4e (patch)
tree968d2cebe522ca17c6210583635d9ea7177460e8 /app
parent53410887c94157f3d11f2c30d92ff5d3d8a3a9bd (diff)
First draft for the new extension feature
- Only system extensions can be loaded for the moment by adding them in the config.php file. - Remove previous system (it will be added properly in the new system in the next step).
Diffstat (limited to 'app')
-rw-r--r--app/FreshRSS.php42
1 files changed, 22 insertions, 20 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 6114a5d1a..2db811a71 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -6,6 +6,9 @@ class FreshRSS extends Minz_FrontController {
Minz_Session::init('FreshRSS');
}
+ // Load list of extensions and initialize the "system" ones.
+ Minz_ExtensionManager::init();
+
// Need to be called just after session init because it initializes
// current user.
FreshRSS_Auth::init();
@@ -32,7 +35,6 @@ class FreshRSS extends Minz_FrontController {
$this->loadStylesAndScripts();
$this->loadNotifications();
- $this->loadExtensions();
}
private function loadStylesAndScripts() {
@@ -74,23 +76,23 @@ class FreshRSS extends Minz_FrontController {
}
}
- private function loadExtensions() {
- $extensionPath = FRESHRSS_PATH . '/extensions/';
- //TODO: Add a preference to load only user-selected extensions
- foreach (scandir($extensionPath) as $key => $extension) {
- if (ctype_alpha($extension)) {
- $mtime = @filemtime($extensionPath . $extension . '/style.css');
- if ($mtime !== false) {
- Minz_View::appendStyle(Minz_Url::display('/ext.php?c&amp;e=' . $extension . '&amp;' . $mtime));
- }
- $mtime = @filemtime($extensionPath . $extension . '/script.js');
- if ($mtime !== false) {
- Minz_View::appendScript(Minz_Url::display('/ext.php?j&amp;e=' . $extension . '&amp;' . $mtime));
- }
- if (file_exists($extensionPath . $extension . '/module.php')) {
- //TODO: include
- }
- }
- }
- }
+ // private function loadExtensions() {
+ // $extensionPath = FRESHRSS_PATH . '/extensions/';
+ // //TODO: Add a preference to load only user-selected extensions
+ // foreach (scandir($extensionPath) as $key => $extension) {
+ // if (ctype_alpha($extension)) {
+ // $mtime = @filemtime($extensionPath . $extension . '/style.css');
+ // if ($mtime !== false) {
+ // Minz_View::appendStyle(Minz_Url::display('/ext.php?c&amp;e=' . $extension . '&amp;' . $mtime));
+ // }
+ // $mtime = @filemtime($extensionPath . $extension . '/script.js');
+ // if ($mtime !== false) {
+ // Minz_View::appendScript(Minz_Url::display('/ext.php?j&amp;e=' . $extension . '&amp;' . $mtime));
+ // }
+ // if (file_exists($extensionPath . $extension . '/module.php')) {
+ // //TODO: include
+ // }
+ // }
+ // }
+ // }
}