Commit d27535c7 authored by Carsten Schmitz's avatar Carsten Schmitz

Fixed issue #9822: Unable to upload image on server via KCFinder

parent 9424e01a
......@@ -13,7 +13,7 @@
*/
$config['versionnumber'] = "2.06+";
$config['dbversionnumber'] = 183;
$config['dbversionnumber'] = 184;
$config['buildnumber'] = '';
$config['updatable'] = true;
......
......@@ -1307,16 +1307,16 @@ function db_upgrade_all($iOldDBVersion) {
upgradeSurveyTables181();
$oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>181),"stg_name='DBVersion'");
}
if ($iOldDBVersion < 182)
{
fixKCFinder182();
$oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>182),"stg_name='DBVersion'");
}
if ($iOldDBVersion < 183)
{
upgradeSurveyTables183();
$oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>183),"stg_name='DBVersion'");
}
if ($iOldDBVersion < 184)
{
fixKCFinder184();
$oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>184),"stg_name='DBVersion'");
}
$oTransaction->commit();
// Activate schema caching
$oDB->schemaCachingDuration=3600;
......@@ -1361,15 +1361,15 @@ function upgradeSurveyTables183()
}
function fixKCFinder182()
function fixKCFinder184()
{
$sThirdPartyDir=Yii::app()->getConfig('standardtemplaterootdir').DIRECTORY_SEPARATOR.'third_party'.DIRECTORY_SEPARATOR;
$sThirdPartyDir=Yii::app()->getConfig('homedir').DIRECTORY_SEPARATOR.'third_party'.DIRECTORY_SEPARATOR;
rmdirr($sThirdPartyDir.'ckeditor/plugins/toolbar');
rmdirr($sThirdPartyDir.'ckeditor/plugins/toolbar/ls-office2003');
array_map('unlink', glob($sThirdPartyDir.'kcfinder/cache/*.js'));
array_map('unlink', glob($sThirdPartyDir.'kcfinder/cache/*.css'));
rmdirr($sThirdPartyDir.'kcfinder/upload/files');
rmdirr($sThirdPartyDir.'kcfinder/upload/.htumbs');
rmdirr($sThirdPartyDir.'kcfinder/upload/.thumbs');
}
......
......@@ -566,4 +566,4 @@ create index [parent_qid_idx] on [prefix_questions] ([parent_qid]);
--
-- Version Info
--
INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '183');
INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '184');
......@@ -575,4 +575,4 @@ CREATE INDEX `parent_qid_idx` ON `prefix_questions` (`parent_qid`);
--
-- Version Info
--
INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '183');
INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '184');
......@@ -576,4 +576,4 @@ create unique index permissions_idx2 ON prefix_permissions (entity_id, entity, u
--
-- Version Info
--
INSERT INTO prefix_settings_global VALUES ('DBVersion', '183');
INSERT INTO prefix_settings_global VALUES ('DBVersion', '184');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment