1
0
mirror of https://github.com/php/phd.git synced 2026-03-23 22:52:05 +01:00

Revert. Christian will explain later.

This commit is contained in:
Richard Quadling
2009-02-18 12:57:10 +00:00
parent 8f1fd43e92
commit b5e456b6f6
7 changed files with 13 additions and 19 deletions

View File

@@ -116,7 +116,7 @@ foreach($OPTIONS["output_format"] as $output_format) {
$themes[$themename] = new $themename(array($IDs, $REFS, $CLASSES, $VARS));
}
$themes[$themename]->postConstruct($OPTIONS["xml_root"]);
$themes[$themename]->postConstruct();
$themes[$themename]->registerFormat($format);

View File

@@ -18,7 +18,7 @@ class PhDMediaManager
public $output_dir = null;
/**
* Path the media files are referenced relative to in xml.
* Path the media files are referenced relative to in html.
* Trailing slash required.
*
* @var string
@@ -48,13 +48,12 @@ class PhDMediaManager
{
$basename = basename($filename);
$newname = md5(substr($filename, 0, -strlen($basename))) . '-' . $basename;
//FIXME: make images dynamic according to file type (e.g. video)
$newpath = 'images/' . $newname;
$this->copyOver($this->relative_path . $filename, $newpath);
$this->copyOver($filename, $newpath);
return $newpath;
return $this->relative_path . $newpath;
}//public function handleFile(..)

View File

@@ -24,7 +24,7 @@ abstract class PhDTheme extends PhDHelper implements iPhDTheme {
*
* @see PhDThemeXhtml::postConstruct()
*/
public function postConstruct($relative_path) {}
public function postConstruct() {}

View File

@@ -37,11 +37,9 @@ abstract class PhDThemeXhtml extends PhDTheme
* Each theme needs its own media manager, since the manager contains
* the output path.
*
* @param string $relative_path Path the media files are referenced relative to in xml.
*
* @return void
*/
public function postConstruct($relative_path)
public function postConstruct()
{
$this->mediamanager = new PhDMediaManager();
@@ -49,8 +47,8 @@ abstract class PhDThemeXhtml extends PhDTheme
$this->mediamanager->output_dir = $this->outputdir;
} else {
$this->mediamanager->output_dir = $this->outputfile . '-data/';
$this->mediamanager->relative_path = basename($this->mediamanager->output_dir) . '/';
}
$this->mediamanager->relative_path = $relative_path . '/';
}//public function postConstruct()

View File

@@ -18,7 +18,7 @@ class PhDMediaManager
public $output_dir = null;
/**
* Path the media files are referenced relative to in xml.
* Path the media files are referenced relative to in html.
* Trailing slash required.
*
* @var string
@@ -48,13 +48,12 @@ class PhDMediaManager
{
$basename = basename($filename);
$newname = md5(substr($filename, 0, -strlen($basename))) . '-' . $basename;
//FIXME: make images dynamic according to file type (e.g. video)
$newpath = 'images/' . $newname;
$this->copyOver($this->relative_path . $filename, $newpath);
$this->copyOver($filename, $newpath);
return $newpath;
return $this->relative_path . $newpath;
}//public function handleFile(..)

View File

@@ -24,7 +24,7 @@ abstract class PhDTheme extends PhDHelper implements iPhDTheme {
*
* @see PhDThemeXhtml::postConstruct()
*/
public function postConstruct($relative_path) {}
public function postConstruct() {}

View File

@@ -37,11 +37,9 @@ abstract class PhDThemeXhtml extends PhDTheme
* Each theme needs its own media manager, since the manager contains
* the output path.
*
* @param string $relative_path Path the media files are referenced relative to in xml.
*
* @return void
*/
public function postConstruct($relative_path)
public function postConstruct()
{
$this->mediamanager = new PhDMediaManager();
@@ -49,8 +47,8 @@ abstract class PhDThemeXhtml extends PhDTheme
$this->mediamanager->output_dir = $this->outputdir;
} else {
$this->mediamanager->output_dir = $this->outputfile . '-data/';
$this->mediamanager->relative_path = basename($this->mediamanager->output_dir) . '/';
}
$this->mediamanager->relative_path = $relative_path . '/';
}//public function postConstruct()