Use classpath instead of require

pull/1/head
Victor Dubiniuk 11 years ago committed by Tobias Hintze
parent 028cb64fee
commit 956bce12b5

@ -32,3 +32,5 @@ OCP\App::addNavigationEntry(array(
'icon' => OCP\Util::imagePath('office', 'office.png'), 'icon' => OCP\Util::imagePath('office', 'office.png'),
'name' => 'Office') 'name' => 'Office')
); );
OC::$CLASSPATH['OCA\Office\Storage'] = 'office/lib/office.php';

@ -21,16 +21,12 @@
* *
*/ */
require_once('lib/office.php');
OCP\User::checkLoggedIn(); OCP\User::checkLoggedIn();
OCP\JSON::checkAppEnabled('office'); OCP\JSON::checkAppEnabled('office');
OCP\App::setActiveNavigationEntry( 'office_index' ); OCP\App::setActiveNavigationEntry( 'office_index' );
OCP\Util::addStyle( 'office', 'style' ); OCP\Util::addStyle( 'office', 'style' );
$list=\OCA\Office\Storage::getDocuments(); $list=\OCA\Office\Storage::getDocuments();
$tmpl = new OCP\Template('office', 'documents', 'user'); $tmpl = new OCP\Template('office', 'documents', 'user');
$tmpl->assign('list', $list); $tmpl->assign('list', $list);

Loading…
Cancel
Save