--- library/Zend/Dojo/View/Helper/Dojo/Container.php (revision 24401) +++ library/Zend/Dojo/View/Helper/Dojo/Container.php (working copy) @@ -70,6 +70,12 @@ protected $_cdnVersion = '1.5.0'; /** + * Whether to use SSL for CDN or not + * @var bool + */ + protected $_cdnSsl = false; + + /** * Has the dijit loader been registered? * @var bool */ @@ -418,6 +424,21 @@ */ public function getCdnBase() { + if ($this->_cdnBase == Zend_Dojo::CDN_BASE_AOL + && $this->getCdnSsl() === true) { + throw new Zend_Dojo_View_Exception("AOL CDN does not support SSL, please use Google CDN if you need SSL support!"); + } + + if ($this->_cdnBase == Zend_Dojo::CDN_BASE_GOOGLE + && $this->getCdnSsl() === true) { + $this->_cdnBase = Zend_Dojo::CDN_BASE_GOOGLE_SSL; + } + + if ($this->_cdnBase == Zend_Dojo::CDN_BASE_GOOGLE_SSL + && $this->getCdnSsl() === false) { + $this->setCdnSsl(true); + } + return $this->_cdnBase; } @@ -478,6 +499,18 @@ return !$this->useLocalPath(); } + public function setCdnSsl($flag) + { + $this->_cdnSsl = (bool) $flag; + + return $this; + } + + public function getCdnSsl() + { + return $this->_cdnSsl; + } + /** * Set path to local dojo * Index: library/Zend/Dojo.php =================================================================== --- library/Zend/Dojo.php (revision 24401) +++ library/Zend/Dojo.php (working copy) @@ -44,6 +44,11 @@ const CDN_BASE_GOOGLE = 'http://ajax.googleapis.com/ajax/libs/dojo/'; /** + * Base path to Google SSL CDN + */ + const CDN_BASE_GOOGLE_SSL = 'https://ajax.googleapis.com/ajax/libs/dojo/'; + + /** * Path to dojo on Google CDN (following version string) */ const CDN_DOJO_PATH_GOOGLE = '/dojo/dojo.xd.js';