diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 9492bed58..5887c01a6 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -9,13 +9,13 @@ * News Administration * * $Source: /cvs_backup/e107_0.8/e107_admin/newspost.php,v $ - * $Revision: 1.59 $ - * $Date: 2009-10-20 16:01:47 $ + * $Revision: 1.60 $ + * $Date: 2009-10-23 18:14:41 $ * $Author: secretr $ */ require_once("../class2.php"); -if (!getperms("H|7|N")) +if (!getperms("H|N")) { header("Location:".e_BASE."index.php"); exit; @@ -32,6 +32,7 @@ $pst->id = "admin_newspost"; // ------------------------------ // done in class2: require_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php"); // maybe this should be put in class2.php when 'admin' is detected. $newspost = new admin_newspost(e_QUERY, $pst); +e107::setRegistry('_newspost_admin', $newspost); $gen = new convert(); //Handle Ajax Calls @@ -39,10 +40,8 @@ if($newspost->ajax_observer()) exit; function headerjs() { - global $newspost; - - require_once(e_HANDLER.'js_helper.php'); - + $newspost = e107::getRegistry('_newspost_admin'); +/* $ret .= ""; - +*/ + // TODO - move this to external JS when news becomes a plugin $ret .= "