本文整理汇总了PHP中idx_addPage函数的典型用法代码示例。如果您正苦于以下问题:PHP idx_addPage函数的具体用法?PHP idx_addPage怎么用?PHP idx_addPage使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了idx_addPage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_parameters
function test_parameters()
{
saveWikiText('test:links', '[[wiki:syntax?do=export_raw]] [[:web:scripts:add_vhost.sh?do=export_raw]]', 'Init tests');
idx_addPage('test:links');
$this->assertEquals(array('test:links'), ft_backlinks('wiki:syntax'));
$this->assertEquals(array('test:links'), ft_backlinks('web:scripts:add_vhost.sh'));
}
示例2: handle_start
function handle_start(&$event, $param)
{
global $ID;
global $ACT;
global $INFO;
if ($ACT != 'show') {
return;
}
if (!$INFO['exists']) {
return;
}
# don't try to read an article that doesn't exist
$all = rtrim(rawWiki($ID));
$inner = substr($all, 2, -2);
if ($all == '[[' . $inner . ']]' and strpos($inner, '[[') === false and strpos($inner, ']]') === false) {
if (!strpos($inner, '://') === false) {
$url = $inner;
# link is URL already
} else {
msg(sprintf('From: <a href="' . wl($ID, 'do=edit') . '">' . hsc($ID) . '</a>'));
$url = html_wikilink($inner, $name = null, $search = '');
$url = substr($url, strpos($url, '"') + 1);
$url = substr($url, 0, strpos($url, '"'));
}
idx_addPage($ID);
# ensure fulltext search indexing of referrer article - to put it on the backlink page of target article
send_redirect($url);
}
}
示例3: test_media_in_deleted_pages
public function test_media_in_deleted_pages()
{
saveWikiText('test:internalmedia_usage', '{{internalmedia.png}} {{..:internal media.png}}', 'Test initialization');
idx_addPage('test:internalmedia_usage');
saveWikiText('test:internalmedia_usage', '', 'Deleted');
$this->assertEquals(array(), ft_mediause('internal_media.png'));
$this->assertEquals(array(), ft_mediause('test:internalmedia.png'));
}
示例4: _index
function _index($id)
{
global $CLEAR;
global $QUIET;
_quietecho("{$id}... ");
idx_addPage($id, !$QUIET, $CLEAR);
_quietecho("done.\n");
}
示例5: setUp
public function setUp()
{
parent::setUp();
saveWikiText('testpage', 'Foo bar baz.', 'Test initialization');
saveWikiText('notfound', 'Foon barn bazn.', 'Test initialization');
idx_addPage('testpage');
idx_addPage('notfound');
}
示例6: setUp
public function setUp()
{
parent::setUp();
saveWikiText('syntax', 'dummy', 'test');
// make sure the search index is initialized
idx_addPage('wiki:syntax');
idx_addPage('syntax');
idx_addPage('wiki:welcome');
idx_addPage('wiki:dokuwiki');
}
示例7: test_media_in_footnotes
public function test_media_in_footnotes() {
saveWikiText('test:media_footnotes', '(({{footnote.png?20x50}} [[foonote|{{:footlink.png}}]]))', 'Test initialization');
idx_addPage('test:media_footnotes');
$query = array('test:footnote.png', 'footlink.png');
$this->assertEquals(array(
'test:footnote.png' => array('test:media_footnotes'),
'footlink.png' => array('test:media_footnotes')
), idx_get_indexer()->lookupKey('relation_media', $query));
}
示例8: setUp
public function setUp()
{
$this->pluginsEnabled[] = 'tag';
parent::setUp();
saveWikiText('tagged_page', '{{tag>mytag test2tag}}', 'Test');
saveWikiText('negative_page', '{{tag>negative_tag mytag}}', 'Test setup');
saveWikiText('third_page', '{{tag>third_tag}}', 'Test setup');
idx_addPage('tagged_page');
idx_addPage('negative_page');
idx_addPage('third_page');
}
示例9: test_affectedPagesNS_Media
/**
* @covers helper_plugin_move_plan::findAffectedPages
* @uses Doku_Indexer
*/
public function test_affectedPagesNS_Media()
{
saveWikiText('oldns:start', '{{oldnsimage_missing.png}}', 'setup');
idx_addPage('oldns:start');
/** @var helper_plugin_move_plan $plan */
$plan = plugin_load('helper', 'move_plan');
$this->assertFalse($plan->inProgress());
$plan->addMediaNamespaceMove('oldns', 'newns');
$plan->commit();
$affected_file = file(TMP_DIR . '/data/meta/__move_affected');
$this->assertSame('oldns:start', trim($affected_file[0]));
}
示例10: test_renameOkay
/**
* @covers action_plugin_move_rename::renameOkay
*/
function test_renameOkay()
{
global $conf;
global $USERINFO;
$conf['superuser'] = 'john';
$_SERVER['REMOTE_USER'] = 'john';
$USERINFO['grps'] = array('admin', 'user');
saveWikiText('wiki:foo:start', '[[..:..:one_ns_up:]]', 'Test setup');
idx_addPage('wiki:foo:start');
$move_rename = new action_plugin_move_rename();
$this->assertTrue($move_rename->renameOkay('wiki:foo:start'));
}
示例11: setUp
public function setUp()
{
$this->pluginsEnabled[] = 'include';
parent::setUp();
$this->helper = plugin_load('helper', 'include');
saveWikiText('included', 'Example content with link [[#jump]]', 'Test setup');
idx_addPage('test:included');
saveWikiText('test:includefull', '{{page>..:included}}', 'Test setup');
idx_addPage('test:includefull');
saveWikiText('test:includefirst', '{{page>..:included&firstseconly}}', 'Test setup');
idx_addPage('test:includefirst');
}
示例12: setUp
public function setUp()
{
global $conf;
$this->pluginsEnabled[] = 'tag';
parent::setUp();
$conf['plugin']['tag']['sortkey'] = 'ns';
$this->helper = plugin_load('helper', 'tag');
foreach ($this->pages as $page) {
saveWikiText($page, '{{tag>mytag}}', 'Test');
idx_addPage($page);
}
}
示例13: test_rename
public function test_rename()
{
/** @var $move helper_plugin_move_op */
$move = plugin_load('helper', 'move_op');
if (!$move) {
return;
}
// disable the test when move is not installed
saveWikiText('editx', 'Page to rename', 'Testcase create');
saveWikiText('links', '{{section>links#foo}} {{page>editx}} {{page>:eDitX&nofooter}} {{section>editx#test}} {{page>editx&nofooter}}', 'Testcase created');
idx_addPage('editx');
idx_addPage('links');
$this->assertTrue($move->movePage('editx', 'test:edit'));
$this->assertEquals('{{section>links#foo}} {{page>test:edit}} {{page>test:edit&nofooter}} {{section>test:edit#test}} {{page>test:edit&nofooter}}', rawWiki('links'));
}
示例14: setUp
public function setUp()
{
$this->pluginsEnabled[] = 'include';
parent::setUp();
$this->helper = plugin_load('helper', 'include');
saveWikiText('wiki:included', <<<EOF
* [[test|{{dokuwiki.png}}]]
* [[#test|{{dokuwiki.png?w=200}}]]
* [[doku>test|{{dokuwiki.png?w=300}}]]
* [[test|{{https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png}}]]
EOF
, 'Test setup');
idx_addPage('wiki:included');
saveWikiText('test:include', '{{page>..:wiki:included}}', 'Test setup');
idx_addPage('test:include');
}
示例15: _index
function _index($id)
{
global $INDEXER;
global $CLEAR;
global $QUIET;
// if not cleared only update changed and new files
if ($CLEAR) {
$idxtag = metaFN($id, '.indexed');
if (@file_exists($idxtag)) {
@unlink($idxtag);
}
}
_quietecho("{$id}... ");
idx_addPage($id, !$QUIET);
_quietecho("done.\n");
}