import v1.1.0_RC2 | 2009-09-20

This commit is contained in:
6543 2019-07-17 22:19:00 +02:00
parent 3b7ba80568
commit 38c146901c
2504 changed files with 101817 additions and 62316 deletions

View File

@ -11,7 +11,7 @@

class Application
{
const VERSION = '1.1.0.beta1';
const VERSION = '1.1.0.RC2';

public static $config;
public static $logger;
@ -19,6 +19,8 @@ class Application
public static $acl;
public static $front;

private static $_pathList;

/**
* Used in unit tests
*/
@ -31,14 +33,19 @@ class Application

public static function setIncludePath()
{
$pathList = array(
if (isset(self::$_pathList)) {
// to avoid passing here more than once in unit tests
return;
}

self::$_pathList = array(
'.',
APP_DIR,
APP_DIR.'/libs',
// this should go at the end to avoid clashes with other Zend Framework versions in the machine
get_include_path(),
);
if (!set_include_path(implode(PATH_SEPARATOR, $pathList))) {
if (!set_include_path(implode(PATH_SEPARATOR, self::$_pathList))) {
die('ERROR: couldn\'t execute PHP\'s set_include_path() function in your system.'
.' Please ask your system admin to enable that functionality.');
}
@ -83,6 +90,14 @@ class Application

$config = array();
require $configFile;

// in case config.php is empty (during install)
if (!$config) {
$configFile = APP_DIR . DIRECTORY_SEPARATOR . 'config.default.php';
require $configFile;

}

self::$config = new Zend_Config($config, array('allowModifications' => true));
if(self::$config->environment->installed === null) {
$configFile = APP_DIR . DIRECTORY_SEPARATOR . 'config.default.php';
@ -147,14 +162,18 @@ class Application

public static function setDatabase()
{
self::$config->database->params->driver_options = array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true);
// constant not set if pdo_mysql extension is not loaded
if (defined('PDO::MYSQL_ATTR_USE_BUFFERED_QUERY')) {
self::$config->database->params->driver_options = array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true);
}

$db = Zend_Db::factory(self::$config->database);
if (self::$config->logging->level == Zend_Log::DEBUG) {
$profiler = new Monkeys_Db_Profiler();
$db->setProfiler($profiler);
}
Zend_Db_Table_Abstract::setDefaultAdapter($db);
// unknown PHP bug (tested on PHP 2.8 and PHP 2.10) corrupts the $db reference, so I gotta retrieve it again:
// unknown PHP bug (tested on PHP 5.2.8 and PHP 5.2.10) corrupts the $db reference, so I gotta retrieve it again:
$db = Zend_Db_Table_Abstract::getDefaultAdapter();
Zend_Registry::set('db', $db);


1
BUGS
View File

@ -0,0 +1 @@

View File

@ -1,4 +1,48 @@
2009-08-21 Reiner Jung <reiner@kb-m.com>
2009-09-18 / 1.1.0-RC2 / Reiner Jung <reiner@kb-m.com>

NEW FEATURES:

- During installation, ask for desired admin user username and
password, instead of using the default admin/admin. The admin's E-mail
is set to the support E-mail provided in that same form.
- Language updates.

FIXED BUGS:

- Set admin user creation date upon installation, to the current date.
- Not count unconfirmed users in the Trusted Sites stats graph.

2009-09-07 / 1.1.0-RC1 / Reiner Jung <reiner@kb-m.com>

NEW FEATURES:

- Clear button in Manage Users section will clear search input box, and
restore the current filtered list.
- Updated translation strings
- Added i18n to the account reminder E-mail template
- When browsing users, show the number of reminders sent to unconfirmed
users, in the status column.
- Upgraded Zend Framework to latest stable version, 1.9.2
- Completely removed the requirement of having to enable short tags in
php.ini

FIXED BUGS:

- Fixed return on denied immediate request
- Wasn't forgetting user after closing browser, when not using the
Remember Me feature
- Fixed issues with the unconfirmed user message reminders
- Clean error message when attempting to install with empty config.php file
- Fixed warning message when pdo_mysql extension is not loaded. Note
that that extension still isn't a requirement, since we're still using
mysqli
- Fixed small installation issue when installing directly on the web
root dir
- After the upgrade process finishes, log out the user to avoid problems
when the users table structure changes.


2009-08-21 / 1.1.0BETA / Reiner Jung <reiner@kb-m.com>

NEW FEATURES:

@ -47,7 +91,7 @@ NEW REQUIREMENTS:

- Minimal supported PHP version is 5.2.4

2009-04-21 Reiner Jung <reiner@kb-m.com>
2009-04-21 / 1.0.0 / Reiner Jung <reiner@kb-m.com>

NEW FEATURES:


View File

@ -10,6 +10,7 @@ Patch contribution

Translations

* Swedish Translation from Peter Kindström
* Polish Translation from Piotr Baranowski
* Dutch Translation from Stanley Westerveld


261
Setup.php
View File

@ -1,261 +0,0 @@
<?php

/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkey Ltd
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/

class Setup
{
const VERSION = '1.0.0_RC2';

public static $config;
public static $logger;
public static $mockLogger;
public static $acl;
public static $front;

/**
* Used in unit tests
*/
public static function cleanUp()
{
Zend_Registry::_unsetInstance();
Zend_Layout::resetMvcInstance();
Zend_Controller_Action_HelperBroker::resetHelpers();
}

public static function setIncludePath()
{
$pathList = array(
get_include_path(),
APP_DIR,
APP_DIR.'/libs',
APP_DIR.'/modules/default/models',
APP_DIR.'/modules/default/forms',
APP_DIR.'/modules/users/models',
APP_DIR.'/modules/users/forms',
APP_DIR.'/modules/stats/models',
APP_DIR.'/modules/install/forms',
);
if (!set_include_path(implode(PATH_SEPARATOR, $pathList))) {
die('ERROR: couldn\'t execute PHP\'s set_include_path() function in your system.'
.' Please ask your system admin to enable that functionality.');
}
}

public static function setAutoLoader()
{
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
}

public static function setConfig()
{
if (file_exists(APP_DIR . DIRECTORY_SEPARATOR . 'config.php')) {
$configFile = APP_DIR . DIRECTORY_SEPARATOR . 'config.php';
} else {
$configFile = APP_DIR . DIRECTORY_SEPARATOR . 'config.default.php';
}

$config = array();
require $configFile;
self::$config = new Zend_Config($config, array('allowModifications' => true));
if(self::$config->environment->installed === null) {
$configFile = APP_DIR . DIRECTORY_SEPARATOR . 'config.default.php';
require $configFile;
self::$config = new Zend_Config($config, array('allowModifications' => true));
}

// @todo: remove this when all interconnected apps use the same LDAP source
self::$config->environment->app = 'communityid';

Zend_Registry::set('config', self::$config);
}

public static function setErrorReporting()
{
ini_set('log_errors', 'Off');
if (self::$config->environment->production) {
error_reporting(E_ALL & E_NOTICE);
ini_set('display_errors', 'Off');
} else {
error_reporting(E_ALL);
ini_set('display_errors', 'On');
}
}

public static function setLogger($addMockWriter = false)
{
self::$logger = new Zend_Log();
if (self::$config->logging->level == 0) {
self::$logger->addWriter(new Zend_Log_Writer_Null(APP_DIR . '/log.txt'));
} else {
if (is_writable(self::$config->logging->location)) {
$file = self::$config->logging->location;
} else if (!is_writable(APP_DIR . DIRECTORY_SEPARATOR . self::$config->logging->location)) {
throw new Exception('Couldn\'t find log file, or maybe it\'s not writable');
} else {
$file = APP_DIR . DIRECTORY_SEPARATOR . self::$config->logging->location;
}

self::$logger->addWriter(new Zend_Log_Writer_Stream($file));
if ($addMockWriter) {
self::$mockLogger = new Zend_Log_Writer_Mock();
self::$logger->addWriter(self::$mockLogger);
}
}
self::$logger->addFilter(new Zend_Log_Filter_Priority((int)self::$config->logging->level));
Zend_Registry::set('logger', self::$logger);
}

public static function logRequest()
{
if (isset($_SERVER['REQUEST_URI'])) {
self::$logger->log('REQUESTED URI: ' . $_SERVER['REQUEST_URI'], Zend_Log::INFO);
} else {
self::$logger->log('REQUESTED THROUGH CLI: ' . $GLOBALS['argv'][0], Zend_Log::INFO);
}

if (isset($_POST) && $_POST) {
self::$logger->log('POST payload: ' . print_r($_POST, 1), Zend_Log::INFO);
}
}

public static function setDatabase()
{
self::$config->database->params->driver_options = array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true);
$db = Zend_Db::factory(self::$config->database);
if (self::$config->logging->level == Zend_Log::DEBUG) {
$profiler = new Monkeys_Db_Profiler();
$db->setProfiler($profiler);
}
Zend_Db_Table_Abstract::setDefaultAdapter($db);
Zend_Registry::set('db', $db);

try {
$db->getConnection();
return true;
} catch (Zend_Db_Adapter_Exception $e) {
return false;
}
}

public static function setSession()
{
// The framework doesn't provide yet a clean way of doing this
if (isset($_POST['rememberme'])) {
Zend_Session::rememberMe();
}

// ZF still doesn't have facilities for session_name().
session_name(self::$config->environment->session_name);

$appSession = new Zend_Session_Namespace('Default');
if (is_null($appSession->messages)) {
$appSession->messages = array();
}
Zend_Registry::set('appSession', $appSession);
}

public static function setAcl()
{
self::$acl = new Zend_Acl();
require 'Acl.php';

foreach ($privileges as $module => $moduleConfig) {
foreach ($moduleConfig as $controller => $controllerConfig) {
self::$acl->add(new Zend_Acl_Resource($module . '_' . $controller));
foreach ($controllerConfig as $action => $role) {
self::$acl->allow($role, $module . '_' . $controller, $action);
}
}
}
Zend_Registry::set('acl', self::$acl);
}

public static function setI18N()
{
if (self::$config->environment->locale == 'auto') {
$locale = new Zend_Locale(Zend_Locale::BROWSER);
} else {
$locale = new Zend_Locale(self::$config->environment->locale);
}
Zend_Registry::set('Zend_Locale', $locale);
$translate = new Zend_Translate('gettext',
APP_DIR . '/languages',
$locale->toString(),
array(
'scan' => Zend_Translate::LOCALE_DIRECTORY,
'disableNotices' => true));
Zend_Registry::set('Zend_Translate', $translate);

return $translate;
}

public static function setLayout()
{
$template = self::$config->environment->template;

// Hack: Explicitly add the ViewRenderer, so that when an exception is thrown,
// the layout is not shown (should be better handled in ZF 1.6)
// @see http://framework.zend.com/issues/browse/ZF-2993?focusedCommentId=23121#action_23121
Zend_Controller_Action_HelperBroker::addHelper(new Zend_Controller_Action_Helper_ViewRenderer());

Zend_Layout::startMvc(array(
'layoutPath' => $template == 'default'? APP_DIR.'/views/layouts' : APP_DIR."/views/layouts_$template",
));
}

public static function setFrontController()
{
self::$front = Zend_Controller_Front::getInstance();
self::$front->registerPlugin(new Monkeys_Controller_Plugin_Auth(self::$acl));
self::$front->addModuleDirectory(APP_DIR.'/modules');

$router = self::$front->getRouter();

if (self::$config->subdomain->enabled) {
if (self::$config->subdomain->use_www) {
$reqs = array('username' => '([^w]|w[^w][^w]|ww[^w]|www.+).*');
} else {
$reqs = array();
}
$hostNameRoute = new Zend_Controller_Router_Route_Hostname(
':username.' . self::$config->subdomain->hostname,
array(
'module' => 'default',
'controller' => 'identity',
'action' => 'id',
),
$reqs
);
$router->addRoute('hostNameRoute', $hostNameRoute);
}

$route = new Zend_Controller_Router_Route(
'identity/:userid',
array(
'module' => 'default',
'controller' => 'identity',
'action' => 'id',
),
array('userid' => '[\w-]*')
);
$router->addRoute('identityRoute', $route);
}

public static function dispatch()
{
self::$front->dispatch();
}
}

/**
* this is just a global function used to mark translations
*/
function translate() {}

View File

@ -17,7 +17,6 @@ $config['environment']['registrations_enabled'] = {environment.registrations_ena
$config['environment']['locale'] = '{environment.locale}';

$config['environment']['template'] = '{environment.template}';
$config['environment']['news_feed'] = '{environment.news_feed}';


#

View File

@ -6,7 +6,7 @@
<link rel="shortcut icon" href="webdir/favicon.ico" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/assets/reset-fonts-grids/reset-fonts-grids.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css">
<link rel="stylesheet" href="webdir/styles/style.css?v=<?= $this->version ?>" type="text/css" media="screen" charset="utf-8"/>
<link rel="stylesheet" href="webdir/styles/style.css" type="text/css" media="screen" charset="utf-8"/>
</head>
<body class="yui-skin-sam">
<div id="doc4">
@ -35,7 +35,7 @@
</div>
<div id="ft">
<div id="copyright">
<p>Copyright &#169; 2008-2009 Keyboard Monkeys Ltd. Community as a service &#x2122;</p>
<p>Copyright &#169; 2008-2009 Keyboard Monkeys Ltd. Community as a Service &#x2122;</p>
</div>
</div>
</div>

Binary file not shown.

View File

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Community-ID English translation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-15 00:13+0100\n"
"PO-Revision-Date: 2009-05-15 00:21+0100\n"
"POT-Creation-Date: 2009-09-16 18:54+0100\n"
"PO-Revision-Date: 2009-09-16 19:08+0100\n"
"Last-Translator: Reiner Jung <reiner@kb-m.com>\n"
"Language-Team: Reiner <reiner@kb-m.com>\n"
"MIME-Version: 1.0\n"
@ -28,48 +28,60 @@ msgid "'%value%' is not a valid email address in the basic format local-part@hos
msgstr "'%value%' ist keine gültige E-Mail Adresse im Format name@domain"

#: modules/default/forms/ErrorMessages.php:22
msgid "'%hostname%' is not a valid hostname for email address '%value%'"
msgstr "'%hostname%' ist ein nicht gültiger hostname für die E-Mail-Adresse '%value%'"

#: modules/default/forms/ErrorMessages.php:23
msgid "'%value%' appears to be a DNS hostname but cannot match TLD against known list"
msgstr ""

#: modules/default/forms/ErrorMessages.php:24
msgid "'%value%' appears to be a local network name but local network names are not allowed"
msgstr "'%value%' schaut aus wie ein lokales Netzwerk jedoch sind lokale Netzwerke nicht erlaubt"

#: modules/default/forms/ErrorMessages.php:25
msgid "Captcha value is wrong"
msgstr "Captcha-Wert ist falsch"

#: modules/default/forms/ErrorMessages.php:23
#: modules/default/forms/ErrorMessages.php:26
msgid "Password confirmation does not match"
msgstr "Das eingegebene Password stimmt nicht überein "

#: modules/default/forms/FeedbackForm.php:25
msgid "Enter your name"
msgstr "Geben Sie Ihren Namen ein"
#: modules/default/forms/ErrorMessages.php:27
msgid "Username can only contain US-ASCII alphanumeric characters, plus any of the symbols $-_.+!*'(), and \""
msgstr "Benutzername kann nur US-ASCII-alphanumerische Zeichen beinhalten sowie die Symbole $-_.+!*'(),-und \""

#: modules/default/forms/FeedbackForm.php:30
msgid "Enter your E-mail"
msgstr "Geben Sie ihre E-Mail Adresse ein"
#: modules/default/forms/OpenidLogin.php:27
msgid "OpenID URL"
msgstr "OpenID URL"

#: modules/default/forms/FeedbackForm.php:37
msgid "Enter your questions or comments"
msgstr "Geben Sie Ihre Fragen oder Kommentare ein"

#: modules/default/forms/FeedbackForm.php:44
msgid "Please enter the text below"
msgstr "Bitte geben Sie den folgenden Text ein"

#: modules/default/forms/OpenidLoginForm.php:17
msgid "Username"
msgstr "Benutzername"

#: modules/default/forms/OpenidLoginForm.php:22
#: modules/default/forms/OpenidLogin.php:34
msgid "Password"
msgstr "Passwort"

#: modules/default/forms/MessageUsersForm.php:17
msgid "Subject:"
msgstr "Betreff:"
#: modules/default/forms/MessageUsers.php:17
msgid "Subject"
msgstr "Thema:"

#: modules/default/forms/MessageUsersForm.php:22
msgid "CC:"
msgstr "CC:"
#: modules/default/forms/MessageUsers.php:22
msgid "CC"
msgstr "CC"

#: modules/default/forms/MessageUsersForm.php:26
msgid "Body:"
msgstr "Body:"
#: modules/default/forms/Feedback.php:25
msgid "Enter your name"
msgstr "Geben Sie Ihren Namen ein"

#: modules/default/forms/Feedback.php:30
msgid "Enter your E-mail"
msgstr "Geben Sie ihre E-Mail Adresse ein"

#: modules/default/forms/Feedback.php:37
msgid "Enter your questions or comments"
msgstr "Geben Sie Ihre Fragen oder Kommentare ein"

#: modules/default/forms/Feedback.php:44
msgid "Please enter the text below"
msgstr "Bitte geben Sie den folgenden Text ein"

#: modules/default/models/Field.php:39
msgid "Male"
@ -79,47 +91,47 @@ msgstr "Mann"
msgid "Female"
msgstr "Frau"

#: modules/default/models/Fields.php:32
#: modules/default/models/Fields.php:45
msgid "Nickname"
msgstr "Spitzname"

#: modules/default/models/Fields.php:33
#: modules/default/models/Fields.php:46
msgid "E-mail"
msgstr "E-mail"

#: modules/default/models/Fields.php:34
#: modules/default/models/Fields.php:47
msgid "Full Name"
msgstr "Kompletter Name"

#: modules/default/models/Fields.php:35
#: modules/default/models/Fields.php:48
msgid "Date of Birth"
msgstr "Geburtsdatum"

#: modules/default/models/Fields.php:36
#: modules/default/models/Fields.php:49
msgid "Gender"
msgstr "Geschlecht"

#: modules/default/models/Fields.php:37
#: modules/default/models/Fields.php:50
msgid "Postal Code"
msgstr "Postleitzahl"

#: modules/default/models/Fields.php:38
#: modules/default/models/Fields.php:51
msgid "Country"
msgstr "Land"

#: modules/default/models/Fields.php:39
#: modules/default/models/Fields.php:52
msgid "Language"
msgstr "Sprache"

#: modules/default/models/Fields.php:40
#: modules/default/models/Fields.php:53
msgid "Time Zone"
msgstr "Zeitzone"

#: modules/default/controllers/IndexController.php:50
#: modules/default/controllers/CidController.php:29
msgid "Could not retrieve news items"
msgstr "Neue Nachrichten konnten nicht abgerufen werden"

#: modules/default/controllers/IndexController.php:65
#: modules/default/controllers/CidController.php:47
msgid "Read More"
msgstr "Mehr lesen"

@ -127,6 +139,31 @@ msgstr "Mehr lesen"
msgid "CC field must be a comma-separated list of valid E-mails"
msgstr "Das CC Feld erlaubt ein Komma-separierte Liste mit gültigen E-Mails"

#: modules/news/forms/Article.php:18
msgid "Title"
msgstr "Titel"

#: modules/news/forms/Article.php:24
msgid "Publication date"
msgstr "Veröffentlichungs Datum"

#: modules/news/forms/Article.php:32
msgid "Excerpt"
msgstr "Auszug"

#: modules/news/controllers/EditController.php:60
#: modules/news/controllers/EditController.php:90
msgid "The article doesn't exist."
msgstr "Dieser Artikel existiert nicht"

#: modules/news/controllers/EditController.php:81
msgid "The article has been saved."
msgstr "Der Artikel wurde gespeichert"

#: modules/news/controllers/EditController.php:93
msgid "The article has been deleted."
msgstr "Der Artikel wurde gelöscht."

#: modules/stats/controllers/SitesController.php:68
msgid "Trusted sites"
msgstr "Vertrauenswürdige Seiten"
@ -135,46 +172,70 @@ msgstr "Vertrauenswürdige Seiten"
msgid "Sites per user"
msgstr "Seiten pro Benutzer"

#: modules/install/controllers/CredentialsController.php:185
#: modules/install/forms/UpgradeLogin.php:18
msgid "Username"
msgstr "Benutzername"

#: modules/install/controllers/UpgradeController.php:57
#: modules/install/controllers/UpgradeController.php:65
msgid "Invalid credentials"
msgstr "Ungültige Anmeldeinformationen"

#: modules/install/controllers/UpgradeController.php:73
#, php-format
msgid "Upgrade was successful. You are now on version %s"
msgstr "Upgrade erfolgreich. Sie benutzen jetzt Version %s"

#: modules/install/controllers/UpgradeController.php:102
#, php-format
msgid "Correct before upgrading: File %s is required to proceed"
msgstr "Korrigieren Sie vor dem Upgrade: Die Datei %s ist erforderlich, um fortzufahren"

#: modules/install/controllers/CredentialsController.php:200
#, php-format
msgid "The directory where Community-ID is installed must be writable by the web server user (%s). Another option is to create an EMPTY config.php file that is writable by that user."
msgstr "Der Ordner in welchem Community-ID installiert wurde beschreibbar sein für der Webserver Benutzer (%s). Eine andere Option ist eine LEERE config.php Datei zu erstellen und diese beschreibbar zu machen für diesen Benutzer."

#: modules/install/controllers/CredentialsController.php:188
#: modules/install/controllers/CredentialsController.php:203
#, php-format
msgid "The directory \"captchas\" under the web directory for Community-ID must be writable by the web server user (%s)"
msgstr "Der Webserver Benutzer (%s) muss Schreibrechte haben für den Ordner \"catchas\" "

#: modules/users/forms/ChangePasswordForm.php:18
#: modules/users/forms/AccountInfoForm.php:50
msgid "Enter password"
msgstr "Passwort eingeben"
#: modules/install/controllers/CredentialsController.php:206
#, php-format
msgid "You need to have the %s extension installed"
msgstr "Sie müssen die Erweiterung %s installiert haben"

#: modules/users/forms/ChangePasswordForm.php:24
#: modules/users/forms/AccountInfoForm.php:56
#: modules/users/forms/RegisterForm.php:54
msgid "Enter password again"
msgstr "Passwort erneut eingeben"

#: modules/users/forms/AccountInfoForm.php:30
#: modules/users/forms/RegisterForm.php:26
msgid "First Name"
msgstr "Vorname"

#: modules/users/forms/AccountInfoForm.php:35
#: modules/users/forms/RegisterForm.php:31
msgid "Last Name"
msgstr "Nachname"

#: modules/users/forms/LoginForm.php:8
#: modules/users/forms/Login.php:18
msgid "USERNAME"
msgstr "BENUTZERNAME"

#: modules/users/forms/LoginForm.php:13
#: modules/users/forms/Login.php:27
msgid "PASSWORD"
msgstr "PASSWORT"

#: modules/users/forms/RegisterForm.php:48
#: modules/users/forms/ChangePassword.php:18
#: modules/users/forms/AccountInfo.php:52
msgid "Enter password"
msgstr "Passwort eingeben"

#: modules/users/forms/ChangePassword.php:24
#: modules/users/forms/Register.php:55
#: modules/users/forms/AccountInfo.php:58
msgid "Enter password again"
msgstr "Passwort erneut eingeben"

#: modules/users/forms/Register.php:26
#: modules/users/forms/AccountInfo.php:32
msgid "First Name"
msgstr "Vorname"

#: modules/users/forms/Register.php:31
#: modules/users/forms/AccountInfo.php:37
msgid "Last Name"
msgstr "Nachname"

#: modules/users/forms/Register.php:49
msgid "Enter desired password"
msgstr "Geben Sie das gewünschte Passwort ein"

@ -182,6 +243,10 @@ msgstr "Geben Sie das gewünschte Passwort ein"
msgid "User has been deleted successfully"
msgstr "Der Benutzer wurde erfolgreich gelöscht "

#: modules/users/controllers/ManageusersController.php:42
msgid "Community-ID registration reminder"
msgstr "Erinnerung Ihrer Community-ID Registrierung"

#: modules/users/controllers/ProfilegeneralController.php:76
#: modules/users/controllers/RegisterController.php:59
msgid "This username is already in use"
@ -192,19 +257,19 @@ msgstr "Dieser Benutzername ist vergeben"
msgid "This E-mail is already in use"
msgstr "Diese E-Mail Adresse wird schon verwendet"

#: modules/users/controllers/ProfilegeneralController.php:243
#: modules/users/controllers/ProfilegeneralController.php:247
msgid "Your acccount has been successfully deleted"
msgstr "Ihr Benutzerkonto wurde erfolgreich gelöscht"

#: modules/users/controllers/UserslistController.php:50
#: modules/users/controllers/UserslistController.php:52
msgid "admin"
msgstr "Administrator"

#: modules/users/controllers/UserslistController.php:52
#: modules/users/controllers/UserslistController.php:54
msgid "confirmed"
msgstr "bestätigt"

#: modules/users/controllers/UserslistController.php:54
#: modules/users/controllers/UserslistController.php:56
msgid "unconfirmed"
msgstr "nicht bestätigt"

@ -212,6 +277,10 @@ msgstr "nicht bestätigt"
msgid "Sorry, registrations are currently disabled"
msgstr "Sorry, die Anmeldung ist zur Zeit nicht möglich"

#: modules/users/controllers/RegisterController.php:101
msgid "Community-ID registration confirmation"
msgstr "Bestätigung der Community-ID Registrierung"

#: modules/users/controllers/RegisterController.php:104
msgid "Thank you."
msgstr "Vielen Dank"
@ -224,9 +293,15 @@ msgstr "Es wird Ihnen eine E-Mail zu-gesendet mit Informationen wie Sie das Ben
msgid "The account was created but the E-mail could not be sent"
msgstr "Das Benutzerkonto wurde erstellt aber die E-Mail konnte nicht versendet werden"

#: modules/users/controllers/RegisterController.php:222
msgid "Community-ID registration confirmation"
msgstr "Bestätigung der Community-ID Registrierung"
#: modules/users/controllers/RegisterController.php:121
#: modules/users/controllers/RegisterController.php:150
#: modules/users/controllers/RegisterController.php:165
msgid "Invalid token"
msgstr "Ungültiger Token "

#: modules/users/controllers/RegisterController.php:156
msgid "Your account has been deleted"
msgstr "Ihr Benutzerkonto wurde gelöscht"

#: modules/users/controllers/RecoverpasswordController.php:51
msgid "This E-mail is not registered in the system"
@ -385,6 +460,30 @@ msgstr "vorherige"
msgid "IP"
msgstr "IP"

#: webdir/javascript/language.php:65
msgid "Delete unconfirmed accounts older than how many days?"
msgstr "Unbestätigte Konten löschen älter als, wie viele Tage?"

#: webdir/javascript/language.php:66
msgid "The value entered is incorrect"
msgstr "Der eingegebene Wert ist nicht korrekt "

#: webdir/javascript/language.php:67
msgid "Send reminder to accounts older than how many days?"
msgstr "Erinnerung senden von Konten älter als, wie viele Tage?"

#: webdir/javascript/language.php:68
msgid "Are you sure you wish to delete this article?"
msgstr "Sind Sie sicher das Sie diesen Artikel löschen möchten?"

#: webdir/javascript/language.php:69
msgid "reminder"
msgstr "Erinnerung"

#: webdir/javascript/language.php:70
msgid "reminders"
msgstr "Erinnerungen"

#: libs/Monkeys/Form/Element/Country.php:36
msgid "-- Select a Country --"
msgstr "-- Wählen Sie ein Land --"
@ -450,19 +549,35 @@ msgid "In order to serve you better, we have provided the form below for your qu
msgstr "Um unseren Service zu verbessern, haben Sie die Möglichkeit das untenstehende Formular für Ihre Fragen und Kommentare zu benutzen"

#: modules/default/views/scripts/feedback/index.phtml:7
#: modules/default/views/scripts/messageusers/index.phtml:39
#: modules/default/views/scripts/messageusers/index.phtml:29
msgid "Send"
msgstr "Senden"

#: modules/default/views/scripts/identity/id.phtml:2
msgid "This is the identity page for the Community-ID user identified with:"
msgstr " "

#: modules/default/views/scripts/cid/index.phtml:1
msgid "About Community-ID"
msgstr "Über Community-ID"

#: modules/default/views/scripts/cid/index.phtml:3
msgid "Version installed:"
msgstr "Installierte Version"

#: modules/default/views/scripts/cid/index.phtml:8
msgid "Latest news from Community-ID:"
msgstr "Letzen News von Community-ID:"

#: modules/default/views/scripts/messageusers/index.phtml:9
msgid "This message will be sent to all registered Community-ID users"
msgstr "Diese Nachricht wird an alle registrierten Community-ID Benutzer gesendet"

#: modules/default/views/scripts/messageusers/index.phtml:18
#: modules/default/views/scripts/messageusers/index.phtml:16
msgid "switch to Plain-Text"
msgstr "Zu Plain-Text umschalten"

#: modules/default/views/scripts/messageusers/index.phtml:21
#: modules/default/views/scripts/messageusers/index.phtml:19
msgid "switch to Rich-Text (HTML)"
msgstr "Zu Rich-Text umschalten (HTML)"

@ -470,6 +585,27 @@ msgstr "Zu Rich-Text umschalten (HTML)"
msgid "Privacy Policy"
msgstr "Datenschutzrichtlinie"

#: modules/default/views/scripts/index/index-en.phtml:39
#: modules/default/views/scripts/index/index-sv.phtml:49
#: modules/default/views/scripts/index/index-de.phtml:39
#: modules/default/views/scripts/index/index-es.phtml:37
msgid "There are no news articles yet"
msgstr "Es gibt noch keine News-Artikel"

#: modules/default/views/scripts/index/index-en.phtml:46
#: modules/default/views/scripts/index/index-sv.phtml:56
#: modules/default/views/scripts/index/index-de.phtml:46
#: modules/default/views/scripts/index/index-es.phtml:44
msgid "View All"
msgstr "Alle anzeigen"

#: modules/default/views/scripts/index/index-en.phtml:50
#: modules/default/views/scripts/index/index-sv.phtml:60
#: modules/default/views/scripts/index/index-de.phtml:50
#: modules/default/views/scripts/index/index-es.phtml:48
msgid "Add New Article"
msgstr "Neuen Artikel hinzufügen "

#: modules/default/views/scripts/openid/trust.phtml:3
#, php-format
msgid "A site identifying as %s has asked for confirmation that %s is your identity URL."
@ -504,7 +640,7 @@ msgstr "Erlauben"
msgid "Deny"
msgstr "Verbieten"

#: modules/default/views/scripts/openid/login.phtml:5
#: modules/default/views/scripts/openid/login.phtml:9
msgid "Login"
msgstr "Anmelden "

@ -524,13 +660,44 @@ msgstr "OK"
msgid "Clear History"
msgstr "Historie löschen"

#: modules/default/views/scripts_monkeys/index/subheader.phtml:3
msgid "Fed up with having to remember dozens of<br />usernames and passwords<br />for your favorite websites?"
msgstr "Starting"
#: modules/news/views/scripts/edit/index.phtml:8
msgid "Save"
msgstr "Speichern"

#: modules/default/views/scripts_monkeys/index/subheader.phtml:4
msgid "Starting today<br />you'll only have to remember one"
msgstr "Von heute an müssen<br /> Sie sich nur noch eins erinnern"
#: modules/news/views/scripts/edit/index.phtml:9
msgid "Cancel"
msgstr "Abbrechen"

#: modules/news/views/scripts/view/index.phtml:3
#, php-format
msgid "Published on %s"
msgstr "Veröffentlicht am %s"

#: modules/news/views/scripts/view/index.phtml:6
msgid "Edit Article"
msgstr "Artikel bearbeiten"

#: modules/news/views/scripts/view/index.phtml:7
msgid "Delete Article"
msgstr "Artikel löschen"

#: modules/news/views/scripts/index/pagination.phtml:10
#: modules/news/views/scripts/index/pagination.phtml:13
msgid "Previous"
msgstr "Vorherige"

#: modules/news/views/scripts/index/pagination.phtml:30
#: modules/news/views/scripts/index/pagination.phtml:33
msgid "Next"
msgstr "Nächste"

#: modules/news/views/scripts/index/index.phtml:3
msgid "Latest News"
msgstr "Letzte News"

#: modules/news/views/scripts/index/index.phtml:21
msgid "read more"
msgstr "Mehr lesen "

#: modules/stats/views/scripts/authorizations/index.phtml:1
msgid "Authorizations per day"
@ -579,14 +746,26 @@ msgstr "%s Benutzer"
msgid "The installation was performed successfully"
msgstr "Die Installation war erfolgreich"

#: modules/install/views/scripts/complete/index.phtml:6
msgid "You can login as the administrator with the username and password you just provided."
msgstr "Sie können sich als Administrator mit dem Benutzernamen und Passwort anmelden welches Sie gerade festgelegt haben."

#: modules/install/views/scripts/complete/index.phtml:7
msgid "Please note that this user is only meant for administrative tasks, and cannot have an OpenID credential."
msgstr "Bitte beachten Sie, dass dieser Benutzer nur für administrative Aufgaben genutzt werden kann jedoch keine OpenID Konto."

#: modules/install/views/scripts/complete/index.phtml:10
msgid "Finish"
msgstr "Beenden "

#: modules/install/views/scripts/credentials/index.phtml:2
#: modules/install/views/scripts/credentials/index.phtml:3
msgid "Database and E-mail information"
msgstr "Datenbank und E-Mail informationen"

#: modules/install/views/scripts/credentials/index.phtml:13
msgid "Administrator User Information"
msgstr "Administrator Benutzerinformationen "

#: modules/install/views/scripts/index/index.phtml:2
msgid "This Community-ID instance hasn't been installed yet"
msgstr "Diese Community-ID Installation wurde noch nicht installiert"
@ -595,6 +774,18 @@ msgstr "Diese Community-ID Installation wurde noch nicht installiert"
msgid "Proceed with installation"
msgstr "Mit der Installation fortfahren"

#: modules/install/views/scripts/upgrade/index.phtml:1
msgid "New version detected"
msgstr "Neue Version gefunden"

#: modules/install/views/scripts/upgrade/index.phtml:3
msgid "Enter the administrator credentials to proceed with the upgrade:"
msgstr "Geben Sie die Administrator-Anmeldeinformationen ein um mit dem Upgrade fortzufahren:"

#: modules/install/views/scripts/upgrade/index.phtml:6
msgid "Make sure you make a copy of the database before, just in case"
msgstr "Machen Sie eine Kopie der Datenbank, nur für den Fall"

#: modules/install/views/scripts/permissions/index.phtml:2
msgid "Please correct the following problems before proceeding:"
msgstr "Bitte korrigieren Sie die folgenden Probleme bevor Sie fortfahren:"
@ -612,102 +803,118 @@ msgstr "Hallo, %s"
msgid "Account"
msgstr "Benutzerkonto"

#: modules/users/views/scripts/login/index.phtml:10
#: modules/users/views/scripts/login/index.phtml:11
msgid "Personal Info"
msgstr "Persönliche Informationen "

#: modules/users/views/scripts/login/index.phtml:13
#: modules/users/views/scripts/login/index.phtml:14
msgid "Sites database"
msgstr "Gespeicherte Seiten"

#: modules/users/views/scripts/login/index.phtml:16
#: modules/users/views/scripts/login/index.phtml:17
msgid "History Log"
msgstr "Historie"

#: modules/users/views/scripts/login/index.phtml:19
#: modules/users/views/scripts/login/index.phtml:21
msgid "Logout"
msgstr "Abmelden"

#: modules/users/views/scripts/login/index.phtml:24
#: modules/users/views/scripts/login/index.phtml:26
msgid "Admin options"
msgstr "Administration "

#: modules/users/views/scripts/login/index.phtml:27
#: modules/users/views/scripts/login/index.phtml:29
msgid "Manage Users"
msgstr "Benutzer verwalten"

#: modules/users/views/scripts/login/index.phtml:30
#: modules/users/views/scripts/login/index.phtml:32
msgid "Message Users"
msgstr "Nachricht an Benutzer"

#: modules/users/views/scripts/login/index.phtml:34
#: modules/users/views/scripts/login/index.phtml:36
msgid "Disable Maintenance Mode"
msgstr "Wartungsmodus deaktivieren "

#: modules/users/views/scripts/login/index.phtml:36
#: modules/users/views/scripts/login/index.phtml:38
msgid "Enable Maintenance Mode"
msgstr "Wartungsmodus aktivieren"

#: modules/users/views/scripts/login/index.phtml:40
#: modules/users/views/scripts/login/index.phtml:42
msgid "Statistics"
msgstr "Statistiken"

#: modules/users/views/scripts/login/index.phtml:47
#: modules/users/views/scripts/login/index.phtml:52
msgid "User access is currently disabled for system maintenance.<br />Please try again later"
msgstr "Die Anmeldung ist zur Zeit nicht möglich wegen Wartungsarbeiten.<br />Bitte versuchen Sie es zu einem späteren Zeitpunkt nochmals"

#: modules/users/views/scripts/login/index.phtml:58
#: modules/users/views/scripts/login/index.phtml:66
msgid "Remember me"
msgstr "An mich erinnern "

#: modules/users/views/scripts/login/index.phtml:61
#: modules/users/views/scripts/login/index.phtml:69
msgid "Log in"
msgstr "Anmelden"

#: modules/users/views/scripts/login/index.phtml:67
#: modules/users/views/scripts/login/index.phtml:75
msgid "Forgot you password?"
msgstr "Passwort vergessen?"

#: modules/users/views/scripts/login/index.phtml:73
#: modules/users/views/scripts/login/index.phtml:81
msgid "You don't have an account?"
msgstr "Sie haben noch keine Benutzerkonto?"

#: modules/users/views/scripts/login/index.phtml:75
#: modules/users/views/scripts/login/index.phtml:83
msgid "REGISTER NOW!"
msgstr "JETZT ANMELDEN!"

#: modules/users/views/scripts/manageusers/index.phtml:11
msgid "Enter search string"
msgstr "Suchbegriff eingeben"

#: modules/users/views/scripts/manageusers/index.phtml:12
msgid "Go"
msgstr "Gehe"

#: modules/users/views/scripts/manageusers/index.phtml:13
msgid "Clear"
msgstr "Löschen "

#: modules/users/views/scripts/manageusers/index.phtml:16
msgid "All"
msgstr "Alle"

#: modules/users/views/scripts/manageusers/index.phtml:14
#: modules/users/views/scripts/manageusers/index.phtml:19
msgid "Confirmed"
msgstr "Bestätigt"

#: modules/users/views/scripts/manageusers/index.phtml:17
#: modules/users/views/scripts/manageusers/index.phtml:22
msgid "Unconfirmed"
msgstr "Nicht bestätigt"

#: modules/users/views/scripts/manageusers/index.phtml:24
#: modules/users/views/scripts/manageusers/index.phtml:29
msgid "Total users:"
msgstr "Benutzer gesamt:"

#: modules/users/views/scripts/manageusers/index.phtml:25
#: modules/users/views/scripts/manageusers/index.phtml:30
msgid "Total confirmed users:"
msgstr "Anzahl bestätigter Benutzer"

#: modules/users/views/scripts/manageusers/index.phtml:26
#: modules/users/views/scripts/manageusers/index.phtml:31
msgid "Total unconfirmed users:"
msgstr "Anzahl unbestätigter Benutzer"

#: modules/users/views/scripts/manageusers/index.phtml:29
#: modules/users/views/scripts/manageusers/index.phtml:34
msgid "Add User"
msgstr "Benutzer hinzufügen"

#: modules/users/views/scripts/manageusers/index.phtml:31
#: modules/users/views/scripts/manageusers/index.phtml:36
msgid "Delete Unconfirmed Users"
msgstr "Nicht bestätigte Benutzer löschen"

#: modules/users/views/scripts/manageusers/index.phtml:39
msgid "Send Reminder"
msgstr "Erinnerung senden"

#: modules/users/views/scripts/profile/index.phtml:13
msgid "Account info"
msgstr "Benutzerkonto Details"
@ -720,7 +927,7 @@ msgstr "Bearbeiten"
msgid "Change Password"
msgstr "Passwort ändern"

#: modules/users/views/scripts/profile/index.phtml:38
#: modules/users/views/scripts/profile/index.phtml:39
msgid "Delete Account"
msgstr "Konto löschen"

@ -728,19 +935,6 @@ msgstr "Konto löschen"
msgid "OpenID"
msgstr "OpenID"

#: modules/users/views/scripts/profilegeneral/editaccountinfo.phtml:13
#: modules/users/views/scripts/profilegeneral/changepassword.phtml:36
#: modules/users/views/scripts/personalinfo/edit.phtml:42
msgid "Save"
msgstr "Speichern"

#: modules/users/views/scripts/profilegeneral/editaccountinfo.phtml:14
#: modules/users/views/scripts/profilegeneral/changepassword.phtml:37
#: modules/users/views/scripts/profilegeneral/confirmdelete.phtml:23
#: modules/users/views/scripts/personalinfo/edit.phtml:43
msgid "Cancel"
msgstr "Abbrechen"

#: modules/users/views/scripts/profilegeneral/confirmdelete.phtml:3
msgid "Why do you want to delete your Community-ID account?"
msgstr "Warum beabsichtigen Sie Ihr Community-ID Benutzerkonto zu löschen?"
@ -797,41 +991,40 @@ msgstr "Nicht eingegeben"
msgid "This information will be used to automatically populate registration fields to any OpenID transaction that requires so"
msgstr "Diese Informationen werden verwendet, um automatisch alle Felder auszufüllen währen einer OpenID Transaktion"

#: views/layouts_monkeys/layout.phtml:32
#: views/layouts/layout.phtml:32
msgid "Home"
msgstr "Home"

#: views/layouts_monkeys/layout.phtml:35
#: views/layouts/layout.phtml:35
msgid "Feedback"
msgstr "Feedback"

#: views/layouts_monkeys/layout.phtml:38
msgid "Help and Support"
msgstr "Hilfe und Support"
#: views/layouts/layout.phtml:41
msgid "Your OpenID is:"
msgstr "Ihre OpenID ist:"

#: views/layouts_monkeys/layout.phtml:55
#: views/layouts/layout.phtml:52
#: views/layouts/layout.phtml:58
msgid "Maintenance mode is enabled: user access is restricted"
msgstr "Der Wartungsmodus ist eingeschaltet und der Benutzer Zugang ist eingeschränkt"

#: views/layouts_monkeys/layout.phtml:75
msgid "Privacy"
msgstr "Datenschutz "

#: views/layouts_monkeys/layout.phtml:78
msgid "About Us"
msgstr "Über uns "

#: views/layouts_monkeys/layout.phtml:81
msgid "Contact Us"
msgstr "Kontakt "

#~ msgid "Body:"
#~ msgstr "Body:"
#~ msgid ""
#~ "Fed up with having to remember dozens of<br />usernames and passwords<br /"
#~ ">for your favorite websites?"
#~ msgstr "Starting"
#~ msgid "Starting today<br />you'll only have to remember one"
#~ msgstr "Von heute an müssen<br /> Sie sich nur noch eins erinnern"
#~ msgid "Help and Support"
#~ msgstr "Hilfe und Support"
#~ msgid "Privacy"
#~ msgstr "Datenschutz "
#~ msgid "About Us"
#~ msgstr "Über uns "
#~ msgid "Contact Us"
#~ msgstr "Kontakt "
#~ msgid "OPEN AN ACCOUNT NOW"
#~ msgstr "EIN BENUTZERKONTO ERSTELLEN"
#~ msgid "Latest News"
#~ msgstr "Letzte News"
#~ msgid "Arabic"
#~ msgstr "Arabisch"
#~ msgid "Bulgarian"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -267,10 +267,14 @@ class Auth_OpenID_Consumer {

$this->session =& $session;

/*
* Keyboard Monkeys modification:
* Assigning the return value of new by reference is deprecated
*/
if ($consumer_cls !== null) {
$this->consumer =& new $consumer_cls($store);
$this->consumer = new $consumer_cls($store);
} else {
$this->consumer =& new Auth_OpenID_GenericConsumer($store);
$this->consumer = new Auth_OpenID_GenericConsumer($store);
}

$this->_token_key = $this->session_key_prefix . $this->_token_suffix;

View File

@ -55,13 +55,10 @@ define('Auth_OpenID_NO_DEFAULT', 'NO DEFAULT ALLOWED');
define('Auth_OpenID_OPENID1_URL_LIMIT', 2047);

// All OpenID protocol fields. Used to check namespace aliases.
global $Auth_OpenID_OPENID_PROTOCOL_FIELDS;
$Auth_OpenID_OPENID_PROTOCOL_FIELDS = array(
'ns', 'mode', 'error', 'return_to', 'contact', 'reference',
'signed', 'assoc_type', 'session_type', 'dh_modulus', 'dh_gen',
'dh_consumer_public', 'claimed_id', 'identity', 'realm',
'invalidate_handle', 'op_endpoint', 'response_nonce', 'sig',
'assoc_handle', 'trust_root', 'openid');
/*
* Keyboard Monkeys modification: global var moved next to its usage
* because it was breaking unit tests
*/

// Global namespace / alias registration map. See
// Auth_OpenID_registerNamespaceAlias.
@ -315,11 +312,19 @@ class Auth_OpenID_NamespaceMap {

function addAlias($namespace_uri, $desired_alias, $implicit=false)
{
// Add an alias from this namespace URI to the desired alias
global $Auth_OpenID_OPENID_PROTOCOL_FIELDS;

// Check that desired_alias is not an openid protocol field as
// per the spec.

/*
* Keyboard Monkeys modification: global var moved next to its usage
* because it was breaking unit tests
*/
$Auth_OpenID_OPENID_PROTOCOL_FIELDS = array(
'ns', 'mode', 'error', 'return_to', 'contact', 'reference',
'signed', 'assoc_type', 'session_type', 'dh_modulus', 'dh_gen',
'dh_consumer_public', 'claimed_id', 'identity', 'realm',
'invalidate_handle', 'op_endpoint', 'response_nonce', 'sig',
'assoc_handle', 'trust_root', 'openid');
if (in_array($desired_alias, $Auth_OpenID_OPENID_PROTOCOL_FIELDS)) {
Auth_OpenID::log("\"%s\" is not an allowed namespace alias",
$desired_alias);

View File

@ -178,7 +178,7 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
*/
function isError($value)
{
return PEAR::isError($value);
return false;
}

/**
@ -188,11 +188,7 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
*/
function resultToBool($obj)
{
if ($this->isError($obj)) {
return false;
} else {
return true;
}
return true;
}

/**

View File

@ -821,7 +821,11 @@ class Auth_OpenID_CheckIDRequest extends Auth_OpenID_Request {
array($this->trust_root, $this->return_to));
}

function fromMessage(&$message, $server)
/*
* Keyboard Monkeys modification:
* Removed & marker in argument
*/
function fromMessage($message, $server)
{
$mode = $message->getArg(Auth_OpenID_OPENID_NS, 'mode');
$immediate = null;
@ -1097,7 +1101,11 @@ class Auth_OpenID_CheckIDRequest extends Auth_OpenID_Request {
in OpenID 1.x immediate mode.');
}

$setup_request =& new Auth_OpenID_CheckIDRequest(
/*
* Keyboard Monkeys modification:
* Assigning the return value of new by reference is deprecated
*/
$setup_request = new Auth_OpenID_CheckIDRequest(
$this->identity,
$this->return_to,
$this->trust_root,
@ -1676,12 +1684,16 @@ class Auth_OpenID_UntrustedReturnURL extends Auth_OpenID_ServerError {
class Auth_OpenID_Server {
function Auth_OpenID_Server(&$store, $op_endpoint=null)
{
$this->store =& $store;
$this->signatory =& new Auth_OpenID_Signatory($this->store);
$this->encoder =& new Auth_OpenID_SigningEncoder($this->signatory);
$this->decoder =& new Auth_OpenID_Decoder($this);
/*
* Keyboard Monkeys modification:
* Assigning the return value of new by reference is deprecated
*/
$this->store = $store;
$this->signatory = new Auth_OpenID_Signatory($this->store);
$this->encoder = new Auth_OpenID_SigningEncoder($this->signatory);
$this->decoder = new Auth_OpenID_Decoder($this);
$this->op_endpoint = $op_endpoint;
$this->negotiator =& Auth_OpenID_getDefaultNegotiator();
$this->negotiator = Auth_OpenID_getDefaultNegotiator();
}

/**
@ -1714,8 +1726,9 @@ class Auth_OpenID_Server {

/**
* The callback for 'associate' messages.
* Keyboard Monkeys modification: removed & in argument, because it was killing unit tests
*/
function openid_associate(&$request)
function openid_associate($request)
{
$assoc_type = $request->assoc_type;
$session_type = $request->session->session_type;

View File

@ -351,10 +351,14 @@ class Auth_Yadis_XRDS {

$services = $this->parser->evalXPath('xrd:Service', $this->xrdNode);

/*
* Keyboard Monkeys modification:
* Assigning the return value of new by reference is deprecated
*/
foreach ($services as $node) {
$s =& new Auth_Yadis_Service();
$s = new Auth_Yadis_Service();
$s->element = $node;
$s->parser =& $this->parser;
$s->parser = $this->parser;

$priority = $s->getPriority();

@ -475,4 +479,4 @@ class Auth_Yadis_XRDS {
}
}

?>
?>

View File

@ -42,6 +42,7 @@ abstract class Monkeys_Controller_Action extends Zend_Controller_Action
$this->view->controller = $this;

$this->view->addHelperPath('libs/Monkeys/View/Helper', 'Monkeys_View_Helper');
$this->view->setUseStreamWrapper(true);
$this->_setScriptPaths();
$this->_setBase();
$this->view->numCols = $this->_numCols;

View File

@ -1,4 +1,4 @@
<?
<?php

abstract class Monkeys_Controller_Error extends Monkeys_Controller_Action
{

View File

@ -1,4 +1,4 @@
<?
<?php

class Monkeys_Form_Decorator_Composite extends Zend_Form_Decorator_Abstract
implements Zend_Form_Decorator_Marker_File_Interface // to avoid Zend_Form_Element_File to whine

View File

@ -35,7 +35,7 @@ class Monkeys_Form_Element_Country extends Zend_Form_Element_Select
translate('-- Select a Country --');
$this->addMultiOption(0, '-- Select a Country --');
$this->addMultiOptions(Zend_Locale::getCountryTranslationList(Zend_Registry::get('Zend_Locale')));
$this->addMultiOptions(Zend_Locale::getTranslationList('territory', Zend_Registry::get('Zend_Locale')));
asort($this->options);
}
}

View File

@ -35,7 +35,7 @@ class Monkeys_Form_Element_Language extends Zend_Form_Element_Select

translate('-- Select a Language --');
$this->addMultiOption(0, '-- Select a Language --');
$this->addMultiOptions(Zend_Locale::getLanguageTranslationList(Zend_Registry::get('Zend_Locale')));
$this->addMultiOptions(Zend_Locale::getTranslationList('language', Zend_Registry::get('Zend_Locale')));
asort($this->options);
}
}

View File

@ -1,129 +0,0 @@
<?php

/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkey Ltd
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/

class Monkeys_OpenId_Provider_Storage_Database extends Zend_OpenId_Provider_Storage
{
public function addAssociation($handle, $macFunc, $secret, $expires)
{
$associations = new Model_Associations();
$association = $associations->createRow();
$association->handle = $handle;
$association->macfunc = $macFunc;
$association->secret = $secret;
$association->expires = $expires;
$association->save();

return true;
}

public function getAssociation($handle, &$macFunc, &$secret, &$expires)
{
$associations = new Model_Associations();
$association = $associations->getAssociationGivenHandle($handle);
if (!$association) {
return false;
}
if ($association->expires < time()) {
return false;
}

$macFunc = $association->macfunc;
$secret = $association->secret;
$expires = $association->expires;

return true;
}

/**
* Always returns false, since we'll be adding user through the GUI interface only
*/
public function addUser($id, $password)
{
return false;
}

public function hasUser($id)
{
$users = new Users_Model_Users();
$user = $users->getUserWithOpenId($id);

return $user? true : false;
}

public function checkUser($id, $password)
{
$auth = Zend_Auth::getInstance();
$db = Zend_Db::factory(Zend_Registry::get('config')->database);
$authAdapter = new Zend_Auth_Adapter_DbTable($db, 'users', 'openid', 'password');
$authAdapter->setIdentity($id);
$authAdapter->setCredential($password);
$result = $auth->authenticate($authAdapter);

if ($result->isValid()) {
// we don't wanna login into community-id
Zend_Auth::getInstance()->clearIdentity();

return true;
}

return false;
}

/**
* Returns array of all trusted/untrusted sites for given user identified
* by $id
*
* @param string $id user identity URL
* @return array
*/
public function getTrustedSites($id)
{
$users = new Users_Model_Users();
$user = $users->getUserWithOpenId($id);

$sites = new Model_Sites();

$trustedSites = array();
foreach ($sites->getTrusted($user) as $site) {
$trustedSites[$site->site] = unserialize($site->trusted);
}

return $trustedSites;
}

/**
* Stores information about trusted/untrusted site for given user
*
* @param string $id user identity URL
* @param string $site site URL
* @param mixed $trusted trust data from extension or just a boolean value. If null, delete site. I know, bad desing. Blame it on ZF.
* @return bool
*/
public function addSite($id, $site, $trusted)
{
$users = new Users_Model_Users();
$user = $users->getUserWithOpenId($id);

$sites = new Model_Sites();
$sites->deleteForUserSite($user, $site);

if (!is_null($trusted)) {
$siteObj = $sites->createRow();
$siteObj->user_id = $user->id;
$siteObj->site = $site;
$siteObj->creation_date = date('Y-m-d');
$siteObj->trusted = serialize($trusted);
$siteObj->save();
}

return true;
}
}

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Acl.php 9417 2008-05-08 16:28:31Z darby $
* @version $Id: Acl.php 17515 2009-08-10 13:48:44Z ralph $
*/


@ -41,7 +41,7 @@ require_once 'Zend/Acl/Assert/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl
@ -80,6 +80,16 @@ class Zend_Acl
*/
protected $_resources = array();

/**
* @var Zend_Acl_Role_Interface
*/
protected $_isAllowedRole = null;
/**
* @var Zend_Acl_Resource_Interface
*/
protected $_isAllowedResource = null;
/**
* ACL rules; whitelist (deny everything to all) by default
*
@ -118,8 +128,18 @@ class Zend_Acl
* @uses Zend_Acl_Role_Registry::add()
* @return Zend_Acl Provides a fluent interface
*/
public function addRole(Zend_Acl_Role_Interface $role, $parents = null)
public function addRole($role, $parents = null)
{
if (is_string($role)) {
$role = new Zend_Acl_Role($role);
}
if (!$role instanceof Zend_Acl_Role_Interface) {
require_once 'Zend/Acl/Exception.php';
throw new Zend_Acl_Exception('addRole() expects $role to be of type Zend_Acl_Role_Interface');
}
$this->_getRoleRegistry()->add($role, $parents);

return $this;
@ -236,13 +256,22 @@ class Zend_Acl
* The $parent parameter may be a reference to, or the string identifier for,
* the existing Resource from which the newly added Resource will inherit.
*
* @param Zend_Acl_Resource_Interface $resource
* @param Zend_Acl_Resource_Interface|string $resource
* @param Zend_Acl_Resource_Interface|string $parent
* @throws Zend_Acl_Exception
* @return Zend_Acl Provides a fluent interface
*/
public function add(Zend_Acl_Resource_Interface $resource, $parent = null)
public function addResource($resource, $parent = null)
{
if (is_string($resource)) {
$resource = new Zend_Acl_Resource($resource);
}
if (!$resource instanceof Zend_Acl_Resource_Interface) {
require_once 'Zend/Acl/Exception.php';
throw new Zend_Acl_Exception('addResource() expects $resource to be of type Zend_Acl_Resource_Interface');
}
$resourceId = $resource->getResourceId();

if ($this->has($resourceId)) {
@ -274,6 +303,25 @@ class Zend_Acl

return $this;
}
/**
* Adds a Resource having an identifier unique to the ACL
*
* The $parent parameter may be a reference to, or the string identifier for,
* the existing Resource from which the newly added Resource will inherit.
*
* @deprecated in version 1.9.1 and will be available till 2.0. New code
* should use addResource() instead.
*
* @param Zend_Acl_Resource_Interface $resource
* @param Zend_Acl_Resource_Interface|string $parent
* @throws Zend_Acl_Exception
* @return Zend_Acl Provides a fluent interface
*/
public function add(Zend_Acl_Resource_Interface $resource, $parent = null)
{
return $this->addResource($resource, $parent);
}

/**
* Returns the identified Resource
@ -683,12 +731,25 @@ class Zend_Acl
*/
public function isAllowed($role = null, $resource = null, $privilege = null)
{
// reset role & resource to null
$this->_isAllowedRole = $this->_isAllowedResource = null;
if (null !== $role) {
// keep track of originally called role
$this->_isAllowedRole = $role;
$role = $this->_getRoleRegistry()->get($role);
if (!$this->_isAllowedRole instanceof Zend_Acl_Role_Interface) {
$this->_isAllowedRole = $role;
}
}

if (null !== $resource) {
// keep track of originally called resource
$this->_isAllowedResource = $resource;
$resource = $this->get($resource);
if (!$this->_isAllowedResource instanceof Zend_Acl_Resource_Interface) {
$this->_isAllowedResource = $resource;
}
}

if (null === $privilege) {
@ -964,8 +1025,18 @@ class Zend_Acl
$rule = $rules['byPrivilegeId'][$privilege];
}

// check assertion if necessary
if (null === $rule['assert'] || $rule['assert']->assert($this, $role, $resource, $privilege)) {
// check assertion first
if ($rule['assert']) {
$assertion = $rule['assert'];
$assertionValue = $assertion->assert(
$this,
($this->_isAllowedRole instanceof Zend_Acl_Role_Interface) ? $this->_isAllowedRole : $role,
($this->_isAllowedResource instanceof Zend_Acl_Resource_Interface) ? $this->_isAllowedResource : $resource,
$privilege
);
}
if (null === $rule['assert'] || $assertionValue) {
return $rule['type'];
} else if (null !== $resource || null !== $role || null !== $privilege) {
return null;

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Interface.php 16199 2009-06-21 18:42:43Z thomas $
*/


@ -41,7 +41,7 @@ require_once 'Zend/Acl/Resource/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Acl_Assert_Interface

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Exception.php 16199 2009-06-21 18:42:43Z thomas $
*/


@ -29,7 +29,7 @@ require_once 'Zend/Exception.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Exception extends Zend_Exception

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Resource.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Resource.php 16199 2009-06-21 18:42:43Z thomas $
*/


@ -29,7 +29,7 @@ require_once 'Zend/Acl/Resource/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Resource implements Zend_Acl_Resource_Interface

View File

@ -14,16 +14,16 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Interface.php 16199 2009-06-21 18:42:43Z thomas $
*/


/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Acl_Resource_Interface

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Role.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Role.php 16199 2009-06-21 18:42:43Z thomas $
*/


@ -29,7 +29,7 @@ require_once 'Zend/Acl/Role/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Role implements Zend_Acl_Role_Interface

View File

@ -14,16 +14,16 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Interface.php 16199 2009-06-21 18:42:43Z thomas $
*/


/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Acl_Role_Interface

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Registry.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Registry.php 16199 2009-06-21 18:42:43Z thomas $
*/


@ -29,7 +29,7 @@ require_once 'Zend/Acl/Role/Interface.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Role_Registry

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 8861 2008-03-16 14:30:18Z thomas $
* @version $Id: Exception.php 16199 2009-06-21 18:42:43Z thomas $
*/


@ -29,7 +29,7 @@ require_once 'Zend/Acl/Exception.php';
/**
* @category Zend
* @package Zend_Acl
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Acl_Role_Registry_Exception extends Zend_Acl_Exception

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Auth.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Auth_Abstract */
@ -32,7 +33,7 @@ require_once 'Zend/Auth/Result.php';
*
* @package Zend_Amf
* @subpackage Adobe
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Adobe_Auth extends Zend_Amf_Auth_Abstract
@ -129,4 +130,4 @@ Roles file format:
$id->name = $this->_username;
return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $id);
}
}
}

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: DbInspector.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -23,7 +24,7 @@
*
* @package Zend_Amf
* @subpackage Adobe
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Adobe_DbInspector

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Introspector.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Parse_TypeLoader */
@ -32,7 +33,7 @@ require_once 'Zend/Server/Reflection.php';
*
* @package Zend_Amf
* @subpackage Adobe
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Adobe_Introspector

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Abstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Auth_Adapter_Interface */
@ -38,4 +39,4 @@ abstract class Zend_Amf_Auth_Abstract implements Zend_Auth_Adapter_Interface
$this->_username = $username;
$this->_password = $password;
}
}
}

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Constants.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,6 +17,7 @@
* @subpackage Parse_Amf0
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Deserializer.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Parse_Deserializer */
@ -56,7 +57,6 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
*
* @param integer $typeMarker
* @return mixed whatever the data type is of the marker in php
* @return mixed
* @throws Zend_Amf_Exception for invalid type
*/
public function readTypeMarker($typeMarker = null)

View File

@ -17,6 +17,7 @@
* @subpackage Parse_Amf0
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Parse_Serializer */

View File

@ -17,6 +17,7 @@
* @subpackage Parse_Amf3
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Deserializer.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Parse_Deserializer */
@ -124,10 +125,10 @@ class Zend_Amf_Parse_Amf3_Deserializer extends Zend_Amf_Parse_Deserializer
* - 0x00200000 - 0x3FFFFFFF : 1xxxxxxx 1xxxxxxx 1xxxxxxx xxxxxxxx
* - 0x40000000 - 0xFFFFFFFF : throw range exception
*
*
* 0x04 -> integer type code, followed by up to 4 bytes of data.
*
* @see: Parsing integers on OSFlash {http://osflash.org/amf3/parsing_integers>} for the AMF3 integer data format.
* Parsing integers on OSFlash for the AMF3 integer data format:
* @link http://osflash.org/amf3/parsing_integers
* @return int|float
*/
public function readInteger()

View File

@ -17,6 +17,7 @@
* @subpackage Parse_Amf3
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Parse_Serializer */

View File

@ -17,6 +17,7 @@
* @subpackage Parse
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Deserializer.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,6 +17,7 @@
* @subpackage Parse
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: InputStream.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Util_BinaryStream */

View File

@ -17,6 +17,7 @@
* @subpackage Parse
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: OutputStream.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Util_BinaryStream */

View File

@ -15,8 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MysqlResult.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -25,7 +26,7 @@
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Resource_MysqlResult
@ -58,12 +59,12 @@ class Zend_Amf_Parse_Resource_MysqlResult
}
}

while($row = mysql_fetch_assoc($resource)) {
while($row = mysql_fetch_object($resource)) {
foreach($fields_transform as $fieldname => $fieldtype) {
settype($row[$fieldname], $fieldtype);
settype($row->$fieldname, $fieldtype);
}
$result[] = $row;
}
return $result;
}
}
}

View File

@ -15,8 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MysqliResult.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -25,7 +26,7 @@
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Resource_MysqliResult
@ -124,4 +125,4 @@ class Zend_Amf_Parse_Resource_MysqliResult
}
return $result;
}
}
}

View File

@ -15,8 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Stream.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -24,7 +25,7 @@
*
* @package Zend_Amf
* @subpackage Parse
* @copyright Copyright (c) 2009 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Parse_Resource_Stream
@ -38,4 +39,4 @@ class Zend_Amf_Parse_Resource_Stream
public function parse($resource) {
return stream_get_contents($resource);
}
}
}

View File

@ -17,6 +17,7 @@
* @subpackage Parse
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,12 +17,28 @@
* @subpackage Parse
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: TypeLoader.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
* @see Zend_Amf_Value_Messaging_AcknowledgeMessage
*/
require_once 'Zend/Amf/Value/Messaging/AcknowledgeMessage.php';
/**
* @see Zend_Amf_Value_Messaging_AsyncMessage
*/
require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';
/**
* @see Zend_Amf_Value_Messaging_CommandMessage
*/
require_once 'Zend/Amf/Value/Messaging/CommandMessage.php';
/**
* @see Zend_Amf_Value_Messaging_ErrorMessage
*/
require_once 'Zend/Amf/Value/Messaging/ErrorMessage.php';
/**
* @see Zend_Amf_Value_Messaging_RemotingMessage
*/
require_once 'Zend/Amf/Value/Messaging/RemotingMessage.php';

/**

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Request.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Parse_InputStream */

View File

@ -17,6 +17,7 @@
* @subpackage Request
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Http.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Request */

View File

@ -16,6 +16,7 @@
* @package Zend_Amf
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Response.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Constants */

View File

@ -17,6 +17,7 @@
* @subpackage Response
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Http.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Response */

View File

@ -14,8 +14,9 @@
*
* @category Zend
* @package Zend_Amf
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Server.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Server_Interface */
@ -51,7 +52,7 @@ require_once 'Zend/Auth.php';
* @todo Make the relection methods cache and autoload.
* @package Zend_Amf
* @subpackage Server
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Server implements Zend_Server_Interface
@ -61,6 +62,15 @@ class Zend_Amf_Server implements Zend_Server_Interface
* @var array
*/
protected $_methods = array();
/**
* Array of classes that can be called without being explicitly loaded
*
* Keys are class names.
*
* @var array
*/
protected $_classAllowed = array();

/**
* Loader for classes in added directories
@ -304,7 +314,7 @@ class Zend_Amf_Server implements Zend_Server_Interface
$this->getLoader()->load($className);
} catch (Exception $e) {
require_once 'Zend/Amf/Server/Exception.php';
throw new Zend_Amf_Server_Exception('Class "' . $className . '" does not exist');
throw new Zend_Amf_Server_Exception('Class "' . $className . '" does not exist: '.$e->getMessage());
}
// Add the new loaded class to the server.
$this->setClass($className, $source);
@ -340,7 +350,7 @@ class Zend_Amf_Server implements Zend_Server_Interface
$object = $info->getDeclaringClass()->newInstance();
} catch (Exception $e) {
require_once 'Zend/Amf/Server/Exception.php';
throw new Zend_Amf_Server_Exception('Error instantiating class ' . $class . ' to invoke method ' . $info->getName(), 621);
throw new Zend_Amf_Server_Exception('Error instantiating class ' . $class . ' to invoke method ' . $info->getName() . ': '.$e->getMessage(), 621);
}
$this->_checkAcl($object, $info->getName());
$return = $info->invokeArgs($object, $params);
@ -920,4 +930,4 @@ class Zend_Amf_Server implements Zend_Server_Interface
{
return array_keys($this->_table);
}
}
}

View File

@ -4,18 +4,20 @@
*
* LICENSE
*
* This source file is subject to version 1.0 of the Zend Framework
* license, that is bundled with this package in the file LICENSE.txt, and
* is available through the world-wide-web at the following URL:
* http://framework.zend.com/license/new-bsd. If you did not receive
* a copy of the Zend Framework license and are unable to obtain it
* through the world-wide-web, please send a note to license@zend.com
* so we can mail you a copy immediately.
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Amf
* @subpackage Server
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Exception */

View File

@ -17,6 +17,7 @@
* @subpackage Util
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BinaryStream.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ByteArray.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MessageBody.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: MessageHeader.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AbstractMessage.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AcknowledgeMessage.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Value_Messaging_AsyncMessage */

View File

@ -15,8 +15,9 @@
* @category Zend
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ArrayCollection.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -26,9 +27,9 @@
*
* @package Zend_Amf
* @subpackage Value
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Amf_Value_Messaging_ArrayCollection
{
}
}

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: AsyncMessage.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/



View File

@ -17,8 +17,12 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: CommandMessage.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
* @see Zend_Amf_Value_Messaging_AsyncMessage
*/

require_once 'Zend/Amf/Value/Messaging/AsyncMessage.php';

/**

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ErrorMessage.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Value_Messaging_AcknowledgeMessage */

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: RemotingMessage.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/** Zend_Amf_Value_Messaging_AbstractMessage */

View File

@ -17,6 +17,7 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: TraitsInfo.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**

View File

@ -14,15 +14,15 @@
*
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Application.php 15556 2009-05-12 14:45:23Z matthew $
* @version $Id: Application.php 17802 2009-08-24 21:15:12Z matthew $
*/

/**
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application
@ -48,6 +48,13 @@ class Zend_Application
*/
protected $_environment;

/**
* Flattened (lowercase) option keys
*
* @var array
*/
protected $_optionKeys = array();

/**
* Options for Zend_Application
*
@ -116,14 +123,16 @@ class Zend_Application
*/
public function setOptions(array $options)
{
$options = array_change_key_case($options, CASE_LOWER);

if (!empty($options['config'])) {
$options = $this->mergeOptions($options, $this->_loadConfig($options['config']));
}
$this->_options = $options;

$options = array_change_key_case($options, CASE_LOWER);

$this->_optionKeys = array_keys($options);

if (!empty($options['phpsettings'])) {
$this->setPhpSettings($options['phpsettings']);
}
@ -180,7 +189,7 @@ class Zend_Application
*/
public function hasOption($key)
{
return array_key_exists($key, $this->_options);
return in_array($key, $this->_optionKeys);
}

/**
@ -192,7 +201,9 @@ class Zend_Application
public function getOption($key)
{
if ($this->hasOption($key)) {
return $this->_options[$key];
$options = $this->getOptions();
$options = array_change_key_case($options, CASE_LOWER);
return $options[strtolower($key)];
}
return null;
}
@ -288,8 +299,15 @@ class Zend_Application

if (!class_exists($class, false)) {
require_once $path;
if (!class_exists($class, false)) {
throw new Zend_Application_Exception('Bootstrap class not found');
}
}
$this->_bootstrap = new $class($this);

if (!$this->_bootstrap instanceof Zend_Application_Bootstrap_Bootstrapper) {
throw new Zend_Application_Exception('Bootstrap class does not implement Zend_Application_Bootstrap_Bootstrapper');
}
return $this;
}

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @version $Id: Bootstrap.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -29,7 +29,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Bootstrap_Bootstrap

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BootstrapAbstract.php 15556 2009-05-12 14:45:23Z matthew $
* @version $Id: BootstrapAbstract.php 17802 2009-08-24 21:15:12Z matthew $
*/

/**
@ -28,7 +28,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Application_Bootstrap_BootstrapAbstract
@ -56,7 +56,14 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
protected $_environment;

/**
* @var array
* Flattened (lowercase) option keys used for lookups
*
* @var array
*/
protected $_optionKeys = array();

/**
* @var array
*/
protected $_options = array();

@ -105,7 +112,11 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
*/
public function setOptions(array $options)
{
$this->_options = $this->mergeOptions($this->_options, $options);

$options = array_change_key_case($options, CASE_LOWER);
$this->_optionKeys = array_keys($options);

$methods = get_class_methods($this);
foreach ($methods as $key => $method) {
$methods[$key] = strtolower($method);
@ -117,7 +128,6 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
foreach ($options['pluginpaths'] as $prefix => $path) {
$pluginLoader->addPrefixPath($prefix, $path);
}
unset($options['pluginpaths']);
}

@ -132,7 +142,6 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
}
}
}
$this->_options = $this->mergeOptions($this->_options, $options);
return $this;
}

@ -154,7 +163,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
*/
public function hasOption($key)
{
return array_key_exists($key, $this->_options);
return in_array($key, $this->_optionKeys);
}

/**
@ -166,7 +175,9 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
public function getOption($key)
{
if ($this->hasOption($key)) {
return $this->_options[$key];
$options = $this->getOptions();
$options = array_change_key_case($options, CASE_LOWER);
return $options[strtolower($key)];
}
return null;
}
@ -249,13 +260,6 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
*/
public function registerPluginResource($resource, $options = null)
{
/*
if (is_string($resource) && class_exists($resource)) {
$options = (array) $options;
$options['bootstrap'] = $this;
$resource = new $resource($options);
}
*/
if ($resource instanceof Zend_Application_Resource_Resource) {
$resource->setBootstrap($this);
$pluginName = $this->_resolvePluginResourceName($resource);
@ -267,7 +271,6 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
throw new Zend_Application_Bootstrap_Exception('Invalid resource provided to ' . __METHOD__);
}

// $resource = strtolower($resource);
$this->_pluginResources[$resource] = $options;
return $this;
}
@ -342,7 +345,6 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
continue;
}


if (false !== $pluginName = $this->_loadPluginResource($plugin, $spec)) {
if (0 === strcasecmp($resource, $pluginName)) {
return $this->_pluginResources[$pluginName];
@ -534,6 +536,30 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
return null;
}

/**
* Implement PHP's magic to retrieve a ressource
* in the bootstrap
*
* @param string $prop
* @return null|mixed
*/
public function __get($prop)
{
return $this->getResource($prop);
}

/**
* Implement PHP's magic to ask for the
* existence of a ressource in the bootstrap
*
* @param string $prop
* @return bool
*/
public function __isset($prop)
{
return $this->hasResource($prop);
}

/**
* Bootstrap individual, all, or multiple resources
*
@ -619,40 +645,40 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
*/
protected function _executeResource($resource)
{
$resource = strtolower($resource);
$resourceName = strtolower($resource);

if (in_array($resource, $this->_run)) {
if (in_array($resourceName, $this->_run)) {
return;
}

if (isset($this->_started[$resource]) && $this->_started[$resource]) {
if (isset($this->_started[$resourceName]) && $this->_started[$resourceName]) {
throw new Zend_Application_Bootstrap_Exception('Circular resource dependency detected');
}

$classResources = $this->getClassResources();
if (array_key_exists($resource, $classResources)) {
$this->_started[$resource] = true;
$method = $classResources[$resource];
if (array_key_exists($resourceName, $classResources)) {
$this->_started[$resourceName] = true;
$method = $classResources[$resourceName];
$return = $this->$method();
unset($this->_started[$resource]);
unset($this->_started[$resourceName]);
$this->_markRun($resource);

if (null !== $return) {
$this->getContainer()->{$resource} = $return;
$this->getContainer()->{$resourceName} = $return;
}

return;
}

if ($this->hasPluginResource($resource)) {
$this->_started[$resource] = true;
$this->_started[$resourceName] = true;
$plugin = $this->getPluginResource($resource);
$return = $plugin->init();
unset($this->_started[$resource]);
$this->_markRun($resource);
unset($this->_started[$resourceName]);
$this->_markRun($resourceName);

if (null !== $return) {
$this->getContainer()->{$resource} = $return;
$this->getContainer()->{$resourceName} = $return;
}

return;

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Bootstrapper.php 14881 2009-04-13 16:48:43Z matthew $
* @version $Id: Bootstrapper.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Application_Bootstrap_Bootstrapper

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 14064 2009-02-12 20:24:14Z dasprid $
* @version $Id: Exception.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -30,7 +30,7 @@ require_once 'Zend/Application/Exception.php';
* @category Zend
* @package Zend_Application
* @uses Zend_Application_Exception
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Bootstrap_Exception extends Zend_Application_Exception

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ResourceBootstrapper.php 14881 2009-04-13 16:48:43Z matthew $
* @version $Id: ResourceBootstrapper.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Bootstrap
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Application_Bootstrap_ResourceBootstrapper

View File

@ -14,9 +14,9 @@
*
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 14264 2009-03-10 13:43:05Z matthew $
* @version $Id: Exception.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -30,7 +30,7 @@ require_once 'Zend/Exception.php';
* @uses Zend_Exception
* @category Zend
* @package Zend_Application
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Exception extends Zend_Exception

View File

@ -15,8 +15,8 @@
* @category Zend
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Autoloader.php 15203 2009-04-27 15:20:43Z matthew $
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Autoloader.php 16541 2009-07-07 06:59:03Z bkarwin $
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

@ -29,8 +29,8 @@ require_once 'Zend/Loader/Autoloader/Resource.php';
* @uses Zend_Loader_Autoloader_Resource
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license New BSD {@link http://framework.zend.com/license/new-bsd}
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource
{

View File

@ -15,8 +15,8 @@
* @category Zend
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Bootstrap.php 15553 2009-05-12 13:52:41Z matthew $
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Bootstrap.php 17802 2009-08-24 21:15:12Z matthew $
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

@ -32,7 +32,7 @@ require_once 'Zend/Application/Bootstrap/Bootstrap.php';
* @uses Zend_Application_Bootstrap_Bootstrap
* @package Zend_Application
* @subpackage Module
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Application_Module_Bootstrap
@ -77,8 +77,8 @@ abstract class Zend_Application_Module_Bootstrap
}

// ZF-6545: prevent recursive registration of modules
if ($this->hasPluginResource('Modules')) {
$this->unregisterPluginResource('Modules');
if ($this->hasPluginResource('modules')) {
$this->unregisterPluginResource('modules');
}
}


View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Db.php 15337 2009-05-05 17:33:06Z matthew $
* @version $Id: Db.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbstract

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 14229 2009-03-05 20:00:10Z matthew $
* @version $Id: Exception.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Exception extends Zend_Application_Exception

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Frontcontroller.php 15356 2009-05-06 12:50:18Z matthew $
* @version $Id: Frontcontroller.php 17737 2009-08-21 20:57:50Z matthew $
*/

/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resource_ResourceAbstract
@ -78,7 +78,9 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc
break;
case 'baseurl':
$front->setBaseUrl($value);
if (!empty($value)) {
$front->setBaseUrl($value);
}
break;
case 'params':

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @version $Id: Layout.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Layout

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @version $Id: Locale.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Locale

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Modules.php 16156 2009-06-19 04:09:36Z norm2782 $
* @version $Id: Modules.php 17730 2009-08-21 19:50:07Z matthew $
*/

/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Modules extends Zend_Application_Resource_ResourceAbstract
@ -62,24 +62,41 @@ class Zend_Application_Resource_Modules extends Zend_Application_Resource_Resour

$modules = $front->getControllerDirectory();
$default = $front->getDefaultModule();
foreach (array_keys($modules) as $module) {
if ($module === $default) {
continue;
}

$curBootstrapClass = get_class($bootstrap);
foreach ($modules as $module => $moduleDirectory) {
$bootstrapClass = $this->_formatModuleName($module) . '_Bootstrap';
if (!class_exists($bootstrapClass, false)) {
$bootstrapPath = $front->getModuleDirectory($module) . '/Bootstrap.php';
$bootstrapPath = dirname($moduleDirectory) . '/Bootstrap.php';
if (file_exists($bootstrapPath)) {
$eMsgTpl = 'Bootstrap file found for module "%s" but bootstrap class "%s" not found';
include_once $bootstrapPath;
if (!class_exists($bootstrapClass, false)) {
throw new Zend_Application_Resource_Exception('Bootstrap file found for module "' . $module . '" but bootstrap class "' . $bootstrapClass . '" not found');
if (($default != $module)
&& !class_exists($bootstrapClass, false)
) {
throw new Zend_Application_Resource_Exception(sprintf(
$eMsgTpl, $module, $bootstrapClass
));
} elseif ($default == $module) {
if (!class_exists($bootstrapClass, false)) {
$bootstrapClass = 'Bootstrap';
if (!class_exists($bootstrapClass, false)) {
throw new Zend_Application_Resource_Exception(sprintf(
$eMsgTpl, $module, $bootstrapClass
));
}
}
}
} else {
continue;
}
}

if ($bootstrapClass == $curBootstrapClass) {
// If the found bootstrap class matches the one calling this
// resource, don't re-execute.
continue;
}

$moduleBootstrap = new $bootstrapClass($bootstrap);
$moduleBootstrap->bootstrap();
$this->_bootstraps[$module] = $moduleBootstrap;

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @version $Id: Navigation.php 17017 2009-07-24 02:45:52Z freak $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @author Dolf Schimmel
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -82,10 +82,16 @@ class Zend_Application_Resource_Navigation
protected function _storeRegistry()
{
$options = $this->getOptions();
$key = !is_numeric($options['storage']['registry']['key'])
? $options['storage']['registry']['key']
: self::DEFAULT_REGISTRY_KEY;
Zend_Registry::set($key,$this->getContainer());
if(isset($options['storage']) &&
isset($options['storage']['registry']) &&
isset($options['storage']['registry']['key']))
{
$key = $options['storage']['registry']['key'];
} else {
$key = self::DEFAULT_REGISTRY_KEY;
}
Zend_Registry::set($key,$this->getContainer());
}

/**
@ -96,7 +102,7 @@ class Zend_Application_Resource_Navigation
protected function _storeHelper()
{
$this->getBootstrap()->bootstrap('view');
$view = $this->getBootstrap()->getPluginResource('view')->getView();
$view = $this->getBootstrap()->view;
$view->getHelper('navigation')->navigation($this->getContainer());
}


View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Resource.php 14881 2009-04-13 16:48:43Z matthew $
* @version $Id: Resource.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -26,7 +26,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Application_Resource_Resource

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ResourceAbstract.php 15556 2009-05-12 14:45:23Z matthew $
* @version $Id: ResourceAbstract.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -32,7 +32,7 @@ require_once 'Zend/Application/Resource/Resource.php';
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Application_Resource_ResourceAbstract implements Zend_Application_Resource_Resource

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @version $Id: Router.php 16971 2009-07-22 18:05:45Z mikaelkael $
*/

/**
@ -27,8 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @author Dolf Schimmel
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Router
@ -59,14 +58,19 @@ class Zend_Application_Resource_Router
if (null === $this->_router) {
$bootstrap = $this->getBootstrap();
$bootstrap->bootstrap('FrontController');
$front = $bootstrap->getContainer()->frontcontroller;
$this->_router = $bootstrap->getContainer()->frontcontroller->getRouter();

$options = $this->getOptions();
if(!isset($options['routes'])) {
if (!isset($options['routes'])) {
$options['routes'] = array();
}

if (isset($options['chainNameSeparator'])) {
$this->_router->setChainNameSeparator($options['chainNameSeparator']);
}

$this->_router = $front->getRouter();
$this->_router->addConfig(new Zend_Config($options['routes']));
}
return $this->_router;

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Session.php 14957 2009-04-17 12:20:40Z matthew $
* @version $Id: Session.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Session extends Zend_Application_Resource_ResourceAbstract

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Translate.php 14974 2009-04-18 00:02:32Z norm2782 $
* @version $Id: Translate.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_Translate extends Zend_Application_Resource_ResourceAbstract

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: View.php 15333 2009-05-05 13:43:53Z matthew $
* @version $Id: View.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -27,7 +27,7 @@
* @category Zend
* @package Zend_Application
* @subpackage Resource
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Application_Resource_View extends Zend_Application_Resource_ResourceAbstract

View File

@ -14,16 +14,16 @@
*
* @category Zend
* @package Zend_Auth
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Auth.php 11747 2008-10-08 18:33:58Z norm2782 $
* @version $Id: Auth.php 16200 2009-06-21 18:50:06Z thomas $
*/


/**
* @category Zend
* @package Zend_Auth
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: DbTable.php 14899 2009-04-14 22:04:56Z ralph $
* @version $Id: DbTable.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -41,7 +41,7 @@ require_once 'Zend/Auth/Result.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Digest.php 9668 2008-06-11 08:15:02Z doctorrock83 $
* @version $Id: Digest.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -31,7 +31,7 @@ require_once 'Zend/Auth/Adapter/Interface.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth_Adapter_Digest implements Zend_Auth_Adapter_Interface

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 8862 2008-03-16 15:36:00Z thomas $
* @version $Id: Exception.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -31,7 +31,7 @@ require_once 'Zend/Auth/Exception.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth_Adapter_Exception extends Zend_Auth_Exception

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Http.php 12503 2008-11-10 16:28:40Z matthew $
* @version $Id: Http.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -35,7 +35,7 @@ require_once 'Zend/Auth/Adapter/Interface.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @todo Support auth-int
* @todo Track nonces, nonce-count, opaque for replay protection and stale support

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 8862 2008-03-16 15:36:00Z thomas $
* @version $Id: Exception.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -33,7 +33,7 @@ require_once 'Zend/Auth/Exception.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth_Adapter_Http_Resolver_Exception extends Zend_Auth_Exception

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: File.php 8862 2008-03-16 15:36:00Z thomas $
* @version $Id: File.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -33,7 +33,7 @@ require_once 'Zend/Auth/Adapter/Http/Resolver/Interface.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth_Adapter_Http_Resolver_File implements Zend_Auth_Adapter_Http_Resolver_Interface

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 8862 2008-03-16 15:36:00Z thomas $
* @version $Id: Interface.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -30,7 +30,7 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter_Http
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Auth_Adapter_Http_Resolver_Interface

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: InfoCard.php 9094 2008-03-30 18:36:55Z thomas $
* @version $Id: InfoCard.php 16200 2009-06-21 18:50:06Z thomas $
*/

/**
@ -42,7 +42,7 @@ require_once 'Zend/InfoCard.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth_Adapter_InfoCard implements Zend_Auth_Adapter_Interface

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interface.php 8862 2008-03-16 15:36:00Z thomas $
* @version $Id: Interface.php 16200 2009-06-21 18:50:06Z thomas $
*/


@ -31,7 +31,7 @@ require_once 'Zend/Auth/Result.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Auth_Adapter_Interface

View File

@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Ldap.php 14095 2009-02-16 22:17:54Z norm2782 $
* @version $Id: Ldap.php 17788 2009-08-24 14:43:23Z sgehrig $
*/

/**
@ -29,7 +29,7 @@ require_once 'Zend/Auth/Adapter/Interface.php';
* @category Zend
* @package Zend_Auth
* @subpackage Zend_Auth_Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
@ -63,6 +63,13 @@ class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
*/
protected $_password = null;

/**
* The DN of the authenticated account. Used to retrieve the account entry on request.
*
* @var string
*/
protected $_authenticatedDn = null;

/**
* Constructor
*
@ -151,6 +158,36 @@ class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
return $this;
}

/**
* setIdentity() - set the identity (username) to be used
*
* Proxies to {@see setPassword()}
*
* Closes ZF-6813
*
* @param string $identity
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
*/
public function setIdentity($identity)
{
return $this->setUsername($identity);
}

/**
* setCredential() - set the credential (password) value to be used
*
* Proxies to {@see setPassword()}
*
* Closes ZF-6813
*
* @param string $credential
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
*/
public function setCredential($credential)
{
return $this->setPassword($credential);
}

/**
* Returns the LDAP Object
*
@ -251,7 +288,7 @@ class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
require_once 'Zend/Auth/Adapter/Exception.php';
throw new Zend_Auth_Adapter_Exception('Adapter options array not in array');
}
$ldap->setOptions($options);
$adapterOptions = $this->_prepareOptions($ldap, $options);
$dname = '';

try {
@ -275,15 +312,23 @@ class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
continue;
}

$ldap->bind($username, $password);

$canonicalName = $ldap->getCanonicalAccountName($username);
$dn = $ldap->getCanonicalAccountName($username, Zend_Ldap::ACCTNAME_FORM_DN);

$ldap->bind($canonicalName, $password);

$messages[0] = '';
$messages[1] = '';
$messages[] = "$canonicalName authentication successful";

return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $canonicalName, $messages);
$groupResult = $this->_checkGroupMembership($ldap, $canonicalName, $dn, $adapterOptions);
if ($groupResult === true) {
$this->_authenticatedDn = $dn;
$messages[0] = '';
$messages[1] = '';
$messages[] = "$canonicalName authentication successful";
return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $canonicalName, $messages);
} else {
$messages[0] = 'Account is not a member of the specified group';
$messages[1] = $groupResult;
$failedAuthorities[$dname] = $groupResult;
}
} catch (Zend_Ldap_Exception $zle) {

/* LDAP based authentication is notoriously difficult to diagnose. Therefore
@ -324,6 +369,121 @@ class Zend_Auth_Adapter_Ldap implements Zend_Auth_Adapter_Interface
return new Zend_Auth_Result($code, $username, $messages);
}

/**
* Sets the LDAP specific options on the Zend_Ldap instance
*
* @param Zend_Ldap $ldap
* @param array $options
* @return array of auth-adapter specific options
*/
protected function _prepareOptions(Zend_Ldap $ldap, array $options)
{
$adapterOptions = array(
'group' => null,
'groupDn' => $ldap->getBaseDn(),
'groupScope' => Zend_Ldap::SEARCH_SCOPE_SUB,
'groupAttr' => 'cn',
'groupFilter' => 'objectClass=groupOfUniqueNames',
'memberAttr' => 'uniqueMember',
'memberIsDn' => true
);
foreach ($adapterOptions as $key => $value) {
if (array_key_exists($key, $options)) {
$value = $options[$key];
unset($options[$key]);
switch ($key) {
case 'groupScope':
$value = (int)$value;
if (in_array($value, array(Zend_Ldap::SEARCH_SCOPE_BASE,
Zend_Ldap::SEARCH_SCOPE_ONE, Zend_Ldap::SEARCH_SCOPE_SUB), true)) {
$adapterOptions[$key] = $value;
}
break;
case 'memberIsDn':
$adapterOptions[$key] = ($value === true ||
$value === '1' || strcasecmp($value, 'true') == 0);
break;
default:
$adapterOptions[$key] = trim($value);
break;
}
}
}

$ldap->setOptions($options);
return $adapterOptions;
}

/**
* Checks the group membership of the bound user
*
* @param Zend_Ldap $ldap
* @param string $canonicalName
* @param string $dn
* @param array $adapterOptions
* @return string|true
*/
protected function _checkGroupMembership(Zend_Ldap $ldap, $canonicalName, $dn, array $adapterOptions)
{
if ($adapterOptions['group'] === null) {
return true;
}

if ($adapterOptions['memberIsDn'] === false) {
$user = $canonicalName;
} else {
$user = $dn;
}

/**
* @see Zend_Ldap_Filter
*/
require_once 'Zend/Ldap/Filter.php';
$groupName = Zend_Ldap_Filter::equals($adapterOptions['groupAttr'], $adapterOptions['group']);
$membership = Zend_Ldap_Filter::equals($adapterOptions['memberAttr'], $user);
$group = Zend_Ldap_Filter::andFilter($groupName, $membership);
$groupFilter = $adapterOptions['groupFilter'];
if (!empty($groupFilter)) {
$group = $group->addAnd($groupFilter);
}

$result = $ldap->count($group, $adapterOptions['groupDn'], $adapterOptions['groupScope']);

if ($result === 1) {
return true;
} else {
return 'Failed to verify group membership with ' . $group->toString();
}
}

/**
* getAccountObject() - Returns the result entry as a stdClass object
*
* This ressembles the feature {@see Zend_Auth_Adapter_DbTable::getResultRowObject()}.
* Closes ZF-6813
*
* @param array $returnAttribs
* @return stdClass|boolean
*/
public function getAccountObject(array $returnAttribs = array())
{
if (!$this->_authenticatedDn) {
return false;
}

$returnObject = new stdClass();

$entry = $this->getLdap()->getEntry($this->_authenticatedDn, $returnAttribs, true);
foreach ($entry as $attr => $value) {
if (is_array($value)) {
$returnObject->$attr = (count($value) > 1) ? $value : $value[0];
} else {
$returnObject->$attr = $value;
}
}
return $returnObject;
}

/**
* Converts options to string
*

Some files were not shown because too many files have changed in this diff Show More