Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldo "xoen" Giambelluca <xoen@xoen.org>2010-07-23 02:48:45 +0400
committerAldo "xoen" Giambelluca <xoen@xoen.org>2010-07-23 02:48:45 +0400
commit11664f3153c86cefc2c366156234f9530777aab3 (patch)
treef5b092add6523a8a2e04f417f1f3775dc700f76d /inc/lib_base.php
parentccd362108e67e3fc2647adebf2b7bef98081c728 (diff)
Moved LDAP authentication into a plugin
Used the current plugin system to define `USER_OC_LDAP` class that can be used as backend for OC_USER
Diffstat (limited to 'inc/lib_base.php')
-rwxr-xr-xinc/lib_base.php42
1 files changed, 27 insertions, 15 deletions
diff --git a/inc/lib_base.php b/inc/lib_base.php
index df6df15cc23..d0b25834421 100755
--- a/inc/lib_base.php
+++ b/inc/lib_base.php
@@ -110,21 +110,6 @@ if(OC_USER::isLoggedIn()){
OC_FILESYSTEM::mount($rootStorage,'/');
}
-// load plugins
-$CONFIG_LOADPLUGINS='all';
-if ($CONFIG_LOADPLUGINS != 'all')
- $plugins=explode(' ',$CONFIG_LOADPLUGINS);
-else{
- $plugins=array();
- $fd=opendir($SERVERROOT.'/plugins');
- while (($filename = readdir($fd)) !== false) {
- if($filename<>'.' and $filename<>'..' and substr($filename,0,1)!='.'){
- $plugins[]=$filename;
- }
- }
- closedir($fd);
-}
-if(isset($plugins[0])) foreach($plugins as $plugin) require_once($SERVERROOT.'/plugins/'.$plugin.'/lib_'.$plugin.'.php');
// check if the server is correctly configured for ownCloud
@@ -305,6 +290,33 @@ class OC_UTIL {
}
}
+ /**
+ * Load the plugins
+ */
+ public static function loadPlugins() {
+ global $CONFIG_LOADPLUGINS;
+ global $SERVERROOT;
+
+ $CONFIG_LOADPLUGINS = 'all';
+ if ( 'all' !== $CONFIG_LOADPLUGINS ) {
+ $plugins = explode(' ', $CONFIG_LOADPLUGINS);
+ } else {
+ $plugins = array();
+ $fd = opendir($SERVERROOT . '/plugins');
+ while ( false !== ($filename = readdir($fd)) ) {
+ if ( $filename<>'.' AND $filename<>'..' AND ('.' != substr($filename, 0, 1)) ) {
+ $plugins[] = $filename;
+ }
+ }
+ closedir($fd);
+ }
+ if ( isset($plugins[0]) ) {
+ foreach ( $plugins as $plugin ) {
+ oc_require_once('/plugins/' . $plugin . '/lib_' . $plugin . '.php');
+ }
+ }
+ }
+
}