Commit 6e4e74a48813ffd6d6cd7b1340733c4d578d2231

Authored by Paul Barrett
2 parents 4c9c1962 45f8547e

Merge branch 'edge' of github.com:ktgit/knowledgetree into edge

lib/foldermanagement/compressionArchiveUtil.inc.php
@@ -668,9 +668,10 @@ class DownloadQueue @@ -668,9 +668,10 @@ class DownloadQueue
668 * 668 *
669 * @param unknown_type $zip 669 * @param unknown_type $zip
670 * @param unknown_type $docId 670 * @param unknown_type $docId
  671 + * @param boolean $alerts
671 * @return unknown 672 * @return unknown
672 */ 673 */
673 - public function addDocument(&$zip, $docId) 674 + public function addDocument(&$zip, $docId, $alerts = true)
674 { 675 {
675 676
676 $oDocument = Document::get($docId); 677 $oDocument = Document::get($docId);
@@ -685,7 +686,7 @@ class DownloadQueue @@ -685,7 +686,7 @@ class DownloadQueue
685 } 686 }
686 687
687 // fire subscription alerts for the downloaded document - if global config is set 688 // fire subscription alerts for the downloaded document - if global config is set
688 - if($this->bNotifications){ 689 + if($this->bNotifications && $alerts){
689 $oSubscriptionEvent = new SubscriptionEvent(); 690 $oSubscriptionEvent = new SubscriptionEvent();
690 $oFolder = Folder::get($oDocument->getFolderID()); 691 $oFolder = Folder::get($oDocument->getFolderID());
691 $oSubscriptionEvent->DownloadDocument($oDocument, $oFolder); 692 $oSubscriptionEvent->DownloadDocument($oDocument, $oFolder);
plugins/ktcore/KTBulkActions.php
@@ -1194,7 +1194,6 @@ class KTBrowseBulkExportAction extends KTBulkAction { @@ -1194,7 +1194,6 @@ class KTBrowseBulkExportAction extends KTBulkAction {
1194 * 1194 *
1195 */ 1195 */
1196 function perform_action($oEntity) { 1196 function perform_action($oEntity) {
1197 - // TODO find a way to do bulk email  
1198 $exportCode = $_SESSION['exportcode']; 1197 $exportCode = $_SESSION['exportcode'];
1199 $this->oZip = ZipFolder::get($exportCode); 1198 $this->oZip = ZipFolder::get($exportCode);
1200 1199
@@ -1213,7 +1212,7 @@ class KTBrowseBulkExportAction extends KTBulkAction { @@ -1213,7 +1212,7 @@ class KTBrowseBulkExportAction extends KTBulkAction {
1213 if($useQueue){ 1212 if($useQueue){
1214 DownloadQueue::addItem($this->sExportCode, $this->oFolder->getId(), $oDocument->iId, 'document'); 1213 DownloadQueue::addItem($this->sExportCode, $this->oFolder->getId(), $oDocument->iId, 'document');
1215 }else{ 1214 }else{
1216 - $oQueue->addDocument($this->oZip, $oDocument->iId); 1215 + $oQueue->addDocument($this->oZip, $oDocument->iId, false);
1217 } 1216 }
1218 1217
1219 1218
plugins/ktcore/admin/manageBranding.php
@@ -96,10 +96,11 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -96,10 +96,11 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
96 'encoding' => 'multipart/form-data', 96 'encoding' => 'multipart/form-data',
97 'context' => &$this, 97 'context' => &$this,
98 'extraargs' => $this->meldPersistQuery("","",true), 98 'extraargs' => $this->meldPersistQuery("","",true),
99 - 'description' => _kt('You can set the branding details.') 99 + 'description' => _kt('You can set the branding details.')
100 )); 100 ));
101 101
102 $oWF =& KTWidgetFactory::getSingleton(); 102 $oWF =& KTWidgetFactory::getSingleton();
  103 + $oVF =& KTValidatorFactory::getSingleton();
103 104
104 $widgets = array(); 105 $widgets = array();
105 $validators = array(); 106 $validators = array();
@@ -126,6 +127,13 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -126,6 +127,13 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
126 'value' => $logoUrl, 127 'value' => $logoUrl,
127 '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."), 128 '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."),
128 )); 129 ));
  130 +
  131 +
  132 + // Adding the url widget
  133 + $validators[] = $oVF->get('ktcore.widgets.string', array(
  134 + 'test' => 'logo_url',
  135 + 'output' => 'logo_url',
  136 + ));
129 137
130 $oForm->setWidgets($widgets); 138 $oForm->setWidgets($widgets);
131 $oForm->setValidators($validators); 139 $oForm->setValidators($validators);
@@ -428,9 +436,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -428,9 +436,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
428 436
429 return $oForm; 437 return $oForm;
430 } 438 }
431 -  
432 -  
433 -  
434 439
435 /* 440 /*
436 * Action responsible for setting the logo details 441 * Action responsible for setting the logo details
@@ -443,12 +448,12 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -443,12 +448,12 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
443 $config =& KTConfig::getSingleton(); 448 $config =& KTConfig::getSingleton();
444 $logoUrl = $_REQUEST['data']['logo_url']; 449 $logoUrl = $_REQUEST['data']['logo_url'];
445 $logoTitle = $_REQUEST['data']['logo_title']; 450 $logoTitle = $_REQUEST['data']['logo_title'];
  451 +
  452 + $aOptions = array('redirect_to' => 'main');
446 453
447 - if(!preg_match('/([a-z])|([A-Z])|([0-9])/', $logoTitle)){  
448 - $this->errorRedirectTo('main', _kt("You have entered an invalid character in the logo title. You may use only letters and numbers.")); 454 + if ($logoTitle != '') {
  455 + $this->oValidator->validateIllegalCharacters($logoTitle, $aOptions);
449 } 456 }
450 -  
451 - $logoTitle = addslashes(htmlentities($logoTitle));  
452 457
453 if ($config->set('ui/companyLogoUrl', $logoUrl) && $config->set('ui/companyLogoTitle', $logoTitle)) { 458 if ($config->set('ui/companyLogoUrl', $logoUrl) && $config->set('ui/companyLogoTitle', $logoTitle)) {
454 $this->successRedirectTo('main', _kt('Logo fields have been successfully updated.')); 459 $this->successRedirectTo('main', _kt('Logo fields have been successfully updated.'));
@@ -458,8 +463,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -458,8 +463,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
458 463
459 } 464 }
460 465
461 -  
462 -  
463 /* 466 /*
464 * Action responsible for uploading the logo 467 * Action responsible for uploading the logo
465 * 468 *
sql/mysql/install/data.sql
@@ -1781,7 +1781,8 @@ INSERT INTO `upgrades` VALUES @@ -1781,7 +1781,8 @@ INSERT INTO `upgrades` VALUES
1781 (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'), 1781 (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'),
1782 (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'), 1782 (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'),
1783 (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'), 1783 (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'),
1784 -(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'); 1784 +(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'),
  1785 +(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');
1785 /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; 1786 /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */;
1786 UNLOCK TABLES; 1787 UNLOCK TABLES;
1787 1788