1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Code clean-up - remove empty space

This commit is contained in:
Tijn Kuyper
2017-02-04 17:17:48 +01:00
parent 030911c1a8
commit 69e5677ba3

View File

@@ -17,10 +17,8 @@ if (!getperms('P'))
} }
e107::lan('forum', 'admin',true); e107::lan('forum', 'admin', true);
e107::lan('forum','front', true); e107::lan('forum', 'front', true);
//e107::includeLan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/English_admin.php');
//e107::lan('forum','', 'front');
e107::css('inline'," e107::css('inline',"
@@ -45,7 +43,6 @@ if(!deftrue('OLD_FORUMADMIN'))
class forum_admin extends e_admin_dispatcher class forum_admin extends e_admin_dispatcher
{ {
protected $modes = array( protected $modes = array(
'main' => array( 'main' => array(
@@ -75,23 +72,22 @@ if(!deftrue('OLD_FORUMADMIN'))
); );
protected $adminMenu = array( protected $adminMenu = array(
'main/list' => array('caption' => LAN_MANAGE, 'perm' => 'P'),
'main/create' => array('caption' => LAN_CREATE, 'perm' => 'P'),
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'P'), 'main/opt1' => array('divider' => true),
'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'),
'main/opt1' => array('divider'=>true),
'main/rules' => array('caption' => WMGLAN_5, 'perm' => 'P'),
'mods/list' => array('caption' => LAN_FORUM_2003, 'perm'=>'P'),
'main/prefs' => array('caption' => LAN_PREFS, 'perm' => 'P'),
'main/rules' => array('caption'=> WMGLAN_5, 'perm' => 'P'), 'main/opt2' => array('divider' => true),
'mods/list' => array('caption'=> LAN_FORUM_2003, 'perm'=>'P'),
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'P'),
'main/opt2' => array('divider'=>true),
'report/list' => array('caption'=> FORLAN_116, 'perm'=>'P'),
'post/list' => array('caption'=>LAN_PLUGIN_FORUM_LATESTPOSTS, 'perm'=>'P'),
'main/prune' => array('caption'=> LAN_PRUNE, 'perm' => 'P'),
'main/tools' => array('caption'=>FORLAN_153, 'perm'=>'p')
'report/list' => array('caption' => FORLAN_116, 'perm'=>'P'),
'post/list' => array('caption' => LAN_PLUGIN_FORUM_LATESTPOSTS, 'perm'=>'P'),
'main/prune' => array('caption' => LAN_PRUNE, 'perm' => 'P'),
'main/tools' => array('caption' => FORLAN_153, 'perm'=>'p')
); );
protected $adminMenuAliases = array( protected $adminMenuAliases = array(
@@ -100,25 +96,16 @@ if(!deftrue('OLD_FORUMADMIN'))
protected $menuTitle = LAN_PLUGIN_FORUM_NAME; protected $menuTitle = LAN_PLUGIN_FORUM_NAME;
function init() function init()
{ {
if(E107_DEBUG_LEVEL > 0) if(E107_DEBUG_LEVEL > 0)
{ {
$this->adminMenu['opt3'] = array('divider'=>true); $this->adminMenu['opt3'] = array('divider'=>true);
$this->adminMenu['main/update'] = array('caption'=>"Redo v1.x Forum Upgrade", 'perm'=>0, 'uri'=>'{e_PLUGIN}forum/forum_update.php'); $this->adminMenu['main/update'] = array('caption'=>"Redo v1.x Forum Upgrade", 'perm'=>0, 'uri'=>'{e_PLUGIN}forum/forum_update.php');
} }
} }
} }
class forum_ui extends e_admin_ui class forum_ui extends e_admin_ui
{ {
@@ -177,30 +164,25 @@ if(!deftrue('OLD_FORUMADMIN'))
protected $prefs = array( protected $prefs = array(
'enclose' => array('title'=> FORLAN_44, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_45), 'enclose' => array('title' => FORLAN_44, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_45),
'title' => array('title'=> FORLAN_65, 'type'=>'text', 'data' => 'str','help'=>''), 'title' => array('title' => FORLAN_65, 'type'=>'text', 'data' => 'str','help'=>''),
'notify' => array('title'=> FORLAN_47, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_48), 'notify' => array('title' => FORLAN_47, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_48),
'notify_on' => array('title'=> FORLAN_177, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_178), 'notify_on' => array('title' => FORLAN_177, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_178),
'poll' => array('title'=> FORLAN_49, 'type'=>'userclass', 'data' => 'int','help'=>FORLAN_50), 'poll' => array('title' => FORLAN_49, 'type'=>'userclass', 'data' => 'int','help'=>FORLAN_50),
'attach' => array('title'=> FORLAN_70, 'type'=>'boolean', 'data' => 'str','help'=>FORLAN_71), 'attach' => array('title' => FORLAN_70, 'type'=>'boolean', 'data' => 'str','help'=>FORLAN_71),
'maxwidth' => array('title'=> FORLAN_134, 'type'=>'number', 'data' => 'str','help'=>FORLAN_135), 'maxwidth' => array('title' => FORLAN_134, 'type'=>'number', 'data' => 'str','help'=>FORLAN_135),
'linkimg' => array('title'=> FORLAN_136, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_137), 'linkimg' => array('title' => FORLAN_136, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_137),
'track' => array('title'=> FORLAN_200, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_201), 'track' => array('title' => FORLAN_200, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_201),
'trackemail' => array('title'=> FORLAN_202, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_203), 'trackemail' => array('title' => FORLAN_202, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_203),
'redirect' => array('title'=> FORLAN_112, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_113), 'redirect' => array('title' => FORLAN_112, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_113),
'reported_post_email' => array('title'=> FORLAN_116, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_122), 'reported_post_email' => array('title' => FORLAN_116, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_122),
'tooltip' => array('title'=> FORLAN_126, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_127), 'tooltip' => array('title' => FORLAN_126, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_127),
'ranks' => array('title'=> FORLAN_63, 'type'=>'boolean', 'data' => 'int','help'=>''), 'ranks' => array('title' => FORLAN_63, 'type'=>'boolean', 'data' => 'int','help'=>''),
'tiplength' => array('title' => FORLAN_128, 'type'=>'number', 'data' => 'int','help'=>FORLAN_129),
'tiplength' => array('title'=> FORLAN_128, 'type'=>'number', 'data' => 'int','help'=>FORLAN_129), 'eprefix' => array('title' => FORLAN_53, 'type'=>'text', 'data' => 'string','help'=>FORLAN_54),
'eprefix' => array('title'=> FORLAN_53, 'type'=>'text', 'data' => 'string','help'=>FORLAN_54), 'popular' => array('title' => FORLAN_55, 'type'=>'number', 'data' => 'int','help'=>FORLAN_56),
'popular' => array('title'=> FORLAN_55, 'type'=>'number', 'data' => 'int','help'=>FORLAN_56), 'postspage' => array('title' => FORLAN_57, 'type'=>'number', 'data' => 'int','help'=>FORLAN_58),
'postspage' => array('title'=> FORLAN_57, 'type'=>'number', 'data' => 'int','help'=>FORLAN_58), 'threadspage' => array('title' => FORLAN_186, 'type'=>'number', 'data' => 'int','help'=>FORLAN_187),
'threadspage' => array('title'=> FORLAN_186, 'type'=>'number', 'data' => 'int','help'=>FORLAN_187),
); );
public $forumParents = array(); public $forumParents = array();
@@ -234,11 +216,7 @@ if(!deftrue('OLD_FORUMADMIN'))
$sql2->update('forum', 'forum_order = '.$c.' WHERE forum_id = '.$row['forum_id'].' LIMIT 1'); $sql2->update('forum', 'forum_order = '.$c.' WHERE forum_id = '.$row['forum_id'].' LIMIT 1');
} }
} }
} }
@@ -247,13 +225,11 @@ if(!deftrue('OLD_FORUMADMIN'))
$this->checkOrder(); $this->checkOrder();
if(e107::isInstalled('poll') == false) if(e107::isInstalled('poll') == false)
{ {
$this->prefs['poll']['writeParms']['post'] = " <span class='label label-important label-danger'>".FORLAN_215."</span>"; $this->prefs['poll']['writeParms']['post'] = " <span class='label label-important label-danger'>".FORLAN_215."</span>";
} }
if($this->getMode() == 'mods') if($this->getMode() == 'mods')
{ {
$this->fieldpref = array('forum_name', 'forum_moderators'); $this->fieldpref = array('forum_name', 'forum_moderators');
@@ -264,7 +240,6 @@ if(!deftrue('OLD_FORUMADMIN'))
$this->fields['forum_postclass']['batch'] = false; $this->fields['forum_postclass']['batch'] = false;
$this->fields['forum_threadclass']['batch'] = false; $this->fields['forum_threadclass']['batch'] = false;
$this->fields['forum_moderators']['batch'] = true; $this->fields['forum_moderators']['batch'] = true;
} }
require_once(e_PLUGIN.'forum/forum_class.php'); require_once(e_PLUGIN.'forum/forum_class.php');
@@ -275,7 +250,6 @@ if(!deftrue('OLD_FORUMADMIN'))
$this->forumObj->upgradeLegacyPrefs(); $this->forumObj->upgradeLegacyPrefs();
} }
if (!empty($_POST['do_prune']) && !empty($_POST['prune_days']) && !empty($_POST['pruneForum'])) if (!empty($_POST['do_prune']) && !empty($_POST['prune_days']) && !empty($_POST['pruneForum']))
{ {
$msg = $this->forumObj->forumPrune($_POST['prune_type'], $_POST['prune_days'], $_POST['pruneForum']); $msg = $this->forumObj->forumPrune($_POST['prune_type'], $_POST['prune_days'], $_POST['pruneForum']);
@@ -287,15 +261,11 @@ if(!deftrue('OLD_FORUMADMIN'))
$this->saveRules(); $this->saveRules();
} }
if($this->getAction() == 'edit') if($this->getAction() == 'edit')
{ {
$this->fields['forum_order']['noedit'] = true; $this->fields['forum_order']['noedit'] = true;
} }
$data = e107::getDb()->retrieve('forum', 'forum_id,forum_name,forum_parent', 'forum_id != 0',true); $data = e107::getDb()->retrieve('forum', 'forum_id,forum_name,forum_parent', 'forum_id != 0',true);
$this->forumParents[0] = FORLAN_216; $this->forumParents[0] = FORLAN_216;
$forumSubParents = array(); $forumSubParents = array();
@@ -318,7 +288,6 @@ if(!deftrue('OLD_FORUMADMIN'))
$this->fields['forum_parent']['writeParms'] = $this->forumParents; $this->fields['forum_parent']['writeParms'] = $this->forumParents;
$this->fields['forum_sub']['writeParms']['optArray'] = $forumSubParents; $this->fields['forum_sub']['writeParms']['optArray'] = $forumSubParents;
$this->fields['forum_sub']['writeParms']['default'] = 'blank'; $this->fields['forum_sub']['writeParms']['default'] = 'blank';
} }
@@ -326,7 +295,6 @@ if(!deftrue('OLD_FORUMADMIN'))
public function afterSort($result, $selected) public function afterSort($result, $selected)
{ {
return; return;
$sql = e107::getDb(); $sql = e107::getDb();
@@ -336,7 +304,6 @@ if(!deftrue('OLD_FORUMADMIN'))
{ {
$id = $val['forum_id']; $id = $val['forum_id'];
$parent[$id] = $val['forum_order']; $parent[$id] = $val['forum_order'];
} }
$previous = 0; $previous = 0;
@@ -356,9 +323,7 @@ if(!deftrue('OLD_FORUMADMIN'))
// echo "<br />".$row['forum_name']." with parent: ".$p." old: ".$row['forum_order']." new: ".$c; // echo "<br />".$row['forum_name']." with parent: ".$p." old: ".$row['forum_order']." new: ".$c;
$sql->update('forum','forum_order = '.$c.' WHERE forum_id = '.intval($row['forum_id']).' LIMIT 1'); $sql->update('forum','forum_order = '.$c.' WHERE forum_id = '.intval($row['forum_id']).' LIMIT 1');
} }
} }
@@ -420,7 +385,7 @@ if(!deftrue('OLD_FORUMADMIN'))
} }
// optional - a custom page. // optional - a custom page.
public function prunePage() public function prunePage()
{ {
$ns = e107::getRender(); $ns = e107::getRender();
@@ -486,10 +451,6 @@ if(!deftrue('OLD_FORUMADMIN'))
</form>"; </form>";
return $text; return $text;
} }
@@ -498,33 +459,27 @@ if(!deftrue('OLD_FORUMADMIN'))
$tp = e107::getParser(); $tp = e107::getParser();
$sql = e107::getDb(); $sql = e107::getDb();
$guestrules = $tp->toDB($_POST['guestrules']);
$memberrules = $tp->toDB($_POST['memberrules']);
$adminrules = $tp->toDB($_POST['adminrules']);
$guestrules = $tp->toDB($_POST['guestrules']); if(!$sql->update("generic", "gen_chardata ='$guestrules', gen_intdata='".$_POST['guest_active']."' WHERE gen_type='forum_rules_guest' "))
$memberrules = $tp->toDB($_POST['memberrules']); {
$adminrules = $tp->toDB($_POST['adminrules']); $sql->insert("generic", "0, 'forum_rules_guest', '".time()."', 0, '', '".$_POST['guest_active']."', '$guestrules' ");
}
if(!$sql->update("generic", "gen_chardata ='$guestrules', gen_intdata='".$_POST['guest_active']."' WHERE gen_type='forum_rules_guest' ")) if(!$sql->update("generic", "gen_chardata ='$memberrules', gen_intdata='".$_POST['member_active']."' WHERE gen_type='forum_rules_member' "))
{ {
$sql->insert("generic", "0, 'forum_rules_guest', '".time()."', 0, '', '".$_POST['guest_active']."', '$guestrules' "); $sql->insert("generic", "0, 'forum_rules_member', '".time()."', 0, '', '".$_POST['member_active']."', '$memberrules' ");
} }
if(!$sql->update("generic", "gen_chardata ='$memberrules', gen_intdata='".$_POST['member_active']."' WHERE gen_type='forum_rules_member' ")) if(!$sql->update("generic", "gen_chardata ='$adminrules', gen_intdata='".$_POST['admin_active']."' WHERE gen_type='forum_rules_admin' "))
{ {
$sql->insert("generic", "0, 'forum_rules_member', '".time()."', 0, '', '".$_POST['member_active']."', '$memberrules' "); $sql->insert("generic", "0, 'forum_rules_admin', '".time()."', 0, '', '".$_POST['admin_active']."', '$adminrules' ");
} }
if(!$sql->update("generic", "gen_chardata ='$adminrules', gen_intdata='".$_POST['admin_active']."' WHERE gen_type='forum_rules_admin' "))
{
$sql->insert("generic", "0, 'forum_rules_admin', '".time()."', 0, '', '".$_POST['admin_active']."', '$adminrules' ");
}
e107::getMessage()->addSuccess(LAN_SAVED);
return null;
e107::getMessage()->addSuccess(LAN_SAVED);
return null;
} }
function rulesPage() function rulesPage()
{ {
@@ -544,7 +499,6 @@ if(!deftrue('OLD_FORUMADMIN'))
list($id, $adminrules, $wm_active6) = $sql->fetch(); list($id, $adminrules, $wm_active6) = $sql->fetch();
*/ */
if($sql->select('generic','*',"gen_type='forum_rules_guest'")) if($sql->select('generic','*',"gen_type='forum_rules_guest'"))
{ {
$guest_rules = $sql->fetch(); $guest_rules = $sql->fetch();
@@ -633,7 +587,6 @@ if(!deftrue('OLD_FORUMADMIN'))
$ns->tablerender(WMGLAN_5, $text); $ns->tablerender(WMGLAN_5, $text);
/* /*
echo " echo "
<script type=\"text/javascript\"> <script type=\"text/javascript\">
@@ -657,12 +610,8 @@ if(!deftrue('OLD_FORUMADMIN'))
} }
</script> </script>
";*/ ";*/
} }
function modsPage() function modsPage()
{ {
@@ -679,11 +628,11 @@ if(!deftrue('OLD_FORUMADMIN'))
$tp = e107::getParser(); $tp = e107::getParser();
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'> $txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>
<table class='table adminlist'> <table class='table adminlist'>
<colgroup span='2'> <colgroup span='2'>
<col class='col-label' /> <col class='col-label' />
<col class='col-control' /> <col class='col-control' />
</colgroup>"; </colgroup>";
foreach($parentList as $p) foreach($parentList as $p)
{ {
@@ -720,19 +669,10 @@ if(!deftrue('OLD_FORUMADMIN'))
</form>"; </form>";
return $txt; return $txt;
} }
function toolsPageProcess() function toolsPageProcess()
{ {
$mes = e107::getMessage(); $mes = e107::getMessage();
$fList = array(); $fList = array();
@@ -780,11 +720,8 @@ if(!deftrue('OLD_FORUMADMIN'))
$mes->addSuccess($msg); $mes->addSuccess($msg);
// $ns->tablerender($caption, $mes->render().$text); // $ns->tablerender($caption, $mes->render().$text);
} }
} }
//TODO Add SEF-url generation for forum and threads where missing. //TODO Add SEF-url generation for forum and threads where missing.
function toolsPage() function toolsPage()
{ {
@@ -796,84 +733,77 @@ if(!deftrue('OLD_FORUMADMIN'))
$this->toolsPageProcess(); $this->toolsPageProcess();
$txt = " $txt = "
<form method='post' action='".e_SELF."?".e_QUERY."'> <form method='post' action='".e_SELF."?".e_QUERY."'>
<table class='table adminlist'> <table class='table adminlist'>
<colgroup span='3'> <colgroup span='3'>
<col class='col-label' /> <col class='col-label' />
<col class='col-control' /> <col class='col-control' />
<col class='col-control' style='width:50%' /> <col class='col-control' style='width:50%' />
</colgroup> </colgroup>
<tr> <tr>
<td>".FORLAN_156."</td> <td>".FORLAN_156."</td>
<td colspan='2'> <td colspan='2'>
"; ";
if($sql->select("forum", "*", "1 ORDER BY forum_order")) if($sql->select("forum", "*", "1 ORDER BY forum_order"))
{
$fList = $sql->db_getList();
foreach($fList as $f)
{ {
$key = 'forumlist['.$f['forum_id'].']'; $fList = $sql->db_getList();
$txt .= $frm->checkbox($key, 1, false, $tp->toHTML($f['forum_name'])); foreach($fList as $f)
// $txt .= "<input type='checkbox' name='forumlist[{$f['forum_id']}]' value='1' /> ".$tp->toHTML($f['forum_name'])."<br />"; {
$key = 'forumlist['.$f['forum_id'].']';
$txt .= $frm->checkbox($key, 1, false, $tp->toHTML($f['forum_name']));
// $txt .= "<input type='checkbox' name='forumlist[{$f['forum_id']}]' value='1' /> ".$tp->toHTML($f['forum_name'])."<br />";
}
$txt .= "<hr />";
$txt .= $frm->checkbox('forum_all', 1, false, LAN_PLUGIN_FORUM_ALLFORUMS);
// $txt .= "<input type='checkbox' name='forum_all' value='1' /> <strong>".LAN_PLUGIN_FORUM_ALLFORUMS."</strong>";
} }
$txt .= "<hr />";
$txt .= $frm->checkbox('forum_all', 1, false, LAN_PLUGIN_FORUM_ALLFORUMS);
// $txt .= "<input type='checkbox' name='forum_all' value='1' /> <strong>".LAN_PLUGIN_FORUM_ALLFORUMS."</strong>";
}
//TODO LAN - see below //TODO LAN - see below
$txt .= " $txt .= "
</td> </td>
</tr> </tr>
<tr> <tr>
<td>".FORLAN_158."</td> <td>".FORLAN_158."</td>
<td>".$frm->checkbox('lastpost', 1, false, LAN_ACTIVE). <td>".$frm->checkbox('lastpost', 1, false, LAN_ACTIVE).
"</td><td>". "</td><td>".
$frm->select('lastpost_nothread', array(0=>FORLAN_207, 1=>FORLAN_208))." $frm->select('lastpost_nothread', array(0=>FORLAN_207, 1=>FORLAN_208))."
</td> </td>
</tr> </tr>
<tr> <tr>
<td>".FORLAN_161."</td> <td>".FORLAN_161."</td>
<td>".$frm->checkbox('counts', 1, false, LAN_ACTIVE). <td>".$frm->checkbox('counts', 1, false, LAN_ACTIVE).
"</td><td>". "</td><td>".
$frm->checkbox('counts_threads', 1, false, FORLAN_182)." $frm->checkbox('counts_threads', 1, false, FORLAN_182)."
<span class='text-warning'>".FORLAN_183."</span> <span class='text-warning'>".FORLAN_183."</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>".FORLAN_163."</td> <td>".FORLAN_163."</td>
<td colspan='2'>".$frm->checkbox('userpostcounts',1, false, LAN_ACTIVE)."</td> <td colspan='2'>".$frm->checkbox('userpostcounts',1, false, LAN_ACTIVE)."</td>
</tr> </tr>
</table> </table>
<div class='buttons-bar center'> <div class='buttons-bar center'>
".$frm->admin_button('tools', LAN_GO, 'submit')." ".$frm->admin_button('tools', LAN_GO, 'submit')."
</div> </div>
</form> </form>
"; ";
return $txt; return $txt;
// $ns->tablerender(FORLAN_166, $txt); // $ns->tablerender(FORLAN_166, $txt);
} }
} }
class forum_form_ui extends e_admin_form_ui class forum_form_ui extends e_admin_form_ui
{ {
function forum_name($curVal,$mode,$parm) function forum_name($curVal,$mode,$parm)
{ {
$frm = e107::getForm(); $frm = e107::getForm();
if($mode == 'read') if($mode == 'read')
@@ -884,8 +814,6 @@ if(!deftrue('OLD_FORUMADMIN'))
$id = $this->getController()->getListModel()->get('forum_id'); $id = $this->getController()->getListModel()->get('forum_id');
$sub = $this->getController()->getListModel()->get('forum_sub'); $sub = $this->getController()->getListModel()->get('forum_sub');
$level = 1; $level = 1;
if(!empty($sub)) if(!empty($sub))
@@ -896,8 +824,6 @@ if(!deftrue('OLD_FORUMADMIN'))
$linkQ = e_SELF."?searchquery=&filter_options=page_chapter__".$id."&mode=page&action=list"; $linkQ = e_SELF."?searchquery=&filter_options=page_chapter__".$id."&mode=page&action=list";
$level_image = $parent ? '<img src="'.e_IMAGE_ABS.'generic/branchbottom.gif" class="icon" alt="" style="margin-left: '.($level * 20).'px" />&nbsp;' : ''; $level_image = $parent ? '<img src="'.e_IMAGE_ABS.'generic/branchbottom.gif" class="icon" alt="" style="margin-left: '.($level * 20).'px" />&nbsp;' : '';
return ($parent) ? $level_image.$curVal : $curVal; return ($parent) ? $level_image.$curVal : $curVal;
} }
@@ -986,10 +912,6 @@ if(!deftrue('OLD_FORUMADMIN'))
} }
} }
// Custom Method/Function // Custom Method/Function
function forum_lastpost_info($curVal,$mode) function forum_lastpost_info($curVal,$mode)
{ {
@@ -1012,7 +934,6 @@ if(!deftrue('OLD_FORUMADMIN'))
} }
} }
// Custom Method/Function // Custom Method/Function
function forum_options($curVal,$mode) function forum_options($curVal,$mode)
{ {
@@ -1038,8 +959,6 @@ if(!deftrue('OLD_FORUMADMIN'))
} }
class reported_ui extends e_admin_ui class reported_ui extends e_admin_ui
{ {
@@ -1064,7 +983,6 @@ if(!deftrue('OLD_FORUMADMIN'))
protected $fieldpref = array('gen_datestamp', 'gen_ip', 'gen_user_id', 'gen_chardata'); protected $fieldpref = array('gen_datestamp', 'gen_ip', 'gen_user_id', 'gen_chardata');
// optional // optional
public function init() public function init()
{ {
@@ -1081,15 +999,11 @@ if(!deftrue('OLD_FORUMADMIN'))
return array('caption'=>LAN_HELP, 'text'=>FORLAN_189); return array('caption'=>LAN_HELP, 'text'=>FORLAN_189);
} }
} }
class reported_form_ui extends e_admin_form_ui class reported_form_ui extends e_admin_form_ui
{ {
// Custom Method/Function // Custom Method/Function
function gen_intdata($curVal,$mode) function gen_intdata($curVal,$mode)
{ {
@@ -1114,7 +1028,6 @@ if(!deftrue('OLD_FORUMADMIN'))
} }
} }
// Custom Method/Function // Custom Method/Function
function gen_chardata($curVal,$mode) function gen_chardata($curVal,$mode)
{ {
@@ -1153,12 +1066,8 @@ if(!deftrue('OLD_FORUMADMIN'))
return $text; return $text;
} }
} }
} }
class post_ui extends e_admin_ui class post_ui extends e_admin_ui
{ {
@@ -1208,14 +1117,11 @@ if(!deftrue('OLD_FORUMADMIN'))
{ {
// $sql2->db_Delete('banlist', "banlist_ip='{$banIP}'"); // $sql2->db_Delete('banlist', "banlist_ip='{$banIP}'");
} }
} }
class post_form_ui extends e_admin_form_ui class post_form_ui extends e_admin_form_ui
{ {
function post_attachments($curVal,$mode) function post_attachments($curVal,$mode)
{ {
@@ -1227,7 +1133,6 @@ if(!deftrue('OLD_FORUMADMIN'))
$tp = e107::getParser(); $tp = e107::getParser();
$fl = e107::getFile(); $fl = e107::getFile();
$text = ''; $text = '';
if(!empty($data['img'])) if(!empty($data['img']))
@@ -1266,13 +1171,8 @@ if(!deftrue('OLD_FORUMADMIN'))
break; break;
} }
} }
} }
new forum_admin(); new forum_admin();
require_once(e_ADMIN."auth.php"); require_once(e_ADMIN."auth.php");
@@ -1280,11 +1180,10 @@ if(!deftrue('OLD_FORUMADMIN'))
require_once(e_ADMIN."footer.php"); require_once(e_ADMIN."footer.php");
exit; exit;
} }
/* /*
$e_sub_cat = 'forum'; $e_sub_cat = 'forum';