[geeklog-cvs] geeklog: Fixed incorrect path. Related to bug #0001309.

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Apr 6 18:53:40 EDT 2011


changeset 8216:5690ebfce920
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/5690ebfce920
user: Rouslan Placella <rouslan at placella.com>
date: Wed Apr 06 23:53:20 2011 +0100
description:
Fixed incorrect path. Related to bug #0001309.

diffstat:

 system/classes/scripts.class.php |  17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diffs (62 lines):

diff -r 6ee0c055aead -r 5690ebfce920 system/classes/scripts.class.php
--- a/system/classes/scripts.class.php	Wed Apr 06 15:58:36 2011 +0100
+++ b/system/classes/scripts.class.php	Wed Apr 06 23:53:20 2011 +0100
@@ -279,6 +279,8 @@
     */     
     public function setJavaScriptFile($name, $file, $footer = true, $constant = false) {
         
+        global $_CONF;
+
         // If header code make sure header not already set
         if ($this->header_set && !$footer) {
             return false;
@@ -290,7 +292,8 @@
         }
 
         // Make sure file exists and is readable. We don't want any 403 or 404, right?
-        if (! is_file($name) || ! is_readable($name)) {
+        $path = substr($_CONF['path_html'], 0, -1) . $file;
+        if (! is_file($path) || ! is_readable($path)) {
             return false;
         }
         
@@ -316,7 +319,9 @@
     *
     */      
     private function setCSSFilePrivate($name, $file, $load = true) {
-        
+
+        global $_CONF;
+
         // If header code make sure header not already set
         if ($this->header_set) {
             return false;
@@ -328,7 +333,8 @@
         }        
 
         // Make sure file exists and is readable. We don't want any 403 or 404, right?
-        if (! is_file($name) || ! is_readable($name)) {
+        $path = substr($_CONF['path_html'], 0, -1) . $file;
+        if (! is_file($path) || ! is_readable($path)) {
             return false;
         }
         
@@ -351,6 +357,8 @@
     */      
     public function setCSSFile($name, $file, $constant = true) {
         
+        global $_CONF;
+
         // If header code make sure header not already set
         if ($this->header_set) {
             return false;
@@ -362,7 +370,8 @@
         }        
         
         // Make sure file exists and is readable. We don't want any 403 or 404, right?
-        if (! is_file($name) || ! is_readable($name)) {
+        $path = substr($_CONF['path_html'], 0, -1) . $file;
+        if (! is_file($path) || ! is_readable($path)) {
             return false;
         }
 



More information about the geeklog-cvs mailing list