..
This commit is contained in:
parent
f47cccab01
commit
5c2b7dfe61
@ -74,6 +74,8 @@
|
|||||||
$this->mod = $mod;
|
$this->mod = $mod;
|
||||||
}
|
}
|
||||||
public function postControls() {
|
public function postControls() {
|
||||||
|
global $board;
|
||||||
|
|
||||||
$built = '';
|
$built = '';
|
||||||
if($this->mod) {
|
if($this->mod) {
|
||||||
// Mod controls (on posts)
|
// Mod controls (on posts)
|
||||||
@ -81,23 +83,23 @@
|
|||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if($this->mod['type'] >= MOD_DELETE)
|
if($this->mod['type'] >= MOD_DELETE)
|
||||||
$built .= ' <a title="Delete" href="?/b/delete/' . $this->id . '">' . MOD_LINK_DELETE . '</a>';
|
$built .= ' <a title="Delete" href="?/' . $board['uri'] . '/delete/' . $this->id . '">' . MOD_LINK_DELETE . '</a>';
|
||||||
|
|
||||||
// Delete all posts by IP
|
// Delete all posts by IP
|
||||||
if($this->mod['type'] >= MOD_DELETEBYIP)
|
if($this->mod['type'] >= MOD_DELETEBYIP)
|
||||||
$built .= ' <a title="Delete all posts by IP" href="?/b/deletebyip/' . $this->id . '">' . MOD_LINK_DELETEBYIP . '</a>';
|
$built .= ' <a title="Delete all posts by IP" href="?/' . $board['uri'] . '/deletebyip/' . $this->id . '">' . MOD_LINK_DELETEBYIP . '</a>';
|
||||||
|
|
||||||
// Ban
|
// Ban
|
||||||
if($this->mod['type'] >= MOD_BAN)
|
if($this->mod['type'] >= MOD_BAN)
|
||||||
$built .= ' <a title="Ban" href="?/b/ban/' . $this->id . '">' . MOD_LINK_BAN . '</a>';
|
$built .= ' <a title="Ban" href="?/' . $board['uri'] . '/ban/' . $this->id . '">' . MOD_LINK_BAN . '</a>';
|
||||||
|
|
||||||
// Ban & Delete
|
// Ban & Delete
|
||||||
if($this->mod['type'] >= MOD_BANDELETE)
|
if($this->mod['type'] >= MOD_BANDELETE)
|
||||||
$built .= ' <a title="Ban & Delete" href="?/b/ban&delete/' . $this->id . '">' . MOD_LINK_BANDELETE . '</a>';
|
$built .= ' <a title="Ban & Delete" href="?/' . $board['uri'] . '/ban&delete/' . $this->id . '">' . MOD_LINK_BANDELETE . '</a>';
|
||||||
|
|
||||||
// Delete file (keep post)
|
// Delete file (keep post)
|
||||||
if(!empty($this->file) && $this->mod['type'] >= MOD_DELETEFILE)
|
if(!empty($this->file) && $this->mod['type'] >= MOD_DELETEFILE)
|
||||||
$built .= ' <a title="Remove file" href="?/b/deletefile/' . $this->id . '">' . MOD_LINK_DELETEFILE . '</a>';
|
$built .= ' <a title="Remove file" href="?/' . $board['uri'] . '/deletefile/' . $this->id . '">' . MOD_LINK_DELETEFILE . '</a>';
|
||||||
|
|
||||||
$built .= '</span>';
|
$built .= '</span>';
|
||||||
}
|
}
|
||||||
@ -201,6 +203,8 @@
|
|||||||
$this->posts[] = $post;
|
$this->posts[] = $post;
|
||||||
}
|
}
|
||||||
public function postControls() {
|
public function postControls() {
|
||||||
|
global $board;
|
||||||
|
|
||||||
$built = '';
|
$built = '';
|
||||||
if($this->mod) {
|
if($this->mod) {
|
||||||
// Mod controls (on posts)
|
// Mod controls (on posts)
|
||||||
@ -208,33 +212,33 @@
|
|||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if($this->mod['type'] >= MOD_DELETE)
|
if($this->mod['type'] >= MOD_DELETE)
|
||||||
$built .= ' <a title="Delete" href="?/b/delete/' . $this->id . '">' . MOD_LINK_DELETE . '</a>';
|
$built .= ' <a title="Delete" href="?/' . $board['uri'] . '/delete/' . $this->id . '">' . MOD_LINK_DELETE . '</a>';
|
||||||
|
|
||||||
// Delete all posts by IP
|
// Delete all posts by IP
|
||||||
if($this->mod['type'] >= MOD_DELETEBYIP)
|
if($this->mod['type'] >= MOD_DELETEBYIP)
|
||||||
$built .= ' <a title="Delete all posts by IP" href="?/b/deletebyip/' . $this->id . '">' . MOD_LINK_DELETEBYIP . '</a>';
|
$built .= ' <a title="Delete all posts by IP" href="?/' . $board['uri'] . '/deletebyip/' . $this->id . '">' . MOD_LINK_DELETEBYIP . '</a>';
|
||||||
|
|
||||||
// Ban
|
// Ban
|
||||||
if($this->mod['type'] >= MOD_BAN)
|
if($this->mod['type'] >= MOD_BAN)
|
||||||
$built .= ' <a title="Ban" href="?/b/ban/' . $this->id . '">' . MOD_LINK_BAN . '</a>';
|
$built .= ' <a title="Ban" href="?/' . $board['uri'] . '/ban/' . $this->id . '">' . MOD_LINK_BAN . '</a>';
|
||||||
|
|
||||||
// Ban & Delete
|
// Ban & Delete
|
||||||
if($this->mod['type'] >= MOD_BANDELETE)
|
if($this->mod['type'] >= MOD_BANDELETE)
|
||||||
$built .= ' <a title="Ban & Delete" href="?/b/ban&delete/' . $this->id . '">' . MOD_LINK_BANDELETE . '</a>';
|
$built .= ' <a title="Ban & Delete" href="?/' . $board['uri'] . '/ban&delete/' . $this->id . '">' . MOD_LINK_BANDELETE . '</a>';
|
||||||
|
|
||||||
// Stickies
|
// Stickies
|
||||||
if($this->mod['type'] >= MOD_STICKY)
|
if($this->mod['type'] >= MOD_STICKY)
|
||||||
if($this->sticky)
|
if($this->sticky)
|
||||||
$built .= ' <a title="Make thread not sticky" href="?/b/unsticky/' . $this->id . '">' . MOD_LINK_DESTICKY . '</a>';
|
$built .= ' <a title="Make thread not sticky" href="?/' . $board['uri'] . '/unsticky/' . $this->id . '">' . MOD_LINK_DESTICKY . '</a>';
|
||||||
else
|
else
|
||||||
$built .= ' <a title="Make thread sticky" href="?/b/sticky/' . $this->id . '">' . MOD_LINK_STICKY . '</a>';
|
$built .= ' <a title="Make thread sticky" href="?/' . $board['uri'] . '/sticky/' . $this->id . '">' . MOD_LINK_STICKY . '</a>';
|
||||||
|
|
||||||
// Lock
|
// Lock
|
||||||
if($this->mod['type'] >= MOD_LOCK)
|
if($this->mod['type'] >= MOD_LOCK)
|
||||||
if($this->locked)
|
if($this->locked)
|
||||||
$built .= ' <a title="Lock thread" href="?/b/unlock/' . $this->id . '">' . MOD_LINK_UNLOCK . '</a>';
|
$built .= ' <a title="Lock thread" href="?/' . $board['uri'] . '/unlock/' . $this->id . '">' . MOD_LINK_UNLOCK . '</a>';
|
||||||
else
|
else
|
||||||
$built .= ' <a title="Unlock thread" href="?/b/lock/' . $this->id . '">' . MOD_LINK_LOCK . '</a>';
|
$built .= ' <a title="Unlock thread" href="?/' . $board['uri'] . '/lock/' . $this->id . '">' . MOD_LINK_LOCK . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$built .= '</span>';
|
$built .= '</span>';
|
||||||
|
Loading…
Reference in New Issue
Block a user