<?php
-if ((@include_once 'Services/Weather.php') &&
+if (class_exists('Services_Weather') &&
!empty($GLOBALS['conf']['sql']['phptype'])) {
$block_name = _("Metar Weather");
}
*/
protected function _content()
{
- if (!@include_once 'Services/Weather.php') {
+ if (!class_exists('Services_Weather')) {
Horde::logMessage('The metar block will not work without Services_Weather from PEAR. Run pear install Services_Weather.', 'ERR');
throw new Horde_Block_Exception(_("Metar block not available. Details have been logged for the administrator."));
}
if (!empty($matches)) {
$html .= '<br />';
- @include_once 'SOAP/Client.php';
if (!class_exists('SOAP_Client')) {
$html .= $this->_error(sprintf(_("%s not found."), '<a href="http://pear.php.net/SOAP" target="_blank">SOAP</a>'));
} else {
*/
protected function _params()
{
- if (!(@include_once 'Services/Weather.php') ||
- !(@include_once 'Cache.php') ||
- !(@include_once 'XML/Serializer.php') ||
+ if (!class_exists('Services_Weather') ||
+ !class_exists('Cache') ||
+ !class_exists('XML_Serializer') ||
!ini_get('allow_url_fopen')) {
Horde::logMessage('The weather.com block will not work without PEAR\'s Services_Weather, Cache, and XML_ Serializer packages, and allow_url_fopen enabled. Run `pear install Services_Weather Cache XML_Serializer´ and ensure that allow_url_fopen is enabled in php.ini.', 'ERR');
$params = array(
*/
protected function _content()
{
- if (!(@include_once 'Services/Weather.php') ||
- !(@include_once 'Cache.php') ||
+ if (!class_exists('Services_Weather') ||
+ !class_exists('Cache') ||
!ini_get('allow_url_fopen')) {
Horde::logMessage('The weather.com block will not work without the PEARServices_Weather and Cache packages, and allow_url_fopen enabled. Run pear install Services_Weather Cache, and ensure that allow_url_fopen_wrappers is enabled in php.ini.', 'ERR');
throw new Horde_Block_Exception(_("The weather.com block is not available."));
* will override any entries gathered dynamically below.
*/
if (empty($cfgSources['imsp']['use_shares'])) {
- require_once 'Net/IMSP/Utils.php';
$result = Net_IMSP_Utils::getAllBooks($cfgSources['imsp']);
if (!is_a($result, 'PEAR_Error')) {
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('turba', array('authentication' => 'none', 'cli' => true, 'user_admin' => true));
-require_once TURBA_BASE . '/lib/Object/Group.php';
-
// Read command line parameters.
if ($argc != 2) {
$cli->message('Too many or too few parameters.', 'cli.error');
require_once dirname(__FILE__) . '/../lib/Application.php';
Horde_Registry::appInit('turba', array('authentication' => 'none', 'cli' => true, 'user_admin' => true));
-require_once TURBA_BASE . '/lib/Object/Group.php';
-
// Read command line parameters.
if ($argc != 2) {
$cli->message('Too many or too few parameters.', 'cli.error');