public function authControl() { if (!$this->is_missing_param) { $template = $_GET["t"]; $cache_key = $_GET["ck"]; $pid = $_GET["pid"]; $oid = $_GET["oid"]; $network = $_GET['n']; $config = Config::getInstance(); $post_dao = DAOFactory::getDAO('PostDAO'); foreach ($oid as $o) { if (isset($_GET["fp"])) { $result = $post_dao->assignParent($pid, $o, $network, $_GET["fp"]); } else { $result = $post_dao->assignParent($pid, $o, $network); } } $s = new SmartyThinkUp(); $s->clear_cache($template, $cache_key); if ($result > 0) { $this->addToView('result', 'Assignment successful.'); } else { $this->addToView('result', 'No data was changed.'); } } return $this->generateView(); }