X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fcomletter.php;fp=modules%2Fcomletter.php;h=103adefd6baac4c34981945153635e4285a66edb;hb=26cba39a939c4a9eb60b88a9bf71f1737d14e3f0;hp=0000000000000000000000000000000000000000;hpb=e647f84324613cd4db5d8304fc8e275ee536dc4b;p=platal.git diff --git a/modules/comletter.php b/modules/comletter.php new file mode 100644 index 0000000..103adef --- /dev/null +++ b/modules/comletter.php @@ -0,0 +1,64 @@ + $this->make_hook('nl', AUTH_COOKIE, 'user'), + 'comletter/out' => $this->make_hook('out', AUTH_PUBLIC), + 'comletter/show' => $this->make_hook('nl_show', AUTH_COOKIE, 'user'), + 'comletter/search' => $this->make_hook('nl_search', AUTH_COOKIE, 'user'), + 'comletter/admin' => $this->make_hook('admin_nl', AUTH_PASSWD, 'user'), + 'comletter/admin/edit' => $this->make_hook('admin_nl_edit', AUTH_PASSWD, 'user'), + 'comletter/admin/edit/valid' => $this->make_hook('admin_nl_valid', AUTH_PASSWD, 'user'), + 'comletter/admin/edit/cancel' => $this->make_hook('admin_nl_cancel', AUTH_PASSWD, 'user'), + 'comletter/admin/edit/delete' => $this->make_hook('admin_nl_delete', AUTH_PASSWD, 'user'), + 'comletter/admin/categories' => $this->make_hook('admin_nl_cat', AUTH_PASSWD, 'user'), + 'comletter/stat' => $this->make_hook('stat_nl', AUTH_PASSWD, 'user') + ); + } + + protected function getNl() + { + require_once 'newsletter.inc.php'; + return NewsLetter::forGroup(NewsLetter::GROUP_COMMUNITY); + } + + function handler_out($page, $hash = null, $issue_id = null) + { + if (!$hash) { + if (!S::logged()) { + return PL_DO_AUTH; + } + } + return $this->handler_nl($page, 'out', $hash, $issue_id); + } +} + +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +?>