Rename getBootstrapDirecory() to getBootstrapDirectory()

This commit is contained in:
Eric Lippmann 2014-11-12 17:14:09 +01:00
parent 5da82a3164
commit 75475b1684
4 changed files with 7 additions and 7 deletions

View File

@ -114,11 +114,11 @@ abstract class ApplicationBootstrap
protected function __construct($baseDir = null, $configDir = null) protected function __construct($baseDir = null, $configDir = null)
{ {
if ($baseDir === null) { if ($baseDir === null) {
$baseDir = dirname($this->getBootstrapDirecory()); $baseDir = dirname($this->getBootstrapDirectory());
} }
$this->baseDir = $baseDir; $this->baseDir = $baseDir;
if (! defined('ICINGAWEB_BASEDIR')) { if (! defined('ICINGAWEB_BASEDIR')) {
define('ICINGAWEB_BASEDIR', dirname($this->getBootstrapDirecory())); define('ICINGAWEB_BASEDIR', dirname($this->getBootstrapDirectory()));
} }
define('ICINGAWEB_VENDORS', ICINGAWEB_BASEDIR . '/library/vendor'); define('ICINGAWEB_VENDORS', ICINGAWEB_BASEDIR . '/library/vendor');
define('ICINGAWEB_APPDIR', ICINGAWEB_BASEDIR . '/application'); define('ICINGAWEB_APPDIR', ICINGAWEB_BASEDIR . '/application');
@ -265,7 +265,7 @@ abstract class ApplicationBootstrap
* *
* @return string * @return string
*/ */
public function getBootstrapDirecory() public function getBootstrapDirectory()
{ {
return dirname(realpath($_SERVER['SCRIPT_FILENAME'])); return dirname(realpath($_SERVER['SCRIPT_FILENAME']));
} }

View File

@ -49,7 +49,7 @@ class Pdf extends DOMPDF
$layout->content = $controller->getResponse(); $layout->content = $controller->getResponse();
$html = $layout->render(); $html = $layout->render();
$imgDir = Url::fromPath('img'); $imgDir = Url::fromPath('img');
$html = preg_replace('~src="' . $imgDir . '/~', 'src="' . Icinga::app()->getBootstrapDirecory() . '/img/', $html); $html = preg_replace('~src="' . $imgDir . '/~', 'src="' . Icinga::app()->getBootstrapDirectory() . '/img/', $html);
$html = preg_replace('~src="/svg/chart.php(.*)"~', 'class="icon" src="http://master1.com/png/chart.php$1"', $html); $html = preg_replace('~src="/svg/chart.php(.*)"~', 'class="icon" src="http://master1.com/png/chart.php$1"', $html);
$this->load_html($html); $this->load_html($html);
$this->render(); $this->render();

View File

@ -67,7 +67,7 @@ class JavaScript
public static function send($minified = false) public static function send($minified = false)
{ {
header('Content-Type: application/javascript'); header('Content-Type: application/javascript');
$basedir = Icinga::app()->getBootstrapDirecory(); $basedir = Icinga::app()->getBootstrapDirectory();
$js = $out = ''; $js = $out = '';
$min = $minified ? '.min' : ''; $min = $minified ? '.min' : '';

View File

@ -31,7 +31,7 @@ class StyleSheet
public static function compileForPdf() public static function compileForPdf()
{ {
$less = new LessCompiler(); $less = new LessCompiler();
$basedir = Icinga::app()->getBootstrapDirecory(); $basedir = Icinga::app()->getBootstrapDirectory();
foreach (self::$lessFiles as $file) { foreach (self::$lessFiles as $file) {
$less->addFile($basedir . '/' . $file); $less->addFile($basedir . '/' . $file);
} }
@ -57,7 +57,7 @@ class StyleSheet
public static function send($minified = false) public static function send($minified = false)
{ {
$app = Icinga::app(); $app = Icinga::app();
$basedir = $app->getBootstrapDirecory(); $basedir = $app->getBootstrapDirectory();
foreach (self::$lessFiles as $file) { foreach (self::$lessFiles as $file) {
$lessFiles[] = $basedir . '/' . $file; $lessFiles[] = $basedir . '/' . $file;
} }