diff --git a/lib/foldermanagement/compressionArchiveUtil.inc.php b/lib/foldermanagement/compressionArchiveUtil.inc.php index bddf3cf..5801826 100644 --- a/lib/foldermanagement/compressionArchiveUtil.inc.php +++ b/lib/foldermanagement/compressionArchiveUtil.inc.php @@ -668,9 +668,10 @@ class DownloadQueue * * @param unknown_type $zip * @param unknown_type $docId + * @param boolean $alerts * @return unknown */ - public function addDocument(&$zip, $docId) + public function addDocument(&$zip, $docId, $alerts = true) { $oDocument = Document::get($docId); @@ -685,7 +686,7 @@ class DownloadQueue } // fire subscription alerts for the downloaded document - if global config is set - if($this->bNotifications){ + if($this->bNotifications && $alerts){ $oSubscriptionEvent = new SubscriptionEvent(); $oFolder = Folder::get($oDocument->getFolderID()); $oSubscriptionEvent->DownloadDocument($oDocument, $oFolder); diff --git a/plugins/ktcore/KTBulkActions.php b/plugins/ktcore/KTBulkActions.php index 01e285d..13ed4f3 100644 --- a/plugins/ktcore/KTBulkActions.php +++ b/plugins/ktcore/KTBulkActions.php @@ -1194,7 +1194,6 @@ class KTBrowseBulkExportAction extends KTBulkAction { * */ function perform_action($oEntity) { - // TODO find a way to do bulk email $exportCode = $_SESSION['exportcode']; $this->oZip = ZipFolder::get($exportCode); @@ -1213,7 +1212,7 @@ class KTBrowseBulkExportAction extends KTBulkAction { if($useQueue){ DownloadQueue::addItem($this->sExportCode, $this->oFolder->getId(), $oDocument->iId, 'document'); }else{ - $oQueue->addDocument($this->oZip, $oDocument->iId); + $oQueue->addDocument($this->oZip, $oDocument->iId, false); } diff --git a/plugins/ktcore/admin/manageBranding.php b/plugins/ktcore/admin/manageBranding.php index 8313f57..75ba5b7 100755 --- a/plugins/ktcore/admin/manageBranding.php +++ b/plugins/ktcore/admin/manageBranding.php @@ -96,10 +96,11 @@ class ManageBrandDispatcher extends KTAdminDispatcher { 'encoding' => 'multipart/form-data', 'context' => &$this, 'extraargs' => $this->meldPersistQuery("","",true), - 'description' => _kt('You can set the branding details.') + 'description' => _kt('You can set the branding details.') )); $oWF =& KTWidgetFactory::getSingleton(); + $oVF =& KTValidatorFactory::getSingleton(); $widgets = array(); $validators = array(); @@ -126,6 +127,13 @@ class ManageBrandDispatcher extends KTAdminDispatcher { 'value' => $logoUrl, 'description' => _kt("This is the website address you will be redirected to after clicking the logo. The url should include the protocol e.g. http://www.knowledgetree.com . If no protocol is given the url is treated as a relative link."), )); + + + // Adding the url widget + $validators[] = $oVF->get('ktcore.widgets.string', array( + 'test' => 'logo_url', + 'output' => 'logo_url', + )); $oForm->setWidgets($widgets); $oForm->setValidators($validators); @@ -428,9 +436,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher { return $oForm; } - - - /* * Action responsible for setting the logo details @@ -443,12 +448,12 @@ class ManageBrandDispatcher extends KTAdminDispatcher { $config =& KTConfig::getSingleton(); $logoUrl = $_REQUEST['data']['logo_url']; $logoTitle = $_REQUEST['data']['logo_title']; + + $aOptions = array('redirect_to' => 'main'); - if(!preg_match('/([a-z])|([A-Z])|([0-9])/', $logoTitle)){ - $this->errorRedirectTo('main', _kt("You have entered an invalid character in the logo title. You may use only letters and numbers.")); + if ($logoTitle != '') { + $this->oValidator->validateIllegalCharacters($logoTitle, $aOptions); } - - $logoTitle = addslashes(htmlentities($logoTitle)); if ($config->set('ui/companyLogoUrl', $logoUrl) && $config->set('ui/companyLogoTitle', $logoTitle)) { $this->successRedirectTo('main', _kt('Logo fields have been successfully updated.')); @@ -458,8 +463,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher { } - - /* * Action responsible for uploading the logo * diff --git a/sql/mysql/install/data.sql b/sql/mysql/install/data.sql index 221b4c1..210b26c 100755 --- a/sql/mysql/install/data.sql +++ b/sql/mysql/install/data.sql @@ -1781,7 +1781,8 @@ INSERT INTO `upgrades` VALUES (235,'sql*3.7.0.3*0*3.7.0.3/clienttools_config.sql','Database upgrade to version 3.7.0.3: Clienttools Config','2009-12-10 00:00:00',1,'upgrade*3.7.0.3*99*upgrade3.7.0.3'), (236,'sql*3.7.0.3*0*3.7.0.3/uploaded_files.sql','Database upgrade to version 3.7.0.3: Uploaded Files','2009-12-10 00:00:00',1,'upgrade*3.7.0.3*99*upgrade3.7.0.3'), (237,'sql*3.7.0.3*0*3.7.0.3/active_sessions_ip.sql','Database upgrade to version 3.7.0.3: Active Sessions Ip','2009-12-10 00:00:00',1,'upgrade*3.7.0.3*99*upgrade3.7.0.3'), -(238,'upgrade*3.7.0.3*99*upgrade3.7.0.3','Upgrade from version 3.7.0.2 to 3.7.0.3','2009-12-14 00:00:00',1,'upgrade*3.7.0.3*99*upgrade3.7.0.3'); +(238,'sql*3.7.0.3*0*3.7.0.3/download_queue_zip.sql','Database upgrade to version 3.7.0.3: Download Queue Zip','2009-12-10 00:00:00',1,'upgrade*3.7.0.3*99*upgrade3.7.0.3'), +(239,'upgrade*3.7.0.3*99*upgrade3.7.0.3','Upgrade from version 3.7.0.2 to 3.7.0.3','2009-12-14 00:00:00',1,'upgrade*3.7.0.3*99*upgrade3.7.0.3'); /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; UNLOCK TABLES;