Skip to content

Commit

Permalink
Fixed issue #4156: ComfortUpgrade not working because the directories…
Browse files Browse the repository at this point in the history
… /locale/ms and /locale/ms/LC_MESSAGES are not found - for solutions with earlier versions please visit http://bugs.limesurvey.org/view.php?id=4156

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8447 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Mar 2, 2010
1 parent 92c9319 commit 571dbd8
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions admin/update/updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,25 @@ function UpdateStep2()

foreach ($updateinfo['files'] as $afile)
{
if (($afile['type']=='A' || !file_exists($rootdir.$afile['file'])) && !is_writable(dirname($rootdir.$afile['file'])))
{
$readonlyfiles[]=dirname($rootdir.$afile['file']);
}
if ($afile['type']=='A' && !file_exists($rootdir.$afile['file']))
{
$searchpath=$rootdir.$afile['file'];
$is_writable=is_writable(dirname($searchpath));
while (!$is_writable && strlen($searchpath)>strlen($rootdir))
{
$searchpath=dirname($searchpath);
if (file_exists($searchpath))
{
$is_writable=is_writable($searchpath);
break;

}
}
if (!$is_writable)
{
$readonlyfiles[]=$searchpath;
}
}
elseif (file_exists($rootdir.$afile['file']) && !is_writable($rootdir.$afile['file'])) {
$readonlyfiles[]=$rootdir.$afile['file'];
}
Expand Down

0 comments on commit 571dbd8

Please sign in to comment.