mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
PageText
handle cases where pageTextId is given but pageText is not in DB
This commit is contained in:
@@ -206,9 +206,16 @@ class ObjectPage extends GenericPage
|
||||
{
|
||||
while ($next)
|
||||
{
|
||||
$row = DB::World()->selectRow('SELECT *, text as Text_loc0 FROM page_text pt LEFT JOIN locales_page_text lpt ON pt.entry = lpt.entry WHERE pt.entry = ?d', $next);
|
||||
$next = $row['next_page'];
|
||||
$pageText[] = Util::parseHtmlText(Util::localizedString($row, 'Text'));
|
||||
if ($row = DB::World()->selectRow('SELECT *, text as Text_loc0 FROM page_text pt LEFT JOIN locales_page_text lpt ON pt.entry = lpt.entry WHERE pt.entry = ?d', $next))
|
||||
{
|
||||
$next = $row['next_page'];
|
||||
$pageText[] = Util::parseHtmlText(Util::localizedString($row, 'Text'));
|
||||
}
|
||||
else
|
||||
{
|
||||
Util::addNote(U_GROUP_STAFF, 'Referenced PageTextId #'.$next.' is not in DB');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user