mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merged revisions 46775 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-privacy ........ r46775 | aoneil | 2007-12-14 09:40:30 +1300 (Fri, 14 Dec 2007) | 2 lines Fix loops when saving files ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46782 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
21c69b95c5
commit
4056408d73
@ -240,7 +240,7 @@ class File extends DataObject {
|
||||
$i++;
|
||||
$tmp = TEMP_FOLDER;
|
||||
`echo "$i / $total" > $tmp/progress`;
|
||||
$file->loadContent();
|
||||
$file->write();
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,22 +255,18 @@ class File extends DataObject {
|
||||
|
||||
//echo("<pre>Content for $this->Filename:\n$content</pre>");
|
||||
$this->Content = $content;
|
||||
$this->write();
|
||||
break;
|
||||
case 'doc':
|
||||
$content = `catdoc $filename`;
|
||||
$this->Content = $content;
|
||||
$this->write();
|
||||
break;
|
||||
case 'ppt':
|
||||
$content = `catppt $filename`;
|
||||
$this->Content = $content;
|
||||
$this->write();
|
||||
break;
|
||||
case 'txt';
|
||||
$content = file_get_contents($this->FileName);
|
||||
$this->Content = $content;
|
||||
$this->write();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user