Commit d4930f483ddb0df69531d338b4bf1a9a7be82fb8

Authored by Paul Barrett
2 parents 5520efe0 13922396

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

bin/upgrade/pear-upgrade.bat deleted
1 -  
2 -; TEST ALL PEAR LIBRARIES BEFORE UPGRADING INTO RELEASE  
3 -  
4 -PATH=%PATH%;c:\php5\PEAR  
5 -  
6 -pear channel-update pear.php.net  
7 -pear config-set php_dir "C:\kt\kt.trunk\thirdparty\pear"  
8 -  
9 -pear config-set preferred_state stable  
10 -  
11 -pear upgrade --alldeps PEAR  
12 -pear upgrade --alldeps Cache_Lite  
13 -pear upgrade --alldeps Config  
14 -pear upgrade --alldeps DB  
15 -pear upgrade --alldeps File  
16 -  
17 -;pear upgrade --alldeps MDB2#mysql  
18 -  
19 -pear upgrade --alldeps Log  
20 -pear upgrade --alldeps PHP_Compat  
21 -  
22 -pear config-set preferred_state beta  
23 -pear upgrade --alldeps File_Gettext  
24 -pear upgrade --alldeps Net_LDAP  
25 -pear upgrade --alldeps SOAP  
26 -pear config-set preferred_state stable  
27 -  
plugins/ktcore/admin/manageBranding.php
@@ -47,7 +47,6 @@ require_once(KT_LIB_DIR . "/validation/dispatchervalidation.inc.php"); @@ -47,7 +47,6 @@ require_once(KT_LIB_DIR . "/validation/dispatchervalidation.inc.php");
47 require_once(KT_LIB_DIR . "/metadata/fieldsetregistry.inc.php"); 47 require_once(KT_LIB_DIR . "/metadata/fieldsetregistry.inc.php");
48 require_once(KT_LIB_DIR . "/validation/validatorfactory.inc.php"); 48 require_once(KT_LIB_DIR . "/validation/validatorfactory.inc.php");
49 49
50 -  
51 class ManageBrandDispatcher extends KTAdminDispatcher { 50 class ManageBrandDispatcher extends KTAdminDispatcher {
52 51
53 private $maxLogoWidth = 313; 52 private $maxLogoWidth = 313;
@@ -61,7 +60,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -61,7 +60,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
61 } 60 }
62 61
63 function do_main() { 62 function do_main() {
64 -  
65 $oForms[] = $this->getLogoDetailsForm(); 63 $oForms[] = $this->getLogoDetailsForm();
66 $oForms[] = $this->getUploadLogoForm(); 64 $oForms[] = $this->getUploadLogoForm();
67 65
@@ -126,7 +124,7 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -126,7 +124,7 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
126 'name' => 'logo_url', 124 'name' => 'logo_url',
127 'id' => 'file', 125 'id' => 'file',
128 'value' => $logoUrl, 126 'value' => $logoUrl,
129 - 'description' => _kt("This is the website address you will be redirected to after clicking the logo"), 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."),
130 )); 128 ));
131 129
132 $oForm->setWidgets($widgets); 130 $oForm->setWidgets($widgets);
@@ -445,6 +443,12 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -445,6 +443,12 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
445 $config =& KTConfig::getSingleton(); 443 $config =& KTConfig::getSingleton();
446 $logoUrl = $_REQUEST['data']['logo_url']; 444 $logoUrl = $_REQUEST['data']['logo_url'];
447 $logoTitle = $_REQUEST['data']['logo_title']; 445 $logoTitle = $_REQUEST['data']['logo_title'];
  446 +
  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."));
  449 + }
  450 +
  451 + $logoTitle = addslashes(htmlentities($logoTitle));
448 452
449 if ($config->set('ui/companyLogoUrl', $logoUrl) && $config->set('ui/companyLogoTitle', $logoTitle)) { 453 if ($config->set('ui/companyLogoUrl', $logoUrl) && $config->set('ui/companyLogoTitle', $logoTitle)) {
450 $this->successRedirectTo('main', _kt('Logo fields have been successfully updated.')); 454 $this->successRedirectTo('main', _kt('Logo fields have been successfully updated.'));
@@ -597,7 +601,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -597,7 +601,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
597 601
598 } 602 }
599 603
600 -  
601 /** 604 /**
602 * Returns the MIME of the filename, deducted from its extension 605 * Returns the MIME of the filename, deducted from its extension
603 * If the extension is unknown, returns "image/jpeg" 606 * If the extension is unknown, returns "image/jpeg"
@@ -674,7 +677,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher { @@ -674,7 +677,6 @@ class ManageBrandDispatcher extends KTAdminDispatcher {
674 677
675 return FALSE; 678 return FALSE;
676 } 679 }
677 -  
678 680
679 /* 681 /*
680 * This method uses the GD library to scale an image. 682 * This method uses the GD library to scale an image.