aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-25 20:54:15 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-25 21:05:10 +0200
commit103ae6faa455966f01b4476dbe9a7a40a766c8f5 (patch)
tree84a85ec9528a2443dd7cd9d8963680990dba962a
parentc6b9f613bb109d4ecfe66e51e7fbf0322f96c2b1 (diff)
downloadnextcloud-server-103ae6faa455966f01b4476dbe9a7a40a766c8f5.tar.gz
nextcloud-server-103ae6faa455966f01b4476dbe9a7a40a766c8f5.zip
Media: Change includes in app.php to use the autoloader
-rw-r--r--apps/media/appinfo/app.php19
-rw-r--r--apps/media/lib_media.php12
2 files changed, 16 insertions, 15 deletions
diff --git a/apps/media/appinfo/app.php b/apps/media/appinfo/app.php
index c5bfc346542..75015d627b4 100644
--- a/apps/media/appinfo/app.php
+++ b/apps/media/appinfo/app.php
@@ -22,9 +22,22 @@
$l=OC_L10N::get('media');
-require_once('media/lib_media.php');
-require_once('media/lib_collection.php');
-require_once('media/lib_scanner.php');
+OC::$CLASSPATH['OC_MEDIA'] = 'media/lib_media.php';
+OC::$CLASSPATH['OC_MediaSearchProvider'] = 'media/lib_media.php';
+OC::$CLASSPATH['OC_MEDIA_COLLECTION'] = 'media/lib_collection.php';
+OC::$CLASSPATH['OC_MEDIA_SCANNER'] = 'media/lib_scanner.php';
+
+//we need to have the sha256 hash of passwords for ampache
+OCP\Util::connectHook('OC_User','post_login','OC_MEDIA','loginListener');
+
+//connect to the filesystem for auto updating
+OCP\Util::connectHook('OC_Filesystem','post_write','OC_MEDIA','updateFile');
+
+//listen for file deletions to clean the database if a song is deleted
+OCP\Util::connectHook('OC_Filesystem','post_delete','OC_MEDIA','deleteFile');
+
+//list for file moves to update the database
+OCP\Util::connectHook('OC_Filesystem','post_rename','OC_MEDIA','moveFile');
OCP\Util::addscript('media','loader');
OCP\App::registerPersonal('media','settings');
diff --git a/apps/media/lib_media.php b/apps/media/lib_media.php
index 71069fdf4b9..9e687a4af2c 100644
--- a/apps/media/lib_media.php
+++ b/apps/media/lib_media.php
@@ -21,18 +21,6 @@
*
*/
-//we need to have the sha256 hash of passwords for ampache
-OCP\Util::connectHook('OC_User','post_login','OC_MEDIA','loginListener');
-
-//connect to the filesystem for auto updating
-OCP\Util::connectHook('OC_Filesystem','post_write','OC_MEDIA','updateFile');
-
-//listen for file deletions to clean the database if a song is deleted
-OCP\Util::connectHook('OC_Filesystem','post_delete','OC_MEDIA','deleteFile');
-
-//list for file moves to update the database
-OCP\Util::connectHook('OC_Filesystem','post_rename','OC_MEDIA','moveFile');
-
class OC_MEDIA{
/**
* get the sha256 hash of the password needed for ampache