diff --git a/classes/Config.php b/classes/Config.php index efc71e2..3f1919a 100755 --- a/classes/Config.php +++ b/classes/Config.php @@ -28,30 +28,28 @@ class Config extends Singleton { // @todo no hardcoded paths! $file = '/var/www/josh/pickles/config/' . $site . '.xml'; - if (!isset($this->file) || $this->file != $file) { - if (file_exists($file)) { - $this->file = $file; + if (file_exists($file)) { + $this->file = $file; - $config_array = ArrayUtils::object2array(simplexml_load_file($file)); + $config_array = ArrayUtils::object2array(simplexml_load_file($file)); - if (is_array($config_array)) { - foreach ($config_array as $variable => $value) { - if ($value == 'true' || $value == array()) { - $value = (bool) $value; - } - - $this->$variable = $value == array() ? (bool) $value : $value; + if (is_array($config_array)) { + foreach ($config_array as $variable => $value) { + if ($value == 'true' || $value == array()) { + $value = (bool) $value; } + + $this->$variable = $value == array() ? (bool) $value : $value; } - - $this->freeze(); - - return true; - } - else { - Error::addError('Unable to load the configuration file'); - return false; } + + $this->freeze(); + + return true; + } + else { + Error::addError('Unable to load the configuration file'); + return false; } } } diff --git a/classes/Controller.php b/classes/Controller.php index 043c6a5..b4183e4 100755 --- a/classes/Controller.php +++ b/classes/Controller.php @@ -98,8 +98,6 @@ class Controller extends Object { $this->viewer = Viewer::factory($this->model); $this->viewer->display(); } - - //var_dump($name, $this->session, $_SESSION, $_SERVER); } /* diff --git a/classes/Viewer/RSS.php b/classes/Viewer/RSS.php new file mode 100644 index 0000000..c37d1db --- /dev/null +++ b/classes/Viewer/RSS.php @@ -0,0 +1,59 @@ +model->getData(); + + if (isset($data['channel'])) { + $channel = $config->rss[$data['channel']]; + + if (isset($data['items'])) { + $items = $data['items']; + } + else { + // Error - no items + } + } + else { + // Error - no channel specified + } + + header('Content-type: application/rss+xml; charset=UTF-8'); + echo ''; + ?> + + + <?=$channel['title'];?> + http:// + + + + $item) { + $date = date('r', strtotime($item['date'])); + + if ($key == 0) { + echo "{$date}"; + } + ?> + + <?=$item['title'];?> + + ]]> + + + + + + + + diff --git a/config/verynicenoise.com.xml b/config/verynicenoise.com.xml index 4dea1d3..ad420b6 100755 --- a/config/verynicenoise.com.xml +++ b/config/verynicenoise.com.xml @@ -31,4 +31,11 @@ joshsherman@gmail.com + + + Very Nice Noise Releases + Very Nice Noise is primarily a netlabel, which means that we offer music that is available exclusively through free MP3 downloads, and we will eventually start releasing the occasional CD-R and DVD-R releases as well. All MP3 releases on this site are free for you to download and distribute as you wish, as long as it it not done for profit. The label was started to help give more control back to the talented artists of the noise "music" community by way of faster turn around times on releases, no file type restrictions (if you want to release in the less popular OGG format, that's cool with us) and by giving artists the ability to maintain their own artist profile on the site. Our genre focus, as our name suggests is noise (harsh noise, drone, glitch, power electronics and the like). + Music + + diff --git a/smarty/functions/function.pagination.php b/smarty/functions/function.pagination.php index 12a95a4..569df41 100755 --- a/smarty/functions/function.pagination.php +++ b/smarty/functions/function.pagination.php @@ -32,13 +32,13 @@ function smarty_function_pagination($params, &$smarty) { $pagination .= ''; */ - $pagination .= $current != 1 ? '' . $prev . '' : '' . $prev . ''; + $pagination .= $current != 1 ? '' . $prev . '' : '' . $prev . ''; for ($i = 1; $i <= $total; $i++) { - $pagination .= $i != $current ? '' . $i . '' : '' . $i . ''; + $pagination .= $i != $current ? '' . $i . '' : '' . $i . ''; } - $pagination .= $current != $total ? '' . $next . '' : '' . $next . ''; + $pagination .= $current != $total ? '' . $next . '' : '' . $next . ''; /* $pagination .= ' ';