コード例 #1
0
ファイル: misc.php プロジェクト: kamilpacaq/drydock
                     $thread = $postarray['globalid'];
                     // thread global ID for cache wiping
                     $targetisthread = true;
                     $targetid = $postarray['id'];
                     // unique ID for post deletion
                     if ($postarray['thread'] != 0) {
                         $postdbi = new ThornPostDBI();
                         $fetched_thread = $postdbi->gettinfo($postarray['thread']);
                         $thread = $fetched_thread['globalid'];
                         $targetisthread = false;
                     }
                     smclearcache($board_folder, -1, $thread);
                     // clear the associated cache for this thread
                     smclearcache($board_folder, -1, -1);
                     // AND the board
                     delimgs($db->delpost($targetid, $targetisthread));
                     // Write to the log
                     writelog("delete\tt:" . $postarray['globalid'] . "\tb:" . $postarray['board'], "moderator");
                     $message = $message . "<br />Post deletion";
                 } else {
                     $message = $message . "<br /><i><b>Post deletion failed (insufficient access)</i></b>";
                 }
             }
         }
     }
 }
 $sm = sminit("popup.tpl");
 $sm->assign("text", $message);
 $sm->assign("timeout", 5);
 // 5s
 $sm->assign("title", "Moderation action");