コード例 #1
0
function InitBackLinkSearch($dbi, $pagename)
{
    $pos['search'] = MakeBackLinkSearchRegexp($pagename);
    $pos['data'] = GetAllWikiPageNames($dbi['wiki']);
    return $pos;
}
コード例 #2
0
ファイル: dbmlib.php プロジェクト: BackupTheBerlios/oralux
function InitBackLinkSearch($dbi, $pagename)
{
    $pos['search'] = MakeBackLinkSearchRegexp($pagename);
    $pos['key'] = dbmfirstkey($dbi['wiki']);
    return $pos;
}
コード例 #3
0
ファイル: msql.php プロジェクト: BackupTheBerlios/oralux
function InitBackLinkSearch($dbi, $pagename)
{
    global $WikiLinksStore;
    $topage = addslashes($pagename);
    $res[arr] = array();
    // FIXME: this is buggy.  If a [multiword link] is split accross
    // multiple lines int the page_table, we wont find it.
    // (Probably the best fix is to implement the link table, and use it.)
    $res['regexp'] = MakeBackLinkSearchRegexp($pagename);
    $query = "SELECT pagename, line FROM {$dbi['page_table']}" . " WHERE line LIKE '%{$topage}%'" . " ORDER BY pagename";
    //echo "<p>$query<p>\n";
    $res['res'] = msql_query($query, $dbi["dbc"]);
    $count = 0;
    $arr = array();
    // build an array of the results.
    while ($hash = msql_fetch_array($res[res])) {
        if ($arr[$count - 1] == $hash[pagename]) {
            continue;
        }
        $arr[$count] = $hash[pagename];
        $count++;
    }
    $res[count] = 0;
    reset($arr);
    $res[arr] = $arr;
    return $res;
}