Mise à jour Zend Framework en version 1.11.1
This commit is contained in:
parent
2d1d27e17b
commit
146eb4bf4b
@ -16,7 +16,7 @@
|
||||
* @package Zend_Acl
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Acl.php 22581 2010-07-16 19:47:31Z ralph $
|
||||
* @version $Id: Acl.php 23358 2010-11-18 16:19:31Z ralph $
|
||||
*/
|
||||
|
||||
|
||||
@ -632,8 +632,9 @@ class Zend_Acl
|
||||
unset($rolesTemp);
|
||||
|
||||
// ensure that all specified Resources exist; normalize input to array of Resource objects or null
|
||||
if ($resources !== null) {
|
||||
if (!is_array($resources)) {
|
||||
$resources = ($resources == null && count($this->_resources) > 0) ? array_keys($this->_resources) : array($resources);
|
||||
$resources = array($resources);
|
||||
} else if (0 === count($resources)) {
|
||||
$resources = array(null);
|
||||
}
|
||||
@ -646,7 +647,14 @@ class Zend_Acl
|
||||
$resources[] = null;
|
||||
}
|
||||
}
|
||||
unset($resourcesTemp);
|
||||
unset($resourcesTemp, $resource);
|
||||
} else {
|
||||
$allResources = array(); // this might be used later if resource iteration is required
|
||||
foreach ($this->_resources as $rTarget) {
|
||||
$allResources[] = $rTarget['instance'];
|
||||
}
|
||||
unset($rTarget);
|
||||
}
|
||||
|
||||
// normalize privileges to array
|
||||
if (null === $privileges) {
|
||||
@ -659,6 +667,8 @@ class Zend_Acl
|
||||
|
||||
// add to the rules
|
||||
case self::OP_ADD:
|
||||
if ($resources !== null) {
|
||||
// this block will iterate the provided resources
|
||||
foreach ($resources as $resource) {
|
||||
foreach ($roles as $role) {
|
||||
$rules =& $this->_getRules($resource, $role, true);
|
||||
@ -676,10 +686,27 @@ class Zend_Acl
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this block will apply to all resources in a global rule
|
||||
foreach ($roles as $role) {
|
||||
$rules =& $this->_getRules(null, $role, true);
|
||||
if (0 === count($privileges)) {
|
||||
$rules['allPrivileges']['type'] = $type;
|
||||
$rules['allPrivileges']['assert'] = $assert;
|
||||
} else {
|
||||
foreach ($privileges as $privilege) {
|
||||
$rules['byPrivilegeId'][$privilege]['type'] = $type;
|
||||
$rules['byPrivilegeId'][$privilege]['assert'] = $assert;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// remove from the rules
|
||||
case self::OP_REMOVE:
|
||||
if ($resources !== null) {
|
||||
// this block will iterate the provided resources
|
||||
foreach ($resources as $resource) {
|
||||
foreach ($roles as $role) {
|
||||
$rules =& $this->_getRules($resource, $role);
|
||||
@ -716,6 +743,48 @@ class Zend_Acl
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this block will apply to all resources in a global rule
|
||||
foreach ($roles as $role) {
|
||||
/**
|
||||
* since null (all resources) was passed to this setRule() call, we need
|
||||
* clean up all the rules for the global allResources, as well as the indivually
|
||||
* set resources (per privilege as well)
|
||||
*/
|
||||
foreach (array_merge(array(null), $allResources) as $resource) {
|
||||
$rules =& $this->_getRules($resource, $role, true);
|
||||
if (null === $rules) {
|
||||
continue;
|
||||
}
|
||||
if (0 === count($privileges)) {
|
||||
if (null === $role) {
|
||||
if ($type === $rules['allPrivileges']['type']) {
|
||||
$rules = array(
|
||||
'allPrivileges' => array(
|
||||
'type' => self::TYPE_DENY,
|
||||
'assert' => null
|
||||
),
|
||||
'byPrivilegeId' => array()
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($rules['allPrivileges']['type']) && $type === $rules['allPrivileges']['type']) {
|
||||
unset($rules['allPrivileges']);
|
||||
}
|
||||
} else {
|
||||
foreach ($privileges as $privilege) {
|
||||
if (isset($rules['byPrivilegeId'][$privilege]) &&
|
||||
$type === $rules['byPrivilegeId'][$privilege]['type'])
|
||||
{
|
||||
unset($rules['byPrivilegeId'][$privilege]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1129,6 +1198,7 @@ class Zend_Acl
|
||||
return $nullRef;
|
||||
}
|
||||
$visitor['byRoleId'][$roleId]['byPrivilegeId'] = array();
|
||||
$visitor['byRoleId'][$roleId]['allPrivileges'] = array('type' => null, 'assert' => null);
|
||||
}
|
||||
return $visitor['byRoleId'][$roleId];
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Amf
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Introspector.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Introspector.php 23316 2010-11-10 16:37:40Z matthew $
|
||||
*/
|
||||
|
||||
/** @see Zend_Amf_Parse_TypeLoader */
|
||||
@ -283,7 +283,12 @@ class Zend_Amf_Adobe_Introspector
|
||||
return 'Unknown';
|
||||
}
|
||||
|
||||
if (in_array($typename, array('int', 'integer', 'bool', 'boolean', 'float', 'string', 'object', 'Unknown', 'stdClass', 'array'))) {
|
||||
// Arrays
|
||||
if ('array' == $typename) {
|
||||
return 'Unknown[]';
|
||||
}
|
||||
|
||||
if (in_array($typename, array('int', 'integer', 'bool', 'boolean', 'float', 'string', 'object', 'Unknown', 'stdClass'))) {
|
||||
return $typename;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Bootstrap
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: BootstrapAbstract.php 22664 2010-07-24 23:54:57Z ramon $
|
||||
* @version $Id: BootstrapAbstract.php 23278 2010-10-30 12:50:21Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -95,7 +95,7 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
|
||||
*
|
||||
* @param Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
|
||||
* @return void
|
||||
* @throws Zend_Application_Bootstrap_Exception When invalid applicaiton is provided
|
||||
* @throws Zend_Application_Bootstrap_Exception When invalid application is provided
|
||||
*/
|
||||
public function __construct($application)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Resource
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Frontcontroller.php 20885 2010-02-03 19:33:59Z matthew $
|
||||
* @version $Id: Frontcontroller.php 23378 2010-11-18 21:48:27Z bittarman $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -68,7 +68,13 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc
|
||||
break;
|
||||
|
||||
case 'moduledirectory':
|
||||
if (is_string($value)) {
|
||||
$front->addModuleDirectory($value);
|
||||
} elseif (is_array($value)) {
|
||||
foreach($value as $moduleDir) {
|
||||
$front->addModuleDirectory($moduleDir);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'defaultcontrollername':
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Resource
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ResourceAbstract.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: ResourceAbstract.php 23384 2010-11-19 00:00:29Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -83,6 +83,11 @@ abstract class Zend_Application_Resource_ResourceAbstract implements Zend_Applic
|
||||
*/
|
||||
public function setOptions(array $options)
|
||||
{
|
||||
if (array_key_exists('bootstrap', $options)) {
|
||||
$this->setBootstrap($options['bootstrap']);
|
||||
unset($options['bootstrap']);
|
||||
}
|
||||
|
||||
foreach ($options as $key => $value) {
|
||||
if (in_array(strtolower($key), $this->_skipOptions)) {
|
||||
continue;
|
||||
@ -92,9 +97,6 @@ abstract class Zend_Application_Resource_ResourceAbstract implements Zend_Applic
|
||||
if (method_exists($this, $method)) {
|
||||
$this->$method($value);
|
||||
}
|
||||
if ('bootstrap' === $key) {
|
||||
unset($options[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_options = $this->mergeOptions($this->_options, $options);
|
||||
|
@ -335,6 +335,17 @@ class Zend_Barcode_Object_Code128 extends Zend_Barcode_Object_ObjectAbstract
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set text to encode
|
||||
* @param string $value
|
||||
* @return Zend_Barcode_Object
|
||||
*/
|
||||
public function setText($value)
|
||||
{
|
||||
$this->_text = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve text to encode
|
||||
* @return string
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Object
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Code39.php 21657 2010-03-27 14:26:58Z mikaelkael $
|
||||
* @version $Id: Code39.php 23398 2010-11-19 17:17:05Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -112,6 +112,17 @@ class Zend_Barcode_Object_Code39 extends Zend_Barcode_Object_ObjectAbstract
|
||||
return $quietZone + $encodedData + $quietZone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set text to encode
|
||||
* @param string $value
|
||||
* @return Zend_Barcode_Object
|
||||
*/
|
||||
public function setText($value)
|
||||
{
|
||||
$this->_text = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve text to display
|
||||
* @return string
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Object
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ObjectAbstract.php 21667 2010-03-28 17:45:14Z mikaelkael $
|
||||
* @version $Id: ObjectAbstract.php 23400 2010-11-19 17:18:31Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -384,7 +384,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract
|
||||
/**
|
||||
* Set factor applying to
|
||||
* thinBarWidth - thickBarWidth - barHeight - fontSize
|
||||
* @param integer $value
|
||||
* @param float $value
|
||||
* @return Zend_Barcode_Object
|
||||
* @throw Zend_Barcode_Object_Exception
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Zend_Cache_Backend
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Xcache.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Xcache.php 23345 2010-11-15 16:31:14Z mabe $
|
||||
*/
|
||||
|
||||
|
||||
@ -182,7 +182,12 @@ class Zend_Cache_Backend_Xcache extends Zend_Cache_Backend implements Zend_Cache
|
||||
if ($this->_options['password']) {
|
||||
$_SERVER['PHP_AUTH_PW'] = $this->_options['password'];
|
||||
}
|
||||
xcache_clear_cache(XC_TYPE_VAR, 0);
|
||||
|
||||
$cnt = xcache_count(XC_TYPE_VAR);
|
||||
for ($i=0; $i < $cnt; $i++) {
|
||||
xcache_clear_cache(XC_TYPE_VAR, $i);
|
||||
}
|
||||
|
||||
if (isset($backup['PHP_AUTH_USER'])) {
|
||||
$_SERVER['PHP_AUTH_USER'] = $backup['PHP_AUTH_USER'];
|
||||
$_SERVER['PHP_AUTH_PW'] = $backup['PHP_AUTH_PW'];
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Zend_Cache_Frontend
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: File.php 23330 2010-11-14 20:08:09Z mabe $
|
||||
*/
|
||||
|
||||
|
||||
@ -97,22 +97,31 @@ class Zend_Cache_Frontend_File extends Zend_Cache_Core
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the master_file option
|
||||
* Change the master_files option
|
||||
*
|
||||
* @param string $masterFile the complete path and name of the master file
|
||||
* @param array $masterFiles the complete paths and name of the master files
|
||||
*/
|
||||
public function setMasterFiles($masterFiles)
|
||||
public function setMasterFiles(array $masterFiles)
|
||||
{
|
||||
clearstatcache();
|
||||
$this->_specificOptions['master_file'] = $masterFiles[0]; // to keep a compatibility
|
||||
$this->_specificOptions['master_files'] = $masterFiles;
|
||||
$this->_specificOptions['master_file'] = null; // to keep a compatibility
|
||||
$this->_specificOptions['master_files'] = null;
|
||||
$this->_masterFile_mtimes = array();
|
||||
|
||||
clearstatcache();
|
||||
$i = 0;
|
||||
foreach ($masterFiles as $masterFile) {
|
||||
$this->_masterFile_mtimes[$i] = @filemtime($masterFile);
|
||||
if ((!($this->_specificOptions['ignore_missing_master_files'])) && (!($this->_masterFile_mtimes[$i]))) {
|
||||
$mtime = @filemtime($masterFile);
|
||||
|
||||
if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {
|
||||
Zend_Cache::throwException('Unable to read master_file : ' . $masterFile);
|
||||
}
|
||||
|
||||
$this->_masterFile_mtimes[$i] = $mtime;
|
||||
$this->_specificOptions['master_files'][$i] = $masterFile;
|
||||
if ($i === 0) { // to keep a compatibility
|
||||
$this->_specificOptions['master_files'] = $masterFile;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
@ -127,7 +136,7 @@ class Zend_Cache_Frontend_File extends Zend_Cache_Core
|
||||
*/
|
||||
public function setMasterFile($masterFile)
|
||||
{
|
||||
$this->setMasterFiles(array(0 => $masterFile));
|
||||
$this->setMasterFiles(array($masterFile));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Config
|
||||
* @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: Xml.php 19059 2009-11-19 20:05:27Z jan $
|
||||
* @version $Id: Json.php 23294 2010-11-05 00:27:34Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Config.php';
|
||||
require_once 'Zend/Json.php';
|
||||
|
||||
/**
|
||||
* XML Adapter for Zend_Config
|
||||
* JSON Adapter for Zend_Config
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Config
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Config
|
||||
* @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: Xml.php 18862 2009-11-05 18:25:20Z beberlei $
|
||||
* @version $Id: Json.php 23294 2010-11-05 00:27:34Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Config
|
||||
* @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: Xml.php 18862 2009-11-05 18:25:20Z beberlei $
|
||||
* @version $Id: Yaml.php 23294 2010-11-05 00:27:34Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@
|
||||
require_once 'Zend/Config/Writer/FileAbstract.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Config_Json
|
||||
* @see Zend_Config_Yaml
|
||||
*/
|
||||
require_once 'Zend/Config/Yaml.php';
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
* @package Zend_Config
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Yaml.php 23294 2010-11-05 00:27:34Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -24,7 +25,7 @@
|
||||
require_once 'Zend/Config.php';
|
||||
|
||||
/**
|
||||
* XML Adapter for Zend_Config
|
||||
* YAML Adapter for Zend_Config
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Config
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Controller
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Http.php 23229 2010-10-25 14:16:21Z matthew $
|
||||
* @version $Id: Http.php 23414 2010-11-20 10:56:11Z bittarman $
|
||||
*/
|
||||
|
||||
/** @see Zend_Controller_Request_Abstract */
|
||||
@ -551,7 +551,7 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
|
||||
$this->setBaseUrl();
|
||||
}
|
||||
|
||||
return $this->_baseUrl;
|
||||
return urldecode($this->_baseUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -623,6 +623,8 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
|
||||
$requestUri = substr($requestUri, 0, $pos);
|
||||
}
|
||||
|
||||
$requestUri = urldecode($requestUri);
|
||||
|
||||
if (null !== $baseUrl
|
||||
&& ((!empty($baseUrl) && 0 === strpos($requestUri, $baseUrl))
|
||||
|| empty($baseUrl))
|
||||
@ -1031,7 +1033,10 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract
|
||||
$name = $this->getServer('SERVER_NAME');
|
||||
$port = $this->getServer('SERVER_PORT');
|
||||
|
||||
if (($scheme == self::SCHEME_HTTP && $port == 80) || ($scheme == self::SCHEME_HTTPS && $port == 443)) {
|
||||
if(null === $name) {
|
||||
return '';
|
||||
}
|
||||
elseif (($scheme == self::SCHEME_HTTP && $port == 80) || ($scheme == self::SCHEME_HTTPS && $port == 443)) {
|
||||
return $name;
|
||||
} else {
|
||||
return $name . ':' . $port;
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Controller
|
||||
* @subpackage Router
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @version $Id: Rewrite.php 22416 2010-06-11 14:11:24Z rob $
|
||||
* @version $Id: Rewrite.php 23362 2010-11-18 17:22:41Z bittarman $
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
@ -95,7 +95,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract
|
||||
require_once 'Zend/Controller/Router/Route/Module.php';
|
||||
$compat = new Zend_Controller_Router_Route_Module(array(), $dispatcher, $request);
|
||||
|
||||
$this->_routes = array_merge(array('default' => $compat), $this->_routes);
|
||||
$this->_routes = array('default' => $compat) + $this->_routes;
|
||||
}
|
||||
|
||||
return $this;
|
||||
@ -382,7 +382,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract
|
||||
// Find the matching route
|
||||
$routeMatched = false;
|
||||
|
||||
foreach (array_reverse($this->_routes) as $name => $route) {
|
||||
foreach (array_reverse($this->_routes, true) as $name => $route) {
|
||||
// TODO: Should be an interface method. Hack for 1.0 BC
|
||||
if (method_exists($route, 'isAbstract') && $route->isAbstract()) {
|
||||
continue;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Math
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: BigInteger.php 22662 2010-07-24 17:37:36Z mabe $
|
||||
* @version $Id: BigInteger.php 23439 2010-11-23 21:10:14Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -105,7 +105,7 @@ class Zend_Crypt_Math_BigInteger
|
||||
//} elseif($extension == 'bigint' && extension_loaded('big_int')) {
|
||||
// require_once 'Zend/Crypt_Math/BigInteger/Bigint.php';
|
||||
// $this->_math = new Zend_Crypt_Math_BigInteger_Bigint();
|
||||
} elseif ($extension == 'bcmath') {
|
||||
} elseif ($extension == 'bcmath' && extension_loaded('bcmath')) {
|
||||
require_once 'Zend/Crypt/Math/BigInteger/Bcmath.php';
|
||||
$this->_math = new Zend_Crypt_Math_BigInteger_Bcmath();
|
||||
} else {
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Math
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Gmp.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Gmp.php 23439 2010-11-23 21:10:14Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,7 +28,7 @@ require_once 'Zend/Crypt/Math/BigInteger/Interface.php';
|
||||
/**
|
||||
* Support for arbitrary precision mathematics in PHP.
|
||||
*
|
||||
* Zend_Crypt_Math_BigInteger_Bcmath is a wrapper across the PHP BCMath
|
||||
* Zend_Crypt_Math_BigInteger_Gmp is a wrapper across the PHP BCMath
|
||||
* extension.
|
||||
*
|
||||
* @category Zend
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Rsa
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Rsa.php 22662 2010-07-24 17:37:36Z mabe $
|
||||
* @version $Id: Rsa.php 23439 2010-11-23 21:10:14Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -42,27 +42,42 @@ class Zend_Crypt_Rsa
|
||||
const BINARY = 'binary';
|
||||
const BASE64 = 'base64';
|
||||
|
||||
protected $_privateKey = null;
|
||||
protected $_privateKey;
|
||||
|
||||
protected $_publicKey = null;
|
||||
protected $_publicKey;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_pemString = null;
|
||||
protected $_pemString;
|
||||
|
||||
protected $_pemPath = null;
|
||||
protected $_pemPath;
|
||||
|
||||
protected $_certificateString = null;
|
||||
protected $_certificateString;
|
||||
|
||||
protected $_certificatePath = null;
|
||||
protected $_certificatePath;
|
||||
|
||||
protected $_hashAlgorithm = OPENSSL_ALGO_SHA1;
|
||||
protected $_hashAlgorithm;
|
||||
|
||||
protected $_passPhrase = null;
|
||||
protected $_passPhrase;
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @throws Zend_Crypt_Rsa_Exception
|
||||
*/
|
||||
public function __construct(array $options = null)
|
||||
{
|
||||
if (!extension_loaded('openssl')) {
|
||||
require_once 'Zend/Crypt/Rsa/Exception.php';
|
||||
throw new Zend_Crypt_Rsa_Exception('Zend_Crypt_Rsa requires openssl extention to be loaded.');
|
||||
}
|
||||
|
||||
// Set _hashAlgorithm property when we are sure, that openssl extension is loaded
|
||||
// and OPENSSL_ALGO_SHA1 constant is available
|
||||
$this->_hashAlgorithm = OPENSSL_ALGO_SHA1;
|
||||
|
||||
if (isset($options)) {
|
||||
$this->setOptions($options);
|
||||
}
|
||||
|
36
library/Zend/Crypt/Rsa/Exception.php
Normal file
36
library/Zend/Crypt/Rsa/Exception.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* 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_Crypt
|
||||
* @subpackage Math
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see Zend_Crypt_Exception
|
||||
*/
|
||||
require_once 'Zend/Crypt/Exception.php';
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_Crypt
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Crypt_Rsa_Exception extends Zend_Crypt_Exception
|
||||
{
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @package Zend_Db
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Db.php 23193 2010-10-21 02:09:18Z ramon $
|
||||
* @version $Id: Db.php 23405 2010-11-19 19:46:10Z bittarman $
|
||||
*/
|
||||
|
||||
|
||||
@ -90,9 +90,6 @@ class Zend_Db
|
||||
* 'NULL_TO_STRING', 'ERR_NONE', 'FETCH_ORI_NEXT',
|
||||
* 'FETCH_ORI_PRIOR', 'FETCH_ORI_FIRST', 'FETCH_ORI_LAST',
|
||||
* 'FETCH_ORI_ABS', 'FETCH_ORI_REL', 'CURSOR_FWDONLY', 'CURSOR_SCROLL',
|
||||
* 'ERR_CANT_MAP', 'ERR_SYNTAX', 'ERR_CONSTRAINT', 'ERR_NOT_FOUND',
|
||||
* 'ERR_ALREADY_EXISTS', 'ERR_NOT_IMPLEMENTED', 'ERR_MISMATCH',
|
||||
* 'ERR_TRUNCATED', 'ERR_DISCONNECTED', 'ERR_NO_PERM',
|
||||
* );
|
||||
*
|
||||
* $const = array();
|
||||
@ -125,17 +122,7 @@ class Zend_Db
|
||||
const CASE_UPPER = 1;
|
||||
const CURSOR_FWDONLY = 0;
|
||||
const CURSOR_SCROLL = 1;
|
||||
const ERR_ALREADY_EXISTS = NULL;
|
||||
const ERR_CANT_MAP = NULL;
|
||||
const ERR_CONSTRAINT = NULL;
|
||||
const ERR_DISCONNECTED = NULL;
|
||||
const ERR_MISMATCH = NULL;
|
||||
const ERR_NO_PERM = NULL;
|
||||
const ERR_NONE = '00000';
|
||||
const ERR_NOT_FOUND = NULL;
|
||||
const ERR_NOT_IMPLEMENTED = NULL;
|
||||
const ERR_SYNTAX = NULL;
|
||||
const ERR_TRUNCATED = NULL;
|
||||
const ERRMODE_EXCEPTION = 2;
|
||||
const ERRMODE_SILENT = 0;
|
||||
const ERRMODE_WARNING = 1;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Profiler
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Query.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Query.php 23382 2010-11-18 22:50:50Z bittarman $
|
||||
*/
|
||||
|
||||
|
||||
@ -195,5 +195,19 @@ class Zend_Db_Profiler_Query
|
||||
|
||||
return $this->_endedMicrotime - $this->_startedMicrotime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time (in seconds) when the profiler started running.
|
||||
*
|
||||
* @return bool|float
|
||||
*/
|
||||
public function getStartedMicrotime()
|
||||
{
|
||||
if(null === $this->_startedMicrotime) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->_startedMicrotime;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Table
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Abstract.php 22615 2010-07-17 15:33:11Z ramon $
|
||||
* @version $Id: Abstract.php 23380 2010-11-18 22:22:28Z ralph $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -245,20 +245,8 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
return null;
|
||||
}
|
||||
|
||||
// do we already have a row object for this position?
|
||||
if (empty($this->_rows[$this->_pointer])) {
|
||||
$this->_rows[$this->_pointer] = new $this->_rowClass(
|
||||
array(
|
||||
'table' => $this->_table,
|
||||
'data' => $this->_data[$this->_pointer],
|
||||
'stored' => $this->_stored,
|
||||
'readOnly' => $this->_readOnly
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// return the row object
|
||||
return $this->_rows[$this->_pointer];
|
||||
return $this->_loadAndReturnRow($this->_pointer);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -390,17 +378,17 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
*/
|
||||
public function getRow($position, $seek = false)
|
||||
{
|
||||
$key = $this->key();
|
||||
try {
|
||||
$this->seek($position);
|
||||
$row = $this->current();
|
||||
$row = $this->_loadAndReturnRow($position);
|
||||
} catch (Zend_Db_Table_Rowset_Exception $e) {
|
||||
require_once 'Zend/Db/Table/Rowset/Exception.php';
|
||||
throw new Zend_Db_Table_Rowset_Exception('No row could be found at position ' . (int) $position, 0, $e);
|
||||
}
|
||||
if ($seek == false) {
|
||||
$this->seek($key);
|
||||
|
||||
if ($seek == true) {
|
||||
$this->seek($position);
|
||||
}
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
@ -421,4 +409,27 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
protected function _loadAndReturnRow($position)
|
||||
{
|
||||
if (!isset($this->_data[$position])) {
|
||||
require_once 'Zend/Db/Table/Rowset/Exception.php';
|
||||
throw new Zend_Db_Table_Rowset_Exception("Data for provided position does not exist");
|
||||
}
|
||||
|
||||
// do we already have a row object for this position?
|
||||
if (empty($this->_rows[$position])) {
|
||||
$this->_rows[$position] = new $this->_rowClass(
|
||||
array(
|
||||
'table' => $this->_table,
|
||||
'data' => $this->_data[$position],
|
||||
'stored' => $this->_stored,
|
||||
'readOnly' => $this->_readOnly
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// return the row object
|
||||
return $this->_rows[$position];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Dojo
|
||||
* @subpackage View
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @version $Id: Container.php 23060 2010-10-08 13:42:26Z matthew $
|
||||
* @version $Id: Container.php 23368 2010-11-18 19:56:30Z bittarman $
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
@ -845,7 +845,7 @@ class Zend_Dojo_View_Helper_Dojo_Container
|
||||
public function dijitsToJson()
|
||||
{
|
||||
require_once 'Zend/Json.php';
|
||||
return Zend_Json::encode($this->getDijits());
|
||||
return Zend_Json::encode($this->getDijits(), false, array('enableJsonExprFinder' => true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Filter
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: StringTrim.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: StringTrim.php 23401 2010-11-19 18:52:08Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -45,14 +45,14 @@ class Zend_Filter_StringTrim implements Zend_Filter_Interface
|
||||
/**
|
||||
* Sets filter options
|
||||
*
|
||||
* @param string|array|Zend_Config $charList
|
||||
* @param string|array|Zend_Config $options
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($charList = null)
|
||||
public function __construct($options = null)
|
||||
{
|
||||
if ($charList instanceof Zend_Config) {
|
||||
$charList = $charList->toArray();
|
||||
} else if (!is_array($charList)) {
|
||||
if ($options instanceof Zend_Config) {
|
||||
$options = $options->toArray();
|
||||
} else if (!is_array($options)) {
|
||||
$options = func_get_args();
|
||||
$temp['charlist'] = array_shift($options);
|
||||
$options = $temp;
|
||||
|
@ -28,7 +28,7 @@ require_once 'Zend/Validate/Interface.php';
|
||||
* @package Zend_Form
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Form.php 22930 2010-09-09 18:45:18Z matthew $
|
||||
* @version $Id: Form.php 23429 2010-11-22 23:06:46Z bittarman $
|
||||
*/
|
||||
class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
|
||||
{
|
||||
@ -354,7 +354,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
|
||||
}
|
||||
|
||||
$forbidden = array(
|
||||
'Options', 'Config', 'PluginLoader', 'SubForms', 'View', 'Translator',
|
||||
'Options', 'Config', 'PluginLoader', 'SubForms', 'Translator',
|
||||
'Attrib', 'Default',
|
||||
);
|
||||
|
||||
@ -366,6 +366,9 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
|
||||
|
||||
$method = 'set' . $normalized;
|
||||
if (method_exists($this, $method)) {
|
||||
if($normalized == 'View' && !($value instanceof Zend_View_Interface)) {
|
||||
continue;
|
||||
}
|
||||
$this->$method($value);
|
||||
} else {
|
||||
$this->setAttrib($key, $value);
|
||||
@ -1782,6 +1785,10 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
|
||||
{
|
||||
$group = array();
|
||||
foreach ($elements as $element) {
|
||||
if($element instanceof Zend_Form_Element) {
|
||||
$element = $element->getId();
|
||||
}
|
||||
|
||||
if (isset($this->_elements[$element])) {
|
||||
$add = $this->getElement($element);
|
||||
if (null !== $add) {
|
||||
|
@ -32,7 +32,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
|
||||
* @subpackage Decorator
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Fieldset.php 21966 2010-04-21 23:14:30Z alab $
|
||||
* @version $Id: Fieldset.php 23426 2010-11-22 22:50:25Z bittarman $
|
||||
*/
|
||||
class Zend_Form_Decorator_Fieldset extends Zend_Form_Decorator_Abstract
|
||||
{
|
||||
@ -72,7 +72,7 @@ class Zend_Form_Decorator_Fieldset extends Zend_Form_Decorator_Abstract
|
||||
$options = parent::getOptions();
|
||||
if (null !== ($element = $this->getElement())) {
|
||||
$attribs = $element->getAttribs();
|
||||
$options = array_merge($options, $attribs);
|
||||
$options = array_merge($attribs, $options);
|
||||
$this->setOptions($options);
|
||||
}
|
||||
return $options;
|
||||
|
@ -31,6 +31,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
|
||||
* - separator: separator to use between view script content and provided content (defaults to PHP_EOL)
|
||||
* - placement: whether to append or prepend view script content to provided content (defaults to prepend)
|
||||
* - viewScript: view script to use
|
||||
* - viewModule: module that view script is in (optional)
|
||||
*
|
||||
* The view script is rendered as a partial; the element being decorated is
|
||||
* passed in as the 'element' variable:
|
||||
@ -39,7 +40,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
|
||||
* echo $this->element->getLabel();
|
||||
* </code>
|
||||
*
|
||||
* Any options other than separator, placement, and viewScript are passed to
|
||||
* Any options other than separator, placement, viewScript, and viewModule are passed to
|
||||
* the partial as local variables.
|
||||
*
|
||||
* @category Zend
|
||||
@ -47,7 +48,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
|
||||
* @subpackage Decorator
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewScript.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: ViewScript.php 23299 2010-11-05 04:38:14Z matthew $
|
||||
*/
|
||||
class Zend_Form_Decorator_ViewScript extends Zend_Form_Decorator_Abstract
|
||||
{
|
||||
@ -63,6 +64,12 @@ class Zend_Form_Decorator_ViewScript extends Zend_Form_Decorator_Abstract
|
||||
*/
|
||||
protected $_viewScript;
|
||||
|
||||
/**
|
||||
* View script module
|
||||
* @var string
|
||||
*/
|
||||
protected $_viewModule;
|
||||
|
||||
/**
|
||||
* Set view script
|
||||
*
|
||||
@ -99,6 +106,42 @@ class Zend_Form_Decorator_ViewScript extends Zend_Form_Decorator_Abstract
|
||||
return $this->_viewScript;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set view script module
|
||||
*
|
||||
* @param string $module
|
||||
* @return Zend_Form_Decorator_ViewScript
|
||||
*/
|
||||
public function setViewModule($viewModule)
|
||||
{
|
||||
$this->_viewModule = (string) $viewModule;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get view script module
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getViewModule()
|
||||
{
|
||||
if (null === $this->_viewModule) {
|
||||
if (null !== ($element = $this->getElement())) {
|
||||
if (null !== ($viewModule = $element->getAttrib('viewModule'))) {
|
||||
$this->setViewModule($viewModule);
|
||||
return $viewModule;
|
||||
}
|
||||
}
|
||||
|
||||
if (null !== ($viewModule = $this->getOption('viewModule'))) {
|
||||
$this->setViewModule($viewModule)
|
||||
->removeOption('viewModule');
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_viewModule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a view script
|
||||
*
|
||||
@ -127,7 +170,12 @@ class Zend_Form_Decorator_ViewScript extends Zend_Form_Decorator_Abstract
|
||||
$vars['content'] = $content;
|
||||
$vars['decorator'] = $this;
|
||||
|
||||
$viewModule = $this->getViewModule();
|
||||
if (empty($viewModule)) {
|
||||
$renderedContent = $view->partial($viewScript, $vars);
|
||||
} else {
|
||||
$renderedContent = $view->partial($viewScript, $viewModule, $vars);
|
||||
}
|
||||
|
||||
// Get placement again to see if it has changed
|
||||
$placement = $this->getPlacement();
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @category Zend
|
||||
* @package Zend_Http
|
||||
* @subpackage Client
|
||||
* @version $Id: Client.php 23073 2010-10-10 20:06:44Z padraic $
|
||||
* @version $Id: Client.php 23443 2010-11-24 11:53:13Z shahar $
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -1013,7 +1013,7 @@ class Zend_Http_Client
|
||||
|
||||
// Load cookies into cookie jar
|
||||
if (isset($this->cookiejar)) {
|
||||
$this->cookiejar->addCookiesFromResponse($response, $uri);
|
||||
$this->cookiejar->addCookiesFromResponse($response, $uri, $this->config['encodecookies']);
|
||||
}
|
||||
|
||||
// If we got redirected, look for the Location header
|
||||
@ -1108,7 +1108,7 @@ class Zend_Http_Client
|
||||
}
|
||||
|
||||
// Set the Content-Type header
|
||||
if ($this->method == self::POST &&
|
||||
if (($this->method == self::POST || $this->method == self::PUT) &&
|
||||
(! isset($this->headers[strtolower(self::CONTENT_TYPE)]) && isset($this->enctype))) {
|
||||
|
||||
$headers[] = self::CONTENT_TYPE . ': ' . $this->enctype;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @package Zend_Http
|
||||
* @subpackage Cookie
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @version $Id: Cookie.php 23231 2010-10-25 14:19:59Z matthew $
|
||||
* @version $Id: Cookie.php 23443 2010-11-24 11:53:13Z shahar $
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
@ -277,7 +277,7 @@ class Zend_Http_Cookie
|
||||
*
|
||||
* @param string $cookieStr
|
||||
* @param Zend_Uri_Http|string $refUri Reference URI for default values (domain, path)
|
||||
* @param boolean $encodeValue Weither or not the cookie's value should be
|
||||
* @param boolean $encodeValue Whether or not the cookie's value should be
|
||||
* passed through urlencode/urldecode
|
||||
* @return Zend_Http_Cookie A new Zend_Http_Cookie object or false on failure.
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@
|
||||
* @category Zend
|
||||
* @package Zend_Http
|
||||
* @subpackage CookieJar
|
||||
* @version $Id: CookieJar.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: CookieJar.php 23443 2010-11-24 11:53:13Z shahar $
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -116,11 +116,12 @@ class Zend_Http_CookieJar implements Countable, IteratorAggregate
|
||||
*
|
||||
* @param Zend_Http_Cookie|string $cookie
|
||||
* @param Zend_Uri_Http|string $ref_uri Optional reference URI (for domain, path, secure)
|
||||
* @param boolean $encodeValue
|
||||
*/
|
||||
public function addCookie($cookie, $ref_uri = null)
|
||||
public function addCookie($cookie, $ref_uri = null, $encodeValue = true)
|
||||
{
|
||||
if (is_string($cookie)) {
|
||||
$cookie = Zend_Http_Cookie::fromString($cookie, $ref_uri);
|
||||
$cookie = Zend_Http_Cookie::fromString($cookie, $ref_uri, $encodeValue);
|
||||
}
|
||||
|
||||
if ($cookie instanceof Zend_Http_Cookie) {
|
||||
@ -142,8 +143,9 @@ class Zend_Http_CookieJar implements Countable, IteratorAggregate
|
||||
*
|
||||
* @param Zend_Http_Response $response
|
||||
* @param Zend_Uri_Http|string $ref_uri Requested URI
|
||||
* @param boolean $encodeValue
|
||||
*/
|
||||
public function addCookiesFromResponse($response, $ref_uri)
|
||||
public function addCookiesFromResponse($response, $ref_uri, $encodeValue = true)
|
||||
{
|
||||
if (! $response instanceof Zend_Http_Response) {
|
||||
require_once 'Zend/Http/Exception.php';
|
||||
@ -155,10 +157,10 @@ class Zend_Http_CookieJar implements Countable, IteratorAggregate
|
||||
|
||||
if (is_array($cookie_hdrs)) {
|
||||
foreach ($cookie_hdrs as $cookie) {
|
||||
$this->addCookie($cookie, $ref_uri);
|
||||
$this->addCookie($cookie, $ref_uri, $encodeValue);
|
||||
}
|
||||
} elseif (is_string($cookie_hdrs)) {
|
||||
$this->addCookie($cookie_hdrs, $ref_uri);
|
||||
$this->addCookie($cookie_hdrs, $ref_uri, $encodeValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Zend_InfoCard_Xml_Security
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Security.php 23088 2010-10-11 19:53:24Z padraic $
|
||||
* @version $Id: Security.php 23280 2010-10-31 10:28:58Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -174,7 +174,7 @@ class Zend_InfoCard_Xml_Security
|
||||
|
||||
$transformed_xml_binhash = pack("H*", sha1($transformed_xml));
|
||||
|
||||
if(!$this->_secureStringCompare($transformed_xml_binhash, $dValue)) {
|
||||
if(!self::_secureStringCompare($transformed_xml_binhash, $dValue)) {
|
||||
require_once 'Zend/InfoCard/Xml/Security/Exception.php';
|
||||
throw new Zend_InfoCard_Xml_Security_Exception("Locally Transformed XML does not match XML Document. Cannot Verify Signature");
|
||||
}
|
||||
@ -313,7 +313,7 @@ class Zend_InfoCard_Xml_Security
|
||||
* @param string $b
|
||||
* @return bool
|
||||
*/
|
||||
protected function _secureStringCompare($a, $b)
|
||||
static protected function _secureStringCompare($a, $b)
|
||||
{
|
||||
if (strlen($a) !== strlen($b)) {
|
||||
return false;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Writer
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ZendMonitor.php 22531 2010-07-07 02:17:52Z ramon $
|
||||
* @version $Id: ZendMonitor.php 23351 2010-11-16 18:09:45Z matthew $
|
||||
*/
|
||||
|
||||
/** Zend_Log_Writer_Abstract */
|
||||
@ -29,7 +29,7 @@ require_once 'Zend/Log/Writer/Abstract.php';
|
||||
* @subpackage Writer
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ZendMonitor.php 22531 2010-07-07 02:17:52Z ramon $
|
||||
* @version $Id: ZendMonitor.php 23351 2010-11-16 18:09:45Z matthew $
|
||||
*/
|
||||
class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
|
||||
{
|
||||
@ -39,6 +39,12 @@ class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
|
||||
*/
|
||||
protected $_isEnabled = true;
|
||||
|
||||
/**
|
||||
* Is this for a Zend Server intance?
|
||||
* @var bool
|
||||
*/
|
||||
protected $_isZendServer = false;
|
||||
|
||||
/**
|
||||
* @throws Zend_Log_Exception if Zend Monitor extension not present
|
||||
*/
|
||||
@ -47,6 +53,9 @@ class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
|
||||
if (!function_exists('monitor_custom_event')) {
|
||||
$this->_isEnabled = false;
|
||||
}
|
||||
if (function_exists('zend_monitor_custom_event')) {
|
||||
$this->_isZendServer = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -103,7 +112,17 @@ class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
|
||||
unset($event['priority'], $event['message']);
|
||||
|
||||
if (!empty($event)) {
|
||||
monitor_custom_event($priority, $message, false, $event);
|
||||
if ($this->_isZendServer) {
|
||||
// On Zend Server; third argument should be the event
|
||||
zend_monitor_custom_event($priority, $message, $event);
|
||||
} else {
|
||||
// On Zend Platform; third argument is severity -- either
|
||||
// 0 or 1 -- and fourth is optional (event)
|
||||
// Severity is either 0 (normal) or 1 (severe); classifying
|
||||
// notice, info, and debug as "normal", and all others as
|
||||
// "severe"
|
||||
monitor_custom_event($priority, $message, ($priority > 4) ? 0 : 1, $event);
|
||||
}
|
||||
} else {
|
||||
monitor_custom_event($priority, $message);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Transport
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Smtp.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Smtp.php 23424 2010-11-22 22:42:55Z bittarman $
|
||||
*/
|
||||
|
||||
|
||||
@ -204,7 +204,7 @@ class Zend_Mail_Transport_Smtp extends Zend_Mail_Transport_Abstract
|
||||
}
|
||||
|
||||
// Set sender email address
|
||||
$this->_connection->mail($this->_mail->getFrom());
|
||||
$this->_connection->mail($this->_mail->getReturnPath());
|
||||
|
||||
// Set recipient forward paths
|
||||
foreach ($this->_mail->getRecipients() as $recipient) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Paginator
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Interface.php 23314 2010-11-08 19:48:10Z matthew $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -29,13 +29,6 @@
|
||||
*/
|
||||
interface Zend_Paginator_Adapter_Interface extends Countable
|
||||
{
|
||||
/**
|
||||
* Returns the total number of rows in the collection.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
//public function count();
|
||||
|
||||
/**
|
||||
* Returns an collection of items for a page.
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Pdf
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Parser.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Parser.php 23395 2010-11-19 15:30:47Z alexander $
|
||||
*/
|
||||
|
||||
/** Internally used classes */
|
||||
@ -367,14 +367,22 @@ class Zend_Pdf_Parser
|
||||
throw new Zend_Pdf_Exception( "Can not open '$source' file for reading." );
|
||||
}
|
||||
|
||||
$data = '';
|
||||
$byteCount = filesize($source);
|
||||
while ($byteCount > 0 && !feof($pdfFile)) {
|
||||
$nextBlock = fread($pdfFile, $byteCount);
|
||||
if ($nextBlock === false) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception( "Error occured while '$source' file reading." );
|
||||
}
|
||||
|
||||
$data = fread($pdfFile, $byteCount);
|
||||
$byteCount -= strlen($data);
|
||||
while ( $byteCount > 0 && ($nextBlock = fread($pdfFile, $byteCount)) != false ) {
|
||||
$data .= $nextBlock;
|
||||
$byteCount -= strlen($nextBlock);
|
||||
}
|
||||
if ($byteCount != 0) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception( "Error occured while '$source' file reading." );
|
||||
}
|
||||
fclose($pdfFile);
|
||||
|
||||
$this->_stringParser = new Zend_Pdf_StringParser($data, $factory);
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Pdf
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Jpeg.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Jpeg.php 23395 2010-11-19 15:30:47Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -102,10 +102,21 @@ class Zend_Pdf_Resource_Image_Jpeg extends Zend_Pdf_Resource_Image
|
||||
}
|
||||
$byteCount = filesize($imageFileName);
|
||||
$this->_resource->value = '';
|
||||
while ( $byteCount > 0 && ($nextBlock = fread($imageFile, $byteCount)) != false ) {
|
||||
|
||||
while ($byteCount > 0 && !feof($imageFile)) {
|
||||
$nextBlock = fread($imageFile, $byteCount);
|
||||
if ($nextBlock === false) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception( "Error occured while '$imageFileName' file reading." );
|
||||
}
|
||||
|
||||
$this->_resource->value .= $nextBlock;
|
||||
$byteCount -= strlen($nextBlock);
|
||||
}
|
||||
if ($byteCount != 0) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception( "Error occured while '$imageFileName' file reading." );
|
||||
}
|
||||
fclose($imageFile);
|
||||
$this->_resource->skipFilters();
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Pdf
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Png.php 22653 2010-07-22 18:41:39Z mabe $
|
||||
* @version $Id: Png.php 23395 2010-11-19 15:30:47Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -123,7 +123,13 @@ class Zend_Pdf_Resource_Image_Png extends Zend_Pdf_Resource_Image
|
||||
* The following loop processes PNG chunks. 4 Byte Longs are packed first give the chunk length
|
||||
* followed by the chunk signature, a four byte code. IDAT and IEND are manditory in any PNG.
|
||||
*/
|
||||
while(($chunkLengthBytes = fread($imageFile, 4)) !== false) {
|
||||
while (!feof($imageFile)) {
|
||||
$chunkLengthBytes = fread($imageFile, 4);
|
||||
if ($chunkLengthBytes === false) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Error ocuured while image file reading.');
|
||||
}
|
||||
|
||||
$chunkLengthtmp = unpack('Ni', $chunkLengthBytes);
|
||||
$chunkLength = $chunkLengthtmp['i'];
|
||||
$chunkType = fread($imageFile, 4);
|
||||
|
44
library/Zend/Queue/Adapter/Db/sqlsrv.sql
Normal file
44
library/Zend/Queue/Adapter/Db/sqlsrv.sql
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
CREATE TABLE [dbo].[queue](
|
||||
[queue_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[queue_name] [varchar](100) NOT NULL,
|
||||
[timeout] [int] NOT NULL,
|
||||
CONSTRAINT [PK_queue] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[queue_id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[queue] ADD DEFAULT ((30)) FOR [timeout]
|
||||
GO
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[message](
|
||||
[message_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[queue_id] [int] NOT NULL,
|
||||
[handle] [char](32) NULL,
|
||||
[body] [varchar](max) NOT NULL,
|
||||
[md5] [char](32) NOT NULL,
|
||||
[timeout] [decimal](14, 4) NULL,
|
||||
[created] [int] NOT NULL,
|
||||
CONSTRAINT [PK_message] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[message_id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[message] WITH CHECK ADD CONSTRAINT [fk_message_queue_id] FOREIGN KEY([queue_id])
|
||||
REFERENCES [dbo].[queue] ([queue_id])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[message] CHECK CONSTRAINT [fk_message_queue_id]
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Rest
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Route.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Route.php 23421 2010-11-21 10:03:53Z wilmoore $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -274,15 +274,27 @@ class Zend_Rest_Route extends Zend_Controller_Router_Route_Module
|
||||
$controller = $params[$this->_controllerKey];
|
||||
unset($params[$this->_controllerKey]);
|
||||
|
||||
// set $action if value given is 'new' or 'edit'
|
||||
if (in_array($params[$this->_actionKey], array('new', 'edit'))) {
|
||||
$action = $params[$this->_actionKey];
|
||||
}
|
||||
unset($params[$this->_actionKey]);
|
||||
|
||||
if (isset($params['index']) && $params['index']) {
|
||||
unset($params['index']);
|
||||
$url .= '/index';
|
||||
if (isset($params['id'])) {
|
||||
$url .= '/'.$params['id'];
|
||||
unset($params['id']);
|
||||
}
|
||||
foreach ($params as $key => $value) {
|
||||
if ($encode) $value = urlencode($value);
|
||||
$url .= '/' . $key . '/' . $value;
|
||||
}
|
||||
} elseif (! empty($action) && isset($params['id'])) {
|
||||
$url .= sprintf('/%s/%s', $params['id'], $action);
|
||||
} elseif (! empty($action)) {
|
||||
$url .= sprintf('/%s', $action);
|
||||
} elseif (isset($params['id'])) {
|
||||
$url .= '/' . $params['id'];
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Document
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Html.php 21945 2010-04-19 08:19:39Z alexander $
|
||||
* @version $Id: Html.php 23392 2010-11-19 09:53:16Z ramon $
|
||||
*/
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ class Zend_Search_Lucene_Document_Html extends Zend_Search_Lucene_Document
|
||||
// Document encoding is not recognized
|
||||
|
||||
/** @todo improve HTML vs HTML fragment recognition */
|
||||
if (preg_match('/<html>/i', $htmlData, $matches, PREG_OFFSET_CAPTURE)) {
|
||||
if (preg_match('/<html[^>]*>/i', $htmlData, $matches, PREG_OFFSET_CAPTURE)) {
|
||||
// It's an HTML document
|
||||
// Add additional HEAD section and recognize document
|
||||
$htmlTagOffset = $matches[0][1] + strlen($matches[0][0]);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Storage
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Filesystem.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Filesystem.php 23395 2010-11-19 15:30:47Z alexander $
|
||||
*/
|
||||
|
||||
/** Zend_Search_Lucene_Storage_File */
|
||||
@ -159,10 +159,21 @@ class Zend_Search_Lucene_Storage_File_Filesystem extends Zend_Search_Lucene_Stor
|
||||
}
|
||||
|
||||
$data = '';
|
||||
while ( $length > 0 && ($nextBlock = fread($this->_fileHandle, $length)) != false ) {
|
||||
while ($length > 0 && !feof($this->_fileHandle)) {
|
||||
$nextBlock = fread($this->_fileHandle, $length);
|
||||
if ($nextBlock === false) {
|
||||
require_once 'Zend/Search/Lucene/Exception.php';
|
||||
throw new Zend_Search_Lucene_Exception( "Error occured while file reading." );
|
||||
}
|
||||
|
||||
$data .= $nextBlock;
|
||||
$length -= strlen($nextBlock);
|
||||
}
|
||||
if ($length != 0) {
|
||||
require_once 'Zend/Search/Lucene/Exception.php';
|
||||
throw new Zend_Search_Lucene_Exception( "Error occured while file reading." );
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ require_once 'Zend/Server/Reflection/Prototype.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Abstract.php 23183 2010-10-20 18:34:33Z ralph $
|
||||
* @version $Id: Abstract.php 23320 2010-11-12 21:57:29Z alexander $
|
||||
*/
|
||||
abstract class Zend_Server_Reflection_Function_Abstract
|
||||
{
|
||||
@ -293,7 +293,7 @@ abstract class Zend_Server_Reflection_Function_Abstract
|
||||
// Get param types and description
|
||||
if (preg_match_all('/@param\s+([^\s]+)/m', $docBlock, $matches)) {
|
||||
$paramTypesTmp = $matches[1];
|
||||
if (preg_match_all('/@param\s+\S+\s+(\$\S+)\s+(.*?)(@|\*|\*\/)/s', $docBlock, $matches))
|
||||
if (preg_match_all('/@param\s+\S+\s+(\$\S+)\s+(.*?)(?=@|\*|\*\/)/s', $docBlock, $matches))
|
||||
{
|
||||
$paramDesc = $matches[2];
|
||||
foreach ($paramDesc as $key => $value) {
|
||||
@ -306,6 +306,16 @@ abstract class Zend_Server_Reflection_Function_Abstract
|
||||
} else {
|
||||
$helpText = $function->getName();
|
||||
$return = 'void';
|
||||
|
||||
// Try and auto-determine type, based on reflection
|
||||
$paramTypesTmp = array();
|
||||
foreach ($parameters as $i => $param) {
|
||||
$paramType = 'mixed';
|
||||
if ($param->isArray()) {
|
||||
$paramType = 'array';
|
||||
}
|
||||
$paramTypesTmp[$i] = $paramType;
|
||||
}
|
||||
}
|
||||
|
||||
// Set method description
|
||||
|
@ -64,7 +64,7 @@ class Zend_Service_Amazon_SimpleDb extends Zend_Service_Amazon_Abstract
|
||||
/**
|
||||
* The HTTP query server
|
||||
*/
|
||||
protected $_sdbEndpoint = 'sdb.amazonaws.com';
|
||||
protected $_sdbEndpoint = 'sdb.amazonaws.com/';
|
||||
|
||||
/**
|
||||
* Period after which HTTP request will timeout in seconds
|
||||
@ -231,18 +231,20 @@ class Zend_Service_Amazon_SimpleDb extends Zend_Service_Amazon_Abstract
|
||||
$params['Item.' . $itemIndex . '.ItemName'] = $name;
|
||||
$attributeIndex = 0;
|
||||
foreach ($attributes as $attribute) {
|
||||
// attribute value cannot be array, so when several items are passed
|
||||
// they are treated as separate values with the same attribute name
|
||||
foreach($attribute->getValues() as $value) {
|
||||
$params['Item.' . $itemIndex . '.Attribute.' . $attributeIndex . '.Name'] = $attribute->getName();
|
||||
if (isset($replace[$itemIndex])
|
||||
&& isset($replace[$itemIndex][$attributeIndex])
|
||||
&& $replace[$itemIndex][$attributeIndex]
|
||||
$params['Item.' . $itemIndex . '.Attribute.' . $attributeIndex . '.Value'] = $value;
|
||||
if (isset($replace[$name])
|
||||
&& isset($replace[$name][$attribute->getName()])
|
||||
&& $replace[$name][$attribute->getName()]
|
||||
) {
|
||||
$params['Item.' . $itemIndex . '.Attribute.' . $attributeIndex . '.Replace'] = 'true';
|
||||
}
|
||||
foreach($attribute->getValues() as $value) {
|
||||
$params['Item.' . $itemIndex . '.Attribute.' . $attributeIndex . '.Value'] = $value;
|
||||
}
|
||||
$attributeIndex++;
|
||||
}
|
||||
}
|
||||
$itemIndex++;
|
||||
}
|
||||
|
||||
@ -305,7 +307,7 @@ class Zend_Service_Amazon_SimpleDb extends Zend_Service_Amazon_Abstract
|
||||
|
||||
$nextTokenNode = $response->getSimpleXMLDocument()->ListDomainsResult->NextToken;
|
||||
$nextToken = (string)$nextTokenNode;
|
||||
$nextToken = ''?null:$nextToken;
|
||||
$nextToken = (trim($nextToken) === '') ? null : $nextToken;
|
||||
|
||||
return new Zend_Service_Amazon_SimpleDb_Page($data, $nextToken);
|
||||
}
|
||||
|
@ -97,4 +97,12 @@ class Zend_Service_Amazon_SimpleDb_Attribute
|
||||
$this->_values[] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function setValues($values)
|
||||
{
|
||||
if (!is_array($values)) {
|
||||
$values = array($values);
|
||||
}
|
||||
$this->_values = $values;
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ interface Zend_Service_ShortUrl_Shortener
|
||||
* @param string $url URL to Shorten
|
||||
* @return string Shortened Url
|
||||
*/
|
||||
function shorten($shortenedUrl);
|
||||
public function shorten($shortenedUrl);
|
||||
|
||||
/**
|
||||
* Reveals target for short URL
|
||||
@ -41,5 +41,5 @@ interface Zend_Service_ShortUrl_Shortener
|
||||
* @param string $shortenedUrl URL to reveal target of
|
||||
* @return string Unshortened Url
|
||||
*/
|
||||
function unshorten($shortenedUrl);
|
||||
public function unshorten($shortenedUrl);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Twitter
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Twitter.php 22662 2010-07-24 17:37:36Z mabe $
|
||||
* @version $Id: Twitter.php 23312 2010-11-08 19:45:00Z matthew $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -376,8 +376,11 @@ class Zend_Service_Twitter extends Zend_Rest_Client
|
||||
* - page: return page X of results
|
||||
* - count: how many statuses to return
|
||||
* - max_id: returns only statuses with an ID less than or equal to the specified ID
|
||||
* - user_id: specfies the ID of the user for whom to return the user_timeline
|
||||
* - user_id: specifies the ID of the user for whom to return the user_timeline
|
||||
* - screen_name: specfies the screen name of the user for whom to return the user_timeline
|
||||
* - include_rts: whether or not to return retweets
|
||||
* - trim_user: whether to return just the user ID or a full user object; omit to return full object
|
||||
* - include_entities: whether or not to return entities nodes with tweet metadata
|
||||
*
|
||||
* @throws Zend_Http_Client_Exception if HTTP request fails or times out
|
||||
* @return Zend_Rest_Client_Result
|
||||
@ -416,6 +419,11 @@ class Zend_Service_Twitter extends Zend_Rest_Client
|
||||
case 'max_id':
|
||||
$_params['max_id'] = $this->_validInteger($value);
|
||||
break;
|
||||
case 'include_rts':
|
||||
case 'trim_user':
|
||||
case 'include_entities':
|
||||
$_params[strtolower($key)] = $value ? '1' : '0';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -936,7 +944,7 @@ class Zend_Service_Twitter extends Zend_Rest_Client
|
||||
*/
|
||||
protected function _validateScreenName($name)
|
||||
{
|
||||
if (!preg_match('/^[a-zA-Z0-9_]{0,20}$/', $name)) {
|
||||
if (!preg_match('/^[a-zA-Z0-9_]{0,15}$/', $name)) {
|
||||
require_once 'Zend/Service/Twitter/Exception.php';
|
||||
throw new Zend_Service_Twitter_Exception(
|
||||
'Screen name, "' . $name
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage AutoDiscover
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: AutoDiscover.php 22898 2010-08-24 21:40:05Z alexander $
|
||||
* @version $Id: AutoDiscover.php 23338 2010-11-15 14:59:33Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -479,7 +479,11 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
|
||||
}
|
||||
|
||||
// Add the binding operation
|
||||
if($isOneWayMessage == false) {
|
||||
$operation = $wsdl->addBindingOperation($binding, $function->getName(), $this->_operationBodyStyle, $this->_operationBodyStyle);
|
||||
} else {
|
||||
$operation = $wsdl->addBindingOperation($binding, $function->getName(), $this->_operationBodyStyle);
|
||||
}
|
||||
$wsdl->addSoapOperation($operation, $uri . '#' .$function->getName());
|
||||
|
||||
// Add the function name to the list
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Client
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Client.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Client.php 23453 2010-11-28 13:56:14Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -321,7 +321,7 @@ class Zend_Soap_Client
|
||||
* ugly hack as I don't know if checking for '=== null'
|
||||
* breaks some other option
|
||||
*/
|
||||
if ($key == 'user_agent') {
|
||||
if (in_array($key, array('user_agent', 'cache_wsdl', 'compression'))) {
|
||||
if ($value === null) {
|
||||
unset($options[$key]);
|
||||
}
|
||||
@ -767,15 +767,17 @@ class Zend_Soap_Client
|
||||
/**
|
||||
* Set compression options
|
||||
*
|
||||
* @param int $compressionOptions
|
||||
* @param int|null $compressionOptions
|
||||
* @return Zend_Soap_Client
|
||||
*/
|
||||
public function setCompressionOptions($compressionOptions)
|
||||
{
|
||||
$this->_compression = $compressionOptions;
|
||||
|
||||
if ($compressionOptions === null) {
|
||||
$this->_compression = null;
|
||||
} else {
|
||||
$this->_compression = (int)$compressionOptions;
|
||||
}
|
||||
$this->_soapClient = null;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -857,17 +859,23 @@ class Zend_Soap_Client
|
||||
/**
|
||||
* Set the SOAP Wsdl Caching Options
|
||||
*
|
||||
* @param string|int|boolean $caching
|
||||
* @param string|int|boolean|null $caching
|
||||
* @return Zend_Soap_Client
|
||||
*/
|
||||
public function setWsdlCache($options)
|
||||
public function setWsdlCache($caching)
|
||||
{
|
||||
$this->_cache_wsdl = $options;
|
||||
if ($caching === null) {
|
||||
$this->_cache_wsdl = null;
|
||||
} else {
|
||||
$this->_cache_wsdl = (int)$caching;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current SOAP Wsdl Caching option
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getWsdlCache()
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Soap
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Wsdl.php 21378 2010-03-08 11:57:05Z rquadling $
|
||||
* @version $Id: Wsdl.php 23342 2010-11-15 15:29:20Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -317,11 +317,17 @@ class Zend_Soap_Wsdl
|
||||
|
||||
if (is_array($fault)) {
|
||||
$node = $this->_dom->createElement('fault');
|
||||
/**
|
||||
* Note. Do we really need name attribute to be also set at wsdl:fault node???
|
||||
* W3C standard doesn't mention it (http://www.w3.org/TR/wsdl#_soap:fault)
|
||||
* But some real world WSDLs use it, so it may be required for compatibility reasons.
|
||||
*/
|
||||
if (isset($fault['name'])) {
|
||||
$node->setAttribute('name', $fault['name']);
|
||||
}
|
||||
$soap_node = $this->_dom->createElement('soap:body');
|
||||
foreach ($output as $name => $value) {
|
||||
|
||||
$soap_node = $this->_dom->createElement('soap:fault');
|
||||
foreach ($fault as $name => $value) {
|
||||
$soap_node->setAttribute($name, $value);
|
||||
}
|
||||
$node->appendChild($soap_node);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: AbstractClassFile.php 20785 2010-01-31 09:43:03Z mikaelkael $
|
||||
* @version $Id: AbstractClassFile.php 23417 2010-11-20 16:24:35Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -62,7 +62,7 @@ abstract class Zend_Tool_Project_Context_Zf_AbstractClassFile extends Zend_Tool_
|
||||
$prefix = $containingResource->getAttribute('classNamePrefix');
|
||||
$fullClassName = $prefix;
|
||||
} elseif ($containingResource->getName() == 'ModuleDirectory') {
|
||||
$prefix = $containingResource->getAttribute('moduleName') . '_';
|
||||
$prefix = ucfirst($containingResource->getAttribute('moduleName')) . '_';
|
||||
$fullClassName = $prefix;
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,14 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: FormFile.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: FormFile.php 23343 2010-11-15 15:33:22Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see Zend_Tool_Project_Context_Zf_AbstractClassFile
|
||||
*/
|
||||
require_once 'Zend/Tool/Project/Context/Zf/AbstractClassFile.php';
|
||||
|
||||
/**
|
||||
* This class is the front most class for utilizing Zend_Tool_Project
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewControllerScriptsDirectory.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: ViewControllerScriptsDirectory.php 23343 2010-11-15 15:33:22Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,6 +25,22 @@
|
||||
*/
|
||||
require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Filter
|
||||
*/
|
||||
require_once 'Zend/Filter.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Filter_Word_CamelCaseToDash
|
||||
*/
|
||||
require_once 'Zend/Filter/Word/CamelCaseToDash.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Filter_StringToLower
|
||||
*/
|
||||
require_once 'Zend/Filter/StringToLower.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class is the front most class for utilizing Zend_Tool_Project
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewScriptFile.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: ViewScriptFile.php 23343 2010-11-15 15:33:22Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,6 +25,22 @@
|
||||
*/
|
||||
require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Filter
|
||||
*/
|
||||
require_once 'Zend/Filter.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Filter_Word_CamelCaseToDash
|
||||
*/
|
||||
require_once 'Zend/Filter/Word/CamelCaseToDash.php';
|
||||
|
||||
/**
|
||||
* @see Zend_Filter_StringToLower
|
||||
*/
|
||||
require_once 'Zend/Filter/StringToLower.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class is the front most class for utilizing Zend_Tool_Project
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Module.php 20992 2010-02-08 18:39:36Z matthew $
|
||||
* @version $Id: Module.php 23419 2010-11-20 21:37:46Z ramon $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -155,13 +155,18 @@ class Zend_Tool_Project_Provider_Module
|
||||
$resource->create();
|
||||
}
|
||||
|
||||
$response->appendContent('Added a key for path module directory to the application.ini file');
|
||||
$appConfigFile = $this->_loadedProfile->search('ApplicationConfigFile');
|
||||
$appConfigFile->removeStringItem('resources.frontController.moduleDirectory', 'production');
|
||||
$appConfigFile->addStringItem('resources.frontController.moduleDirectory', 'APPLICATION_PATH "/modules"', 'production', false);
|
||||
|
||||
if (strtolower($name) == 'default') {
|
||||
$response->appendContent('Added a key for the default module to the application.ini file');
|
||||
$appConfigFile = $this->_loadedProfile->search('ApplicationConfigFile');
|
||||
$appConfigFile->addStringItem('resources.frontController.params.prefixDefaultModule', '1', 'production');
|
||||
$appConfigFile->create();
|
||||
}
|
||||
|
||||
$appConfigFile->create();
|
||||
|
||||
// store changes to the profile
|
||||
$this->_storeProfile();
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Uri
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Uri.php 22538 2010-07-08 12:00:50Z shahar $
|
||||
* @version $Id: Uri.php 23376 2010-11-18 21:19:24Z bittarman $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -53,7 +53,12 @@ abstract class Zend_Uri
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
try {
|
||||
return $this->getUri();
|
||||
} catch (Exception $e) {
|
||||
trigger_error($e->getMessage(), E_USER_WARNING);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Uri
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Http.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Http.php 23409 2010-11-19 19:55:25Z bittarman $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -522,7 +522,7 @@ class Zend_Uri_Http extends Zend_Uri
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the path and filename portion of the URL, or FALSE if none.
|
||||
* Returns the path and filename portion of the URL.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Validate
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Abstract.php 22958 2010-09-17 20:40:25Z bittarman $
|
||||
* @version $Id: Abstract.php 23356 2010-11-18 15:59:10Z ralph $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -306,10 +306,12 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract
|
||||
* Build select object
|
||||
*/
|
||||
$select = new Zend_Db_Select($db);
|
||||
$select->from($this->_table, array($this->_field), $this->_schema)
|
||||
->where(
|
||||
$db->quoteIdentifier($this->_field, true).' = :value'
|
||||
);
|
||||
$select->from($this->_table, array($this->_field), $this->_schema);
|
||||
if ($db->supportsParameters('named')) {
|
||||
$select->where($db->quoteIdentifier($this->_field, true).' = :value'); // named
|
||||
} else {
|
||||
$select->where($db->quoteIdentifier($this->_field, true).' = ?'); // positional
|
||||
}
|
||||
if ($this->_exclude !== null) {
|
||||
if (is_array($this->_exclude)) {
|
||||
$select->where(
|
||||
@ -338,9 +340,11 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract
|
||||
/**
|
||||
* Run query
|
||||
*/
|
||||
$result = $select->getAdapter()->fetchRow($select,
|
||||
array('value' => $value),
|
||||
Zend_Db::FETCH_ASSOC);
|
||||
$result = $select->getAdapter()->fetchRow(
|
||||
$select,
|
||||
array('value' => $value), // this should work whether db supports positional or named params
|
||||
Zend_Db::FETCH_ASSOC
|
||||
);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Validate
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Interface.php 20352 2010-01-17 17:55:38Z thomas $
|
||||
* @version $Id: Interface.php 23262 2010-10-27 14:03:36Z matthew $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -36,7 +36,7 @@ interface Zend_Validate_Interface
|
||||
*
|
||||
* @param mixed $value
|
||||
* @return boolean
|
||||
* @throws Zend_Valid_Exception If validation of $value is impossible
|
||||
* @throws Zend_Validate_Exception If validation of $value is impossible
|
||||
*/
|
||||
public function isValid($value);
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Version
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Version.php 23196 2010-10-21 10:23:30Z alexander $
|
||||
* @version $Id: Version.php 23455 2010-11-29 16:24:55Z matthew $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@ final class Zend_Version
|
||||
/**
|
||||
* Zend Framework version identification - see compareVersion()
|
||||
*/
|
||||
const VERSION = '1.11.0';
|
||||
const VERSION = '1.11.1';
|
||||
|
||||
/**
|
||||
* The latest stable version Zend Framework available
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: FormSubmit.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: FormSubmit.php 23403 2010-11-19 19:23:29Z bittarman $
|
||||
*/
|
||||
|
||||
|
||||
@ -56,14 +56,17 @@ class Zend_View_Helper_FormSubmit extends Zend_View_Helper_FormElement
|
||||
public function formSubmit($name, $value = null, $attribs = null)
|
||||
{
|
||||
$info = $this->_getInfo($name, $value, $attribs);
|
||||
extract($info); // name, value, attribs, options, listsep, disable
|
||||
|
||||
extract($info); // name, value, attribs, options, listsep, disable, id
|
||||
// check if disabled
|
||||
$disabled = '';
|
||||
if ($disable) {
|
||||
$disabled = ' disabled="disabled"';
|
||||
}
|
||||
|
||||
if ($id) {
|
||||
$id = ' id="' . $this->view->escape($id) . '"';
|
||||
}
|
||||
|
||||
// XHTML or HTML end tag?
|
||||
$endTag = ' />';
|
||||
if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) {
|
||||
@ -73,7 +76,7 @@ class Zend_View_Helper_FormSubmit extends Zend_View_Helper_FormElement
|
||||
// Render the button.
|
||||
$xhtml = '<input type="submit"'
|
||||
. ' name="' . $this->view->escape($name) . '"'
|
||||
. ' id="' . $this->view->escape($id) . '"'
|
||||
. $id
|
||||
. ' value="' . $this->view->escape($value) . '"'
|
||||
. $disabled
|
||||
. $this->_htmlAttribs($attribs)
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @version $Id: HeadTitle.php 23170 2010-10-19 18:29:24Z mabe $
|
||||
* @version $Id: HeadTitle.php 23388 2010-11-19 00:37:55Z ramon $
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
@ -65,7 +65,6 @@ class Zend_View_Helper_HeadTitle extends Zend_View_Helper_Placeholder_Container_
|
||||
*
|
||||
* @param string $title
|
||||
* @param string $setType
|
||||
* @param string $separator
|
||||
* @return Zend_View_Helper_HeadTitle
|
||||
*/
|
||||
public function headTitle($title = null, $setType = null)
|
||||
@ -140,7 +139,7 @@ class Zend_View_Helper_HeadTitle extends Zend_View_Helper_Placeholder_Container_
|
||||
return $this;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieve translation object
|
||||
*
|
||||
* If none is currently registered, attempts to pull it from the registry
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @version $Id: Json.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: Json.php 23451 2010-11-28 13:10:03Z ramon $
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
@ -74,7 +74,7 @@ class Zend_View_Helper_Json extends Zend_View_Helper_Abstract
|
||||
}
|
||||
|
||||
$response = Zend_Controller_Front::getInstance()->getResponse();
|
||||
$response->setHeader('Content-Type', 'application/json');
|
||||
$response->setHeader('Content-Type', 'application/json', true);
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ServerUrl.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
* @version $Id: ServerUrl.php 23371 2010-11-18 20:49:55Z bittarman $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -52,9 +52,13 @@ class Zend_View_Helper_ServerUrl
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] === true)) {
|
||||
switch (true) {
|
||||
case (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] === true)):
|
||||
case (isset($_SERVER['HTTP_SCHEME']) && ($_SERVER['HTTP_SCHEME'] == 'https')):
|
||||
case (isset($_SERVER['SERVER_PORT']) && ($_SERVER['SERVER_PORT'] == 443)):
|
||||
$scheme = 'https';
|
||||
} else {
|
||||
break;
|
||||
default:
|
||||
$scheme = 'http';
|
||||
}
|
||||
$this->setScheme($scheme);
|
||||
|
Loading…
x
Reference in New Issue
Block a user