diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-12-28 09:41:47 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-12-28 09:42:23 +0000 |
commit | 6955830f96ee6f3912a89e271eb59e501dfe3514 (patch) | |
tree | f1f6cbf3f4e76be76594a04ee0f90a937f49282d /etc/inc/notices.inc | |
parent | 39618326e0ddd3d79f2596b6a11d9bc09da6ded0 (diff) | |
download | pfsense-6955830f96ee6f3912a89e271eb59e501dfe3514.zip pfsense-6955830f96ee6f3912a89e271eb59e501dfe3514.tar.gz |
Replace some occurrence of /tmp with the propper global variable in attempt to minimize the search for what changes /tmp permissions.
Diffstat (limited to 'etc/inc/notices.inc')
-rw-r--r-- | etc/inc/notices.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index 7f2e199..069b281 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -99,8 +99,10 @@ function file_notice($id, $notice, $category = "General", $url = "", $priority = * Returns a specific notices text ******/ function get_notices($category = "all") { - if(file_exists('/tmp/notices')) { - $queue = unserialize(file_get_contents('/tmp/notices')); + global $g; + + if(file_exists("{$g['tmp_path']}/notices")) { + $queue = unserialize(file_get_contents("{$g['tmp_path']}/notices")); if(!$queue) return false; if($category != 'all') { foreach($queue as $time => $notice) { @@ -357,4 +359,4 @@ function register_via_growl() { } } -?>
\ No newline at end of file +?> |