DAO 修正
This commit is contained in:
+5
-4
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use \Dao;
|
||||
require_once __DIR__ . '/../import.php';
|
||||
|
||||
use \Dto;
|
||||
|
||||
|
||||
@@ -28,7 +29,7 @@ else
|
||||
$dir = './images/';
|
||||
$handle = opendir ($dir);
|
||||
|
||||
if ($row = Dao\Thread :: find ($thread))
|
||||
if ($row = \Dao\Thread :: find ($thread))
|
||||
{
|
||||
$title = $row -> title;
|
||||
$explain = $row -> explain;
|
||||
@@ -38,13 +39,13 @@ if (isset ($_GET['id']))
|
||||
{
|
||||
if (($_GET['evaluate'] ?? '') === 'good')
|
||||
{
|
||||
Dao\Response :: like ((int) $_GET['id']);
|
||||
\Dao\Response :: like ((int) $_GET['id']);
|
||||
header ("Location: ./?thread=$thread&sort=$sort");
|
||||
}
|
||||
|
||||
if (($_GET['evaluate'] ?? '') === 'bad')
|
||||
{
|
||||
Dao\Response :: dislike ((int) $_GET['id']);
|
||||
\Dao\Response :: dislike ((int) $_GET['id']);
|
||||
header ("Location: ./?thread=$thread&sort=$sort");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user