svn: /phd/branches/PHD_0_4/ include/PhDMediaManager.class.php phpdotnet/phd/MediaManager.php
| From: | Richard Quadling | Date: | Fri, 14 Aug 2009 14:47:28 +0000 |
| Subject: | svn: /phd/branches/PHD_0_4/ include/PhDMediaManager.class.php phpdotnet/phd/MediaManager.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4681@lists.php.net to get a copy of this message | ||
rquadling Fri, 14 Aug 2009 14:47:28 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287304
Log:
Return support for peardoc images (was in trunk)
Changed paths:
U phd/branches/PHD_0_4/include/PhDMediaManager.class.php
U phd/branches/PHD_0_4/phpdotnet/phd/MediaManager.php
Modified: phd/branches/PHD_0_4/include/PhDMediaManager.class.php
===================================================================
--- phd/branches/PHD_0_4/include/PhDMediaManager.class.php 2009-08-14 13:54:19 UTC (rev 287303)
+++ phd/branches/PHD_0_4/include/PhDMediaManager.class.php 2009-08-14 14:47:28 UTC (rev 287304)
@@ -85,7 +85,8 @@
protected function copyOver($filename, $newpath)
{
$fullpath = $this->output_dir . '/' . $newpath;
- $fullfilename = $this->relative_source_path . '../' . $filename;
+ $fullfilename = $this->relative_source_path . $filename;
+ $altfullfilename = $this->relative_source_path . '../' . $filename;
if (file_exists($fullpath)) {
//no need to copy over again
@@ -93,8 +94,12 @@
}
if (!file_exists($fullfilename)) {
- trigger_error('Image does not exist: ' . $fullfilename, E_USER_WARNING);
- return;
+ if (!file_exists($altfullfilename)) {
+ trigger_error('Image does not exist: ' . $fullfilename, E_USER_WARNING);
+ return;
+ }
+
+ $fullfilename = $altfullfilename;
}
if (!$this->media_dir_exists) {
Modified: phd/branches/PHD_0_4/phpdotnet/phd/MediaManager.php
===================================================================
--- phd/branches/PHD_0_4/phpdotnet/phd/MediaManager.php 2009-08-14 13:54:19 UTC (rev 287303)
+++ phd/branches/PHD_0_4/phpdotnet/phd/MediaManager.php 2009-08-14 14:47:28 UTC (rev 287304)
@@ -86,6 +86,7 @@
{
$fullpath = $this->output_dir . '/' . $newpath;
$fullfilename = $this->relative_source_path . $filename;
+ $altfullfilename = $this->relative_source_path . '../' . $filename;
if (file_exists($fullpath)) {
//no need to copy over again
@@ -93,8 +94,12 @@
}
if (!file_exists($fullfilename)) {
- trigger_error('Image does not exist: ' . $fullfilename, E_USER_WARNING);
- return;
+ if (!file_exists($altfullfilename)) {
+ trigger_error('Image does not exist: ' . $fullfilename, E_USER_WARNING);
+ return;
+ }
+
+ $fullfilename = $altfullfilename;
}
if (!$this->media_dir_exists) {