diff --git a/init.php b/init.php index 275db2a3..ec7a32df 100644 --- a/init.php +++ b/init.php @@ -1,4 +1,6 @@ main->mediaPath . DS . 'css' . DS; +$jsPath = $config->main->mediaPath . DS . 'js' . DS; +$fontsPath = $config->main->mediaPath . DS . 'fonts' . DS; //jQuery -download('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', $path . 'media/js/jquery.min.js'); -download('http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', $path . 'media/js/jquery-ui.min.js'); -download('http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/flick/jquery-ui.css', $path . 'media/css/jquery-ui.css'); +download('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', $jsPath . 'jquery.min.js'); +download('http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', $jsPath . 'jquery-ui.min.js'); +download('http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/flick/jquery-ui.css', $cssPath . 'jquery-ui.css'); //jQuery Tag-it! -download('http://raw.github.com/aehlke/tag-it/master/css/jquery.tagit.css', $path . 'media/css/jquery.tagit.css'); -download('http://raw.github.com/aehlke/tag-it/master/js/tag-it.min.js', $path . 'media/js/jquery.tagit.js'); +download('http://raw.github.com/aehlke/tag-it/master/css/jquery.tagit.css', $cssPath . 'jquery.tagit.css'); +download('http://raw.github.com/aehlke/tag-it/master/js/tag-it.min.js', $jsPath . 'jquery.tagit.js'); //fonts -download('http://googlefontdirectory.googlecode.com/hg/apache/droidsans/DroidSans.ttf', $path . 'media/fonts/DroidSans.ttf'); -download('http://googlefontdirectory.googlecode.com/hg/apache/droidsans/DroidSans-Bold.ttf', $path . 'media/fonts/DroidSans-Bold.ttf'); +download('http://googlefontdirectory.googlecode.com/hg/apache/droidsans/DroidSans.ttf', $fontsPath . 'DroidSans.ttf'); +download('http://googlefontdirectory.googlecode.com/hg/apache/droidsans/DroidSans-Bold.ttf', $fontsPath . 'DroidSans-Bold.ttf'); diff --git a/lib/chibi-core b/lib/chibi-core index 84882328..b5876a67 160000 --- a/lib/chibi-core +++ b/lib/chibi-core @@ -1 +1 @@ -Subproject commit 8488232806fd5ceecb25af39036f250b081ada3d +Subproject commit b5876a672d107e4d6599cec52b9fa36e5558c16b diff --git a/public_html/dispatch.php b/public_html/dispatch.php index da58de54..f43c0e39 100644 --- a/public_html/dispatch.php +++ b/public_html/dispatch.php @@ -1,18 +1,7 @@ config->main->filesPath . DIRECTORY_SEPARATOR . $name; + $path = $this->config->main->filesPath . DS . $name; } while (file_exists($path)); @@ -228,10 +228,10 @@ class PostController PrivilegesHelper::confirmWithException($this->context->user, Privilege::ViewPost); PrivilegesHelper::confirmWithException($this->context->user, Privilege::ViewPost, PostSafety::toString($post->safety)); - $path = $this->config->main->thumbsPath . DIRECTORY_SEPARATOR . $post->name . '.png'; + $path = $this->config->main->thumbsPath . DS . $post->name . '.png'; if (!file_exists($path)) { - $srcPath = $this->config->main->thumbsPath . DIRECTORY_SEPARATOR . $post->name; + $srcPath = $this->config->main->thumbsPath . DS . $post->name; $dstPath = $path; $dstWidth = $this->config->browsing->thumbWidth; $dstHeight = $this->config->browsing->thumbHeight; @@ -248,10 +248,10 @@ class PostController $srcImage = imagecreatefromgif($srcPath); break; case 'application/x-shockwave-flash': - $path = $this->config->main->mediaPath . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'thumb-swf.png'; + $path = $this->config->main->mediaPath . DS . 'img' . DS . 'thumb-swf.png'; break; default: - $path = $this->config->main->mediaPath . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'thumb.png'; + $path = $this->config->main->mediaPath . DS . 'img' . DS . 'thumb.png'; break; } @@ -302,7 +302,7 @@ class PostController PrivilegesHelper::confirmWithException($this->context->user, Privilege::RetrievePost); PrivilegesHelper::confirmWithException($this->context->user, Privilege::RetrievePost, PostSafety::toString($post->safety)); - $path = $this->config->main->filesPath . DIRECTORY_SEPARATOR . $post->name; + $path = $this->config->main->filesPath . DS . $post->name; if (!file_exists($path)) throw new SimpleException('Post file does not exist'); if (!is_readable($path))