function modulsearch($query, $modul) { global $config; $marcxml = ''; if (!empty($config['libraries'][$_GET['bib']]['sru'])) { $marcxml = get_sru($query); } else { $marcxml = get_z($query); } return get_poster($marcxml, $config['moduler'][$modul]['antall'], true); }
} // Check topics for invaild posters echo "<p class=\"gen\"><b>" . $lang['Checking_invalid_topic_posters'] . "</b></p>\n"; $sql = "SELECT t.topic_id, t.topic_poster\n\t\t\t\t\tFROM " . TOPICS_TABLE . " t\n\t\t\t\t\t\tLEFT JOIN " . USERS_TABLE . " u ON t.topic_poster = u.user_id\n\t\t\t\t\tWHERE u.user_id IS NULL"; $result_array = array(); $result = $db->sql_query($sql); if (!$result) { throw_error("Couldn't get topic and user data!", __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { if (!$list_open) { echo "<p class=\"gen\">" . $lang['Invalid_topic_poster_found'] . ":</p>\n"; echo "<font class=\"gen\"><ul>\n"; $list_open = TRUE; } $poster_id = get_poster($row['topic_id']); echo "<li>" . sprintf($lang['Updating_topic'], $row['topic_id'], $row['topic_poster'], $poster_id) . "</li>\n"; $sql2 = "UPDATE " . TOPICS_TABLE . "\n\t\t\t\t\t\tSET topic_poster = {$poster_id}\n\t\t\t\t\t\tWHERE topic_id = " . $row['topic_id']; $result2 = $db->sql_query($sql2); if (!$result2) { throw_error("Couldn't update topic information!", __LINE__, __FILE__, $sql2); } } $db->sql_freeresult($result); if ($list_open) { echo "</ul></font>\n"; $list_open = FALSE; } else { echo $lang['Nothing_to_do']; } // Check for forums with invalid categories