/** * @deprecated Since 5.0, please use removeByUserID() * @param string $address */ static function removeByAddress($address) { eZDebug::writeStrict('Method ' . __METHOD__ . ' has been deprecated in 5.0', 'Deprecation'); $user = eZUser::fetchByEmail($address); if ($user instanceof eZUser) { self::removeByUserID($user->attribute('contentobject_id')); } }
/** * Check if user login is required. If so, use login handler to redirect user. * * @deprecated As of 4.4, moved to {@link eZUserLoginHandler::preCheck()} * @param array $siteBasics * @param eZURI $uri * @return array|true|false|null An associative array on redirect with 'module' and 'function' keys, true on successful * and false/null on #fail. */ function eZCheckUser(array &$siteBasics, eZURI $uri) { eZDebug::writeStrict('Function eZCheckUser() has been deprecated in 4.4 in favor of eZUserLoginHandler::preCheck()', 'Deprecation'); if (!$siteBasics['user-object-required']) { return null; } $ini = eZINI::instance(); $requireUserLogin = $ini->variable('SiteAccessSettings', 'RequireUserLogin') == 'true'; $forceLogin = false; if (eZSession::hasStarted()) { $http = eZHTTPTool::instance(); $forceLogin = $http->hasSessionVariable(eZUserLoginHandler::FORCE_LOGIN); } if (!$requireUserLogin && !$forceLogin) { return null; } return eZUserLoginHandler::checkUser($siteBasics, $uri); }
/** * Returns true if the user is a registered and not anonymous user. * * @deprecated since 5.1 Use isRegistered() / isUserLoggedIn() instead. */ public function isLoggedIn() { eZDebug::writeStrict("Method " . __METHOD__ . " has been deprecated in 5.1. Use isRegistered() / isUserLoggedIn() instead.", "Deprecation"); return $this->isRegistered(); }
/** * Will make sure that all extensions that has settings directories * are added to the eZINI override list. * * @param string $extensionType See {@link eZExtension::activeExtensions()}, value of false is deprecated as of 4.4 * @param eZINI|null $siteINI Optional parameter to be able to only do change on specific instance of site.ini */ static function activateExtensions( $extensionType = 'default', eZINI $siteINI = null ) { if ( $siteINI === null ) { $siteINI = eZINI::instance(); } if ( $extensionType === false ) { eZDebug::writeStrict( "Setting parameter \$extensionType to false is deprecated as of 4.4, see doc/bc/4.4!", __METHOD__ ); } $extensionDirectory = self::baseDirectory(); $activeExtensions = self::activeExtensions( $extensionType, $siteINI ); $hasExtensions = false; foreach ( $activeExtensions as $activeExtension ) { $extensionSettingsPath = $extensionDirectory . '/' . $activeExtension . '/settings'; if ( $extensionType === 'access' ) $siteINI->prependOverrideDir( $extensionSettingsPath, true, 'extension:' . $activeExtension, 'sa-extension' ); else $siteINI->prependOverrideDir( $extensionSettingsPath, true, 'extension:' . $activeExtension, 'extension' ); if ( isset( $GLOBALS['eZCurrentAccess'] ) ) self::prependSiteAccess( $activeExtension, $GLOBALS['eZCurrentAccess']['name'], $siteINI ); $hasExtensions = true; } if ( $hasExtensions ) $siteINI->load(); }
/** * @deprecated Since 5.0 */ static function createVersionNameJoinsSQLString($useVersionName, $includeAnd = true, $onlyTranslated = false, $lang = false, $treeTableName = 'ezcontentobject_tree') { eZDebug::writeStrict('Method ' . __METHOD__ . ' has been deprecated in 5.0', 'Deprecation'); $versionNameJoins = ''; if ($useVersionName) { if ($includeAnd) { $versionNameJoins .= ' AND '; } $versionNameJoins .= " {$treeTableName}.contentobject_id = ezcontentobject_name.contentobject_id and\n {$treeTableName}.contentobject_version = ezcontentobject_name.content_version and "; $versionNameJoins .= eZContentLanguage::sqlFilter('ezcontentobject_name', 'ezcontentobject'); } return $versionNameJoins; }
/** * Function to handle bc with code from pre 4.4 that does not know about scopes * * @since 4.4 * @param string|null $scope * @param string $identifier * @param string $dir * @param string $default * @return string */ protected static function selectOverrideScope($scope, $identifier, $dir, $default) { if ($scope !== null) { $def = self::defaultOverrideDirs(); if (isset($def[$scope])) { return $scope; } eZDebug::writeWarning("Undefined override dir scope: '{$scope}' with dir: '{$dir}'", __METHOD__); } if ($identifier === 'siteaccess') { return 'siteaccess'; } else { if ($identifier && strpos($identifier, 'extension:') === 0) { return 'extension'; } else { if (strpos($dir, 'siteaccess') !== false) { return 'siteaccess'; } else { if (strpos($dir, 'extension') !== false) { return 'extension'; } } } } eZDebug::writeStrict("Could not figgure out INI scope for \$identifier: '{$identifier}' with \$dir: '{$dir}', falling back to '{$default}'", __METHOD__); return $default; }
/** * @deprecated Since 4.3, superseded by {@link ezpI18n::tr()} instead * Will be kept for compatability in 4.x. */ function ezx18n($extension, $context, $source, $comment = null, $arguments = null) { eZDebug::writeStrict('Function ezx18n() has been deprecated in 4.3 in favor of ezpI18n::tr()', 'Deprecation'); return ezpI18n::tr($context, $source, $comment, $arguments); }
/** * Sets the INI object * * @param eZINI $ini The eZINI object to set. * * @deprecated Since 4.5 */ static function setDebugINI( $ini ) { eZDebug::writeStrict( __METHOD__ . ' is deprecated as of 4.5.', __METHOD__ ); }
/** * Registers the shutdown function. * @see eZExpiryHandler::shutdown() * @deprecated See EZP-22749 */ public static function registerShutdownFunction() { eZDebug::writeStrict(__METHOD__ . " is deprecated. See EZP-22749.", __METHOD__ . " is deprecated"); }
/** * Returns the content of the variable $var using namespace $namespace, * if $attrs is supplied the result of the attributes is returned. * * @param string $var * @param string $namespace (optional) * @param array $attrs (optional) Deprecated as of 4.4 * @return string|array */ function variable($var, $namespace = '', $attrs = null) { $val = null; $exists = isset($this->Variables[$namespace]) && array_key_exists($var, $this->Variables[$namespace]); if ($exists) { if ($attrs !== null && !empty($attrs)) { eZDebug::writeStrict('$attrs parameter is deprecated as of 4.4', __METHOD__); $element = $this->Variables[$namespace][$var]; foreach ($attrs as $attr) { if (is_object($element)) { if ($element->hasAttribute($attr)) { $element = $element->attribute($attr); } else { return $val; } } else { if (is_array($element)) { if (array_key_exists($attr, $element)) { $val = $element[$attr]; } else { return $val; } } else { return $val; } } $val = $element; } } else { $val = $this->Variables[$namespace][$var]; } } return $val; }
/** * Function to get template instance, load autoloads (operators) and set default settings. * * @deprecated Since 4.3, superseded by {@link eZTemplate::factory()} * Will be kept for compatability in 4.x. * @param string $name (Not supported as it was prevoisly set on same instance anyway) * @return eZTemplate */ function templateInit($name = false) { eZDebug::writeStrict('Function templateInit() has been deprecated in 4.3 in favor of eZTemplate::factory()', 'Deprecation'); return eZTemplate::factory(); }
// Attn: Licensing Dept. eZ Systems AS, Klostergata 30, N-3732 Skien, Norway // // IMPORTANT: THE SOFTWARE IS LICENSED, NOT SOLD. ADDITIONALLY, THE // SOFTWARE IS LICENSED "AS IS," WITHOUT ANY WARRANTIES WHATSOEVER. // READ THE eZ BUL BEFORE USING, INSTALLING OR MODIFYING THE SOFTWARE. // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## // /*! \file ezfindexcontent.php */ /* @type $cli eZCli */ /* @type $script eZScript */ eZDebug::writeStrict( "This cronjob is deprecated in favor of the standard cronjobs/indexcontent.php provided by eZ Publish" ); if ( !$isQuiet ) { $cli->output( "Starting processing pending search engine modifications" ); } // check that solr is enabled and used $eZSolr = eZSearch::getEngine(); if ( !( $eZSolr instanceof eZSolr ) ) { $script->shutdown( 1, 'The current search engine plugin is not eZSolr' ); } $contentObjects = array(); $db = eZDB::instance();
/** * Checks if access is allowed to a module/view based on site.ini[SiteAccessRules]Rules settings * * @see eZModule::accessAllowed() * @deprecated Since 4.4 * @param eZURI $uri * @return array An associative array with: * 'result' => bool Indicates if access is allowed * 'module' => string Module name * 'view' => string View name * 'view_checked' => bool Indicates if view access has been checked */ function accessAllowed(eZURI $uri) { eZDebug::writeStrict('Function accessAllowed() has been deprecated in 4.4 in favor of eZModule::accessAllowed()', 'Deprecation'); return eZModule::accessAllowed($uri); }
/** * Image manager instance * * @package kernel * @deprecated Deprecated as of 4.3, use {@link eZImageManager::factory()} instead. */ function imageInit() { eZDebug::writeStrict( 'Function imageInit() has been deprecated in 4.3 in favor of eZImageManager::factory()', 'Deprecation' ); return eZImageManager::factory(); }