. * */ // Check if we are a user OCP\User::checkLoggedIn(); //OCP\App::checkAppEnabled('bookmarks'); OCP\App::checkAppEnabled('roundcube'); // Check if we are a user if (!OCP\User::isLoggedIn()) { header("Location: " . OCP\Util::linkTo('', 'index.php')); exit(); } // Load our style OCP\Util::addStyle('roundcube', 'base'); // workaround to detect OC version $ocVersion = @reset(OCP\Util::getVersion()); // OC 5 if ($ocVersion < 6) { OCP\Util::writeLog('roundcube', 'Running on OwnCloud 5', OCP\Util::DEBUG); // add neede JS OCP\Util::addScript('', 'jquery-1.7.2.min'); // OC 6 } else { OCP\Util::writeLog('roundcube', 'Running on OwnCloud '.$ocVersion, OCP\Util::DEBUG); // add neede JS OCP\Util::addScript('', 'jquery-1.10.0.min'); } OCP\Util::addScript('roundcube', 'jquery.plugins'); OCP\Util::addScript('roundcube', 'mail'); // add new navigation entry OCP\App::setActiveNavigationEntry("roundcube_index"); $tmpl = new OCP\Template("roundcube", "mail", "user"); $tmpl -> printpage(); ?>