[geeklog-cvs] geeklog: Merge
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Wed Apr 6 10:59:02 EDT 2011
changeset 8215:6ee0c055aead
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/6ee0c055aead
user: Rouslan Placella <rouslan at placella.com>
date: Wed Apr 06 15:58:36 2011 +0100
description:
Merge
diffstat:
system/classes/scripts.class.php | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diffs (49 lines):
diff -r 830a4dea654b -r 6ee0c055aead system/classes/scripts.class.php
--- a/system/classes/scripts.class.php Wed Apr 06 15:57:13 2011 +0100
+++ b/system/classes/scripts.class.php Wed Apr 06 15:58:36 2011 +0100
@@ -279,13 +279,18 @@
*/
public function setJavaScriptFile($name, $file, $footer = true, $constant = false) {
+ // If header code make sure header not already set
+ if ($this->header_set && !$footer) {
+ return false;
+ }
+
// Make sure valid name
if (in_array(strtolower($name), $this->restricted_names, true)) {
return false;
}
-
- // If header code make sure header not already set
- if ($this->header_set && !$footer) {
+
+ // Make sure file exists and is readable. We don't want any 403 or 404, right?
+ if (! is_file($name) || ! is_readable($name)) {
return false;
}
@@ -321,6 +326,11 @@
if (in_array(strtolower($name), $this->restricted_names, true)) {
return false;
}
+
+ // Make sure file exists and is readable. We don't want any 403 or 404, right?
+ if (! is_file($name) || ! is_readable($name)) {
+ return false;
+ }
$this->css_files[$name]['file'] = $file;
$this->css_files[$name]['constant'] = false;
@@ -351,6 +361,11 @@
return false;
}
+ // Make sure file exists and is readable. We don't want any 403 or 404, right?
+ if (! is_file($name) || ! is_readable($name)) {
+ return false;
+ }
+
$this->css_files[$name]['file'] = $file;
$this->css_files[$name]['constant'] = $constant;
$this->css_files[$name]['load'] = true;
More information about the geeklog-cvs
mailing list