当前位置: 首页>>代码示例>>PHP>>正文


PHP OC_APP类代码示例

本文整理汇总了PHP中OC_APP的典型用法代码示例。如果您正苦于以下问题:PHP OC_APP类的具体用法?PHP OC_APP怎么用?PHP OC_APP使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了OC_APP类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getShortFooter

 public function getShortFooter()
 {
     $baseUrl = "<a href=\"" . $this->getBaseUrl() . "\" target=\"_blank\">" . $this->getEntity() . "</a>";
     $slogan = $this->getSlogan();
     // === GTU
     $cguUrl = '';
     if (OC_APP::isEnabled('gtu')) {
         $cguUrl = \OCP\Config::getAppvalue('gtu', 'url', '');
     }
     if (empty($cguUrl)) {
         $cguUrl = \OCP\Config::getSystemvalue('custom_termsofserviceurl', '');
     }
     $cgu = '';
     if (!empty($cguUrl)) {
         $cgu = '<a href="' . $cguUrl . '" target="_blank">CGU</a>';
     }
     // === Help
     $helpUrl = '';
     if (empty($helpUrl)) {
         $helpUrl = $this->getHelpUrl();
     }
     $help = '';
     if (!empty($helpUrl)) {
         $help = '<a href="' . $helpUrl . '" target="_blank">Aide</a>';
     }
     // === contact
     $contact = ' – ' . '<a href="http://ods.cnrs.fr/contacts.html" target="_blank">Contacts</a>';
     // =========================
     $footer = $baseUrl . ' – ' . $slogan . ' – ' . $cgu . ' – ' . $help . $contact;
     return $footer;
 }
开发者ID:Victor-Bordage-Gorry,项目名称:mycore,代码行数:31,代码来源:defaults.php

示例2: init

 public static function init()
 {
     //Allow config page
     \OC::$CLASSPATH['OCA_Updater\\Backup'] = self::APP_PATH . 'lib/backup.php';
     \OC::$CLASSPATH['OCA_Updater\\Downloader'] = self::APP_PATH . 'lib/downloader.php';
     \OC::$CLASSPATH['OCA_Updater\\Updater'] = self::APP_PATH . 'lib/updater.php';
     \OC_APP::registerAdmin(self::APP_ID, 'admin');
 }
开发者ID:blablubli,项目名称:owncloudapps,代码行数:8,代码来源:app.php

示例3: getRoutingFiles

	/**
	 * Get the files to load the routes from
	 *
	 * @return string[]
	 */
	public function getRoutingFiles() {
		if (!isset($this->routingFiles)) {
			$this->routingFiles = array();
			foreach (\OC_APP::getEnabledApps() as $app) {
				$file = \OC_App::getAppPath($app) . '/appinfo/routes.php';
				if (file_exists($file)) {
					$this->routingFiles[$app] = $file;
				}
			}
		}
		return $this->routingFiles;
	}
开发者ID:BacLuc,项目名称:newGryfiPage,代码行数:17,代码来源:router.php

示例4: checkPassword

 public function checkPassword($uid, $password)
 {
     if (!$this->db_conn) {
         $this->connectdb();
     }
     if (!$this->db_conn) {
         return false;
     }
     $query = 'SELECT user_login, user_pass FROM ' . self::$params['wordpress_db_prefix'] . 'users WHERE user_login = "' . str_replace('"', '""', $uid) . '"';
     $query .= ' AND user_status = 0';
     $result = $this->wp_instance->db->query($query);
     if ($result && mysqli_num_rows($result) > 0) {
         $row = mysqli_fetch_assoc($result);
         $hash = $row['user_pass'];
         $normalize_path = str_replace('\\', '/', OC_APP::getAppPath('user_wordpress'));
         $path_array = explode('/', $normalize_path);
         array_pop($path_array);
         $app_folder = array_pop($path_array);
         OC::$CLASSPATH['OC_wordpress'] = $app_folder . '/lib/wordpress.class.php';
         require_once $app_folder . '/user_wordpress/class-phpass.php';
         $wp_hasher = new WPPasswordHash(8, TRUE);
         $check = $wp_hasher->CheckPassword($password, $hash);
         if ($check === true) {
             // Make sure the user is in the wordpress_global_group
             if (self::$params['wordpress_global_group'] != '') {
                 if (!OC_Group::groupExists(self::$params['wordpress_global_group'])) {
                     OC_Group::createGroup(self::$params['wordpress_global_group']);
                 }
                 $UserblogsIds = $this->wp_instance->getUserblogsIds($uid);
                 if (empty($UserblogsIds)) {
                     // remove from group if current user has no access to Wordpress blog/site with the same role name.
                     OC_Group::removefromGroup($uid, self::$params['wordpress_global_group']);
                 } else {
                     OC_Group::addToGroup($uid, self::$params['wordpress_global_group']);
                 }
             }
             $this->setUserInfos($uid);
             return $row['user_login'];
         }
     }
     return false;
 }
开发者ID:silvioheinze,项目名称:user_wordpress,代码行数:42,代码来源:user_wordpress.php

示例5: OC_L10N

<?php

/**
 * ownCloud - media plugin
 *
 * @author Robin Appelman
 * @copyright 2010 Robin Appelman icewind1991@gmail.com
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/
 *
 */
$l = new OC_L10N('media');
require_once 'apps/media/lib_media.php';
OC_Util::addScript('media', 'loader');
OC_APP::registerPersonal('media', 'settings');
OC_App::register(array('order' => 3, 'id' => 'media', 'name' => 'Media'));
OC_App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo('media', 'index.php'), 'icon' => OC_Helper::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music')));
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:28,代码来源:owncloud_apps_media_appinfo_app.php

示例6: testDeleteHooksForSharedFiles

 function testDeleteHooksForSharedFiles()
 {
     self::logoutHelper();
     self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER1);
     \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER1);
     // remember files_trashbin state
     $stateFilesTrashbin = \OC_App::isEnabled('files_trashbin');
     // we want to tests with app files_trashbin disabled
     \OC_App::disable('files_trashbin');
     // make sure that the trash bin is disabled
     $this->assertFalse(\OC_APP::isEnabled('files_trashbin'));
     $this->user1View->file_put_contents($this->filename, $this->data);
     // check if all keys are generated
     $this->assertTrue($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
     $this->assertTrue($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
     // get the file info from previous created file
     $fileInfo = $this->user1View->getFileInfo($this->filename);
     // check if we have a valid file info
     $this->assertTrue($fileInfo instanceof \OC\Files\FileInfo);
     // share the file with user2
     \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_ENCRYPTION_HOOKS_USER2, \OCP\Constants::PERMISSION_ALL);
     // check if new share key exists
     $this->assertTrue($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
     self::logoutHelper();
     self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER2);
     \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER2);
     // user2 update the shared file
     $this->user2View->file_put_contents($this->filename, $this->data);
     // keys should be stored at user1s dir, not in user2s
     $this->assertFalse($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
     $this->assertFalse($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER2 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
     // delete the Shared file from user1 in data/user2/files/Shared
     $result = $this->user2View->unlink($this->filename);
     $this->assertTrue($result);
     // share key for user2 from user1s home should be gone, all other keys should still exists
     $this->assertTrue($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER1 . '.shareKey'));
     $this->assertFalse($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/' . self::TEST_ENCRYPTION_HOOKS_USER2 . '.shareKey'));
     $this->assertTrue($this->rootView->file_exists(self::TEST_ENCRYPTION_HOOKS_USER1 . '/files_encryption/keys/' . $this->filename . '/fileKey'));
     // cleanup
     self::logoutHelper();
     self::loginHelper(self::TEST_ENCRYPTION_HOOKS_USER1);
     \OC_User::setUserId(self::TEST_ENCRYPTION_HOOKS_USER1);
     if ($stateFilesTrashbin) {
         \OC_App::enable('files_trashbin');
     } else {
         \OC_App::disable('files_trashbin');
     }
 }
开发者ID:kebenxiaoming,项目名称:owncloudRedis,代码行数:48,代码来源:hooks.php

示例7: print_unescaped

	<p class="center">
		<?php 
    print_unescaped($l->t('If you want to support the project
		<a href="https://owncloud.org/contribute"
			target="_blank">join development</a>
		or
		<a href="https://owncloud.org/promote"
			target="_blank">spread the word</a>!'));
    ?>
	</p>
	<?php 
}
?>

	<?php 
if (OC_APP::isEnabled('firstrunwizard')) {
    ?>
	<p class="center"><a class="button" href="#" id="showWizard"><?php 
    p($l->t('Show First Run Wizard again'));
    ?>
</a></p>
	<?php 
}
?>
</div>


<div id="quota" class="section">
	<div style="width:<?php 
p($_['usage_relative']);
?>
开发者ID:riso,项目名称:owncloud-core,代码行数:31,代码来源:personal.php

示例8: array

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
// only need filesystem apps
//echo json_encode('WP is here !');
//
//echo $baseuri;
$RUNTIME_APPTYPES = array('filesystem', 'authentication', 'share');
//
OC_App::loadApps($RUNTIME_APPTYPES);
$normalize_path = str_replace('\\', '/', OC_APP::getAppPath('user_wordpress'));
$path_array = explode('/', $normalize_path);
array_pop($path_array);
$app_folder = array_pop($path_array);
require_once $app_folder . '/lib/autoauth.php';
//require_once('apps/user_wordpress/lib/autoauth.php');
if (isset($_REQUEST['share_link'])) {
    if (OC_App::isEnabled('files_sharing')) {
        $file_path = urldecode(substr(implode('/', array_slice($vars, 5)), 0, -11));
        $file_infos = OC_Files::getFileInfo($file_path);
        $token = '';
        // is the file allready shared ?
        $shares = OCP\Share::getItemShared('file', $file_infos['id'], OCP\Share::FORMAT_NONE, null, true);
        foreach ($shares as $share) {
            if ($share['path'] == $file_infos['path']) {
                $token = $share['token'];
开发者ID:silvioheinze,项目名称:user_wordpress,代码行数:31,代码来源:wordav.php

示例9: isset

<?php

// Check if we are a user
OCP\JSON::callCheck();
OC_JSON::checkLoggedIn();
// Manually load apps to ensure hooks work correctly (workaround for issue 1503)
OC_APP::loadApps();
$username = isset($_POST['username']) ? $_POST['username'] : OC_User::getUser();
$password = isset($_POST['password']) ? $_POST['password'] : null;
$oldPassword = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : '';
$recoveryPassword = isset($_POST['recoveryPassword']) ? $_POST['recoveryPassword'] : null;
$userstatus = null;
if (OC_User::isAdminUser(OC_User::getUser())) {
    $userstatus = 'admin';
}
if (OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
    $userstatus = 'subadmin';
}
if (OC_User::getUser() === $username && OC_User::checkPassword($username, $oldPassword)) {
    $userstatus = 'user';
}
if (is_null($userstatus)) {
    OC_JSON::error(array('data' => array('message' => 'Authentication error')));
    exit;
}
if (\OCP\App::isEnabled('files_encryption') && $userstatus !== 'user') {
    //handle the recovery case
    $util = new \OCA\Encryption\Util(new \OC_FilesystemView('/'), $username);
    $recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
    $validRecoveryPassword = false;
    $recoveryPasswordSupported = false;
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:31,代码来源:changepassword.php

示例10: array

<?php

/**
* ownCloud - user_ldap
*
* @author Dominik Schmidt
* @copyright 2011 Dominik Schmidt dev@dominik-schmidt.de
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/
OC_APP::registerAdmin('admin_export', 'settings');
// add settings page to navigation
$entry = array('id' => "admin_export_settings", 'order' => 1, 'href' => OC_Helper::linkTo("admin_export", "settings.php"), 'name' => 'Export');
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:25,代码来源:owncloud_apps_admin_export_appinfo_app.php

示例11:

<?php

/**
* ownCloud - Tattoo
*
* @author Arthur Schiwon
* @copyright 2012 Arthur Schiwon blizzz@owncloud.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/
OC_APP::registerPersonal('tattoo', 'settings');
$wallpaper = OC_Preferences::getValue(OC_User::getUser(), 'tattoo', 'wallpaper', 'none');
if ($wallpaper != 'none') {
    OC_Util::addStyle('tattoo', 'tattoo');
    OC_Util::addScript('tattoo', 'tattoo');
}
开发者ID:blablubli,项目名称:owncloudapps,代码行数:28,代码来源:app.php

示例12: fetchPage

 /**
  * @brief Proceeds the template
  * @returns content
  *
  * This function proceeds the template. If $this->renderas is set, it will
  * will produce a full page.
  */
 public function fetchPage()
 {
     $data = $this->_fetch();
     if ($this->renderas) {
         // Decide which page we show
         if ($this->renderas == "user") {
             $page = new OC_Template("core", "layout.user");
             $page->assign('searchurl', OC_Helper::linkTo('search', 'index.php'));
             if (array_search(OC_APP::getCurrentApp(), array('settings', 'admin', 'help')) !== false) {
                 $page->assign('bodyid', 'body-settings');
             } else {
                 $page->assign('bodyid', 'body-user');
             }
             // Add navigation entry
             $page->assign("navigation", OC_App::getNavigation());
             $page->assign("settingsnavigation", OC_App::getSettingsNavigation());
         } else {
             $page = new OC_Template("core", "layout.guest");
         }
         // Add the css and js files
         foreach (OC_Util::$scripts as $script) {
             if (is_file(OC::$SERVERROOT . "/apps/{$script}.js")) {
                 $page->append("jsfiles", OC::$WEBROOT . "/apps/{$script}.js");
             } elseif (is_file(OC::$SERVERROOT . "/{$script}.js")) {
                 $page->append("jsfiles", OC::$WEBROOT . "/{$script}.js");
             } else {
                 $page->append("jsfiles", OC::$WEBROOT . "/core/{$script}.js");
             }
         }
         foreach (OC_Util::$styles as $style) {
             if (is_file(OC::$SERVERROOT . "/apps/{$style}.css")) {
                 $page->append("cssfiles", OC::$WEBROOT . "/apps/{$style}.css");
             } elseif (is_file(OC::$SERVERROOT . "/{$style}.css")) {
                 $page->append("cssfiles", OC::$WEBROOT . "/{$style}.css");
             } else {
                 $page->append("cssfiles", OC::$WEBROOT . "/core/{$style}.css");
             }
         }
         // Add custom headers
         $page->assign('headers', $this->headers);
         foreach (OC_Util::$headers as $header) {
             $page->append('headers', $header);
         }
         // Add css files and js files
         $page->assign("content", $data);
         return $page->fetchPage();
     } else {
         return $data;
     }
 }
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:57,代码来源:owncloud_lib_template.php

示例13: fetchPage

 /**
  * @brief Proceeds the template
  * @returns content
  *
  * This function proceeds the template. If $this->renderas is set, it
  * will produce a full page.
  */
 public function fetchPage()
 {
     $data = $this->_fetch();
     if ($this->renderas) {
         // Decide which page we show
         if ($this->renderas == "user") {
             $page = new OC_Template("core", "layout.user");
             $page->assign('searchurl', OC_Helper::linkTo('search', 'index.php'));
             if (array_search(OC_APP::getCurrentApp(), array('settings', 'admin', 'help')) !== false) {
                 $page->assign('bodyid', 'body-settings');
             } else {
                 $page->assign('bodyid', 'body-user');
             }
             // Add navigation entry
             $navigation = OC_App::getNavigation();
             $page->assign("navigation", $navigation);
             $page->assign("settingsnavigation", OC_App::getSettingsNavigation());
             foreach ($navigation as $entry) {
                 if ($entry['active']) {
                     $page->assign('application', $entry['name']);
                     break;
                 }
             }
         } else {
             $page = new OC_Template("core", "layout.guest");
         }
         // Read the selected theme from the config file
         $theme = OC_Config::getValue("theme");
         // Read the detected formfactor and use the right file name.
         $fext = $this->getFormFactorExtension();
         // Add the core js files or the js files provided by the selected theme
         foreach (OC_Util::$scripts as $script) {
             // Is it in 3rd party?
             if ($page->appendIfExist('jsfiles', OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $script . '.js')) {
                 // Is it in apps and overwritten by the theme?
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/apps/{$script}{$fext}.js")) {
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/apps/{$script}.js")) {
                 // Is it part of an app?
             } elseif ($page->appendIfExist('jsfiles', OC::$APPSROOT, OC::$APPSWEBROOT, "apps/{$script}{$fext}.js")) {
             } elseif ($page->appendIfExist('jsfiles', OC::$APPSROOT, OC::$APPSWEBROOT, "apps/{$script}.js")) {
                 // Is it in the owncloud root but overwritten by the theme?
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/{$script}{$fext}.js")) {
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/{$script}.js")) {
                 // Is it in the owncloud root ?
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "{$script}{$fext}.js")) {
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "{$script}.js")) {
                 // Is in core but overwritten by a theme?
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/core/{$script}{$fext}.js")) {
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/core/{$script}.js")) {
                 // Is it in core?
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "core/{$script}{$fext}.js")) {
             } elseif ($page->appendIfExist('jsfiles', OC::$SERVERROOT, OC::$WEBROOT, "core/{$script}.js")) {
             } else {
                 echo 'js file not found: script:' . $script . ' formfactor:' . $fext . ' webroot:' . OC::$WEBROOT . ' serverroot:' . OC::$SERVERROOT;
                 die;
             }
         }
         // Add the css files
         foreach (OC_Util::$styles as $style) {
             // is it in 3rdparty?
             if ($page->appendIfExist('cssfiles', OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $style . '.css')) {
                 // or in apps?
             } elseif ($page->appendIfExist('cssfiles', OC::$APPSROOT, OC::$APPSWEBROOT, "apps/{$style}{$fext}.css")) {
             } elseif ($page->appendIfExist('cssfiles', OC::$APPSROOT, OC::$APPSWEBROOT, "apps/{$style}.css")) {
                 // or in the owncloud root?
             } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "{$style}{$fext}.css")) {
             } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "{$style}.css")) {
                 // or in core ?
             } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "core/{$style}{$fext}.css")) {
             } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "core/{$style}.css")) {
             } else {
                 echo 'css file not found: style:' . $script . ' formfactor:' . $fext . ' webroot:' . OC::$WEBROOT . ' serverroot:' . OC::$SERVERROOT;
                 die;
             }
         }
         // Add the theme css files. you can override the default values here
         if (!empty($theme)) {
             foreach (OC_Util::$styles as $style) {
                 if ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/apps/{$style}{$fext}.css")) {
                 } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/apps/{$style}.css")) {
                 } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/{$style}{$fext}.css")) {
                 } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/{$style}.css")) {
                 } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/core/{$style}{$fext}.css")) {
                 } elseif ($page->appendIfExist('cssfiles', OC::$SERVERROOT, OC::$WEBROOT, "themes/{$theme}/core/{$style}.css")) {
                 }
             }
         }
         // Add custom headers
         $page->assign('headers', $this->headers);
         foreach (OC_Util::$headers as $header) {
             $page->append('headers', $header);
         }
         // Add css files and js files
//.........这里部分代码省略.........
开发者ID:jaeindia,项目名称:ownCloud-Enhancements,代码行数:101,代码来源:template.php

示例14: __construct

 public function __construct($renderas)
 {
     // Decide which page we show
     if ($renderas == 'user') {
         parent::__construct('core', 'layout.user');
         if (in_array(OC_APP::getCurrentApp(), array('settings', 'admin', 'help')) !== false) {
             $this->assign('bodyid', 'body-settings');
         } else {
             $this->assign('bodyid', 'body-user');
         }
         // Add navigation entry
         $this->assign('application', '', false);
         $navigation = OC_App::getNavigation();
         $this->assign('navigation', $navigation);
         $this->assign('settingsnavigation', OC_App::getSettingsNavigation());
         foreach ($navigation as $entry) {
             if ($entry['active']) {
                 $this->assign('application', $entry['name']);
                 break;
             }
         }
         $user_displayname = OC_User::getDisplayName();
         $this->assign('user_displayname', $user_displayname);
         $this->assign('user_uid', OC_User::getUser());
     } else {
         if ($renderas == 'guest' || $renderas == 'error') {
             parent::__construct('core', 'layout.guest');
         } else {
             parent::__construct('core', 'layout.base');
         }
     }
     $versionParameter = '?v=' . md5(implode(OC_Util::getVersion()));
     // Add the js files
     $jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
     $this->assign('jsfiles', array(), false);
     if (OC_Config::getValue('installed', false) && $renderas != 'error') {
         $this->append('jsfiles', OC_Helper::linkToRoute('js_config') . $versionParameter);
     }
     if (!empty(OC_Util::$core_scripts)) {
         $this->append('jsfiles', OC_Helper::linkToRemoteBase('core.js', false) . $versionParameter);
     }
     foreach ($jsfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $this->append('jsfiles', $web . '/' . $file . $versionParameter);
     }
     // Add the css files
     $cssfiles = self::findStylesheetFiles(OC_Util::$styles);
     $this->assign('cssfiles', array());
     if (!empty(OC_Util::$core_styles)) {
         $this->append('cssfiles', OC_Helper::linkToRemoteBase('core.css', false) . $versionParameter);
     }
     foreach ($cssfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $paths = explode('/', $file);
         $in_root = false;
         foreach (OC::$APPSROOTS as $app_root) {
             if ($root == $app_root['path']) {
                 $in_root = true;
                 break;
             }
         }
         if ($in_root) {
             $app = $paths[0];
             unset($paths[0]);
             $path = implode('/', $paths);
             $this->append('cssfiles', OC_Helper::linkTo($app, $path) . $versionParameter);
         } else {
             $this->append('cssfiles', $web . '/' . $file . $versionParameter);
         }
     }
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:75,代码来源:templatelayout.php

示例15:

<?php

/**
* ownCloud - files_antivirus
*
* @author Manuel Deglado
* @copyright 2012 Manuel Deglado manuel.delgado@ucr.ac.cr
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/
OC::$CLASSPATH['OC_Files_Antivirus'] = OC_App::getAppPath('files_antivirus') . '/lib/clamav.php';
OC::$CLASSPATH['OC_Files_Antivirus_BackgroundScanner'] = OC_App::getAppPath('files_antivirus') . '/lib/scanner.php';
OC_APP::registerAdmin('files_antivirus', 'settings');
OC_Hook::connect('OC_Filesystem', 'post_write', 'OC_Files_Antivirus', 'av_scan');
OCP\BackgroundJob::AddRegularTask('OC_Files_Antivirus_BackgroundScanner', 'check');
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:27,代码来源:app.php


注:本文中的OC_APP类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。