]> source.dussan.org Git - nextcloud-server.git/commitdiff
Media: Change includes in app.php to use the autoloader
authorBart Visscher <bartv@thisnet.nl>
Mon, 25 Jun 2012 18:54:15 +0000 (20:54 +0200)
committerBart Visscher <bartv@thisnet.nl>
Mon, 25 Jun 2012 19:05:10 +0000 (21:05 +0200)
apps/media/appinfo/app.php
apps/media/lib_media.php

index c5bfc3465428b21c064f7ab52bbd1137454e86f0..75015d627b4d47b5eb35bbc93c12ac64033d05f1 100644 (file)
 
 $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');
index 71069fdf4b9c8ef325c006ec79e8f40e8c901c8c..9e687a4af2c048d626796a62e72db855a35345cd 100644 (file)
 * 
 */
 
-//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