本文整理汇总了PHP中idx_addPage函数的典型用法代码示例。如果您正苦于以下问题:PHP idx_addPage函数的具体用法?PHP idx_addPage怎么用?PHP idx_addPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了idx_addPage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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'));
}
开发者ID:richmahn,项目名称:Door43,代码行数:7,代码来源:fulltext_backlinks.test.php
示例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);
}
}
开发者ID:demiankatz,项目名称:dokuwiki-mredirect,代码行数:29,代码来源:action.php
示例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'));
}
开发者ID:richmahn,项目名称:Door43,代码行数:8,代码来源:fulltext_mediause.test.php
示例4: _index
function _index($id)
{
global $CLEAR;
global $QUIET;
_quietecho("{$id}... ");
idx_addPage($id, !$QUIET, $CLEAR);
_quietecho("done.\n");
}
开发者ID:neutrinog,项目名称:Door43,代码行数:8,代码来源:indexer.php
示例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');
}
开发者ID:richmahn,项目名称:Door43,代码行数:8,代码来源:indexer_indexing.test.php
示例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');
}
开发者ID:cosmocode,项目名称:dokuwiki-plugin-struct,代码行数:10,代码来源:Type_Page.test.php
示例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));
}
开发者ID:neutrinog,项目名称:Door43,代码行数:10,代码来源:mediaindex.test.php
示例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');
}
开发者ID:omusico,项目名称:isle-web-framework,代码行数:11,代码来源:topic_and_tagrefine.test.php
示例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]));
}
开发者ID:kochichi,项目名称:dokuwiki-plugin-move,代码行数:16,代码来源:affectedPagesNs.test.php
示例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'));
}
开发者ID:kochichi,项目名称:dokuwiki-plugin-move,代码行数:15,代码来源:tpl.test.php
示例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');
}
开发者ID:mattandwhatnot,项目名称:plugin-include,代码行数:12,代码来源:locallink_conversion.test.php
示例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);
}
}
开发者ID:omusico,项目名称:isle-web-framework,代码行数:12,代码来源:topic_sort.test.php
示例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'));
}
开发者ID:phillip-hopper,项目名称:plugin-include,代码行数:15,代码来源:pagemove_support.test.php
示例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');
}
开发者ID:mattandwhatnot,项目名称:plugin-include,代码行数:16,代码来源:media_linktitle_conversion.test.php
示例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");
}
开发者ID:rezlemic,项目名称:dokuwiki-jQuery,代码行数:16,代码来源:indexer.php
示例16: test_move_wiki_namespace
public function test_move_wiki_namespace()
{
$this->markTestSkipped('This test is failing.');
global $AUTH_ACL;
$AUTH_ACL[] = "wiki:*\t@ALL\t16";
idx_addPage('wiki:dokuwiki');
idx_addPage('wiki:syntax');
/** @var helper_plugin_move $move */
$move = plugin_load('helper', 'move');
$opts = array('ns' => 'wiki', 'newns' => 'foo', 'contenttomove' => 'both');
$this->assertSame(3, $move->start_namespace_move($opts));
$this->assertSame(1, $move->continue_namespace_move());
$this->assertSame(0, $move->continue_namespace_move());
$this->assertFileExists(wikiFN('foo:dokuwiki'));
$this->assertFileNotExists(wikiFN('wiki:syntax'));
$this->assertFileExists(mediaFN('foo:dokuwiki-128.png'));
}
开发者ID:kbuildsyourdotcom,项目名称:Door43,代码行数:17,代码来源:namespace_move.test.php
示例17: test_rename
public function test_rename() {
global $ID;
/** @var $pagemove helper_plugin_pagemove */
$pagemove = plugin_load('helper', 'pagemove');
if (!$pagemove) return; // disable the test when pagemove 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');
$ID = 'editx';
$opts['ns'] = '';
$opts['newname'] = 'edit';
$opts['newns'] = 'test';
$pagemove->move_page($opts);
$this->assertEquals('{{section>links#foo}} {{page>test:edit}} {{page>test:edit&nofooter}} {{section>test:edit#test}} {{page>test:edit&nofooter}}', rawWiki('links'));
}
开发者ID:neutrinog,项目名称:Door43,代码行数:17,代码来源:pagemove_support.test.php
示例18: test_topic_tag
function test_topic_tag()
{
saveWikiText('tagged_page', '{{tag>mytag test2tag}}', 'Test');
saveWikiText('topic_page', '{{topic>mytag}}' . DOKU_LF . DOKU_LF . '{{tag>topictag mytag}}' . DOKU_LF, 'Test');
idx_addPage('topic_page');
idx_addPage('tagged_page');
$this->assertContains('tag:topictag', p_wiki_xhtml('topic_page'), 'Page with tag syntax doesn\'t contain tag output');
$this->assertNotContains('tag:test2tag', p_wiki_xhtml('topic_page'), 'Page with tag and topic syntax tag which is listed in a page that is listed in the topic syntax but not on the page itself');
$this->assertContains('topic_page', p_wiki_xhtml('topic_page'), 'Page with topic and tag syntax doesn\'t list itself in the topic syntax');
$this->assertContains('tagged_page', p_wiki_xhtml('topic_page'), 'Page with topic syntax doesn\'t list matching page');
$this->assertContains('tag:mytag', p_wiki_xhtml('tagged_page'), 'Page with tag syntax doesn\'t contain tag output');
$this->assertContains('tag:test2tag', p_wiki_xhtml('tagged_page'), 'Page with tag syntax doesn\'t contain tag output');
$this->assertNotContains('tag:topictag', p_wiki_xhtml('tagged_page'), 'Page with tag syntax contains tag from a page in which it is listed in the topic syntax');
saveWikiText('tagged_page', '{{tag>test2tag}}', 'Deleted mytag');
$this->assertNotContains('tagged_page', p_wiki_xhtml('topic_page'), 'Page that no longer contains the tag is still listed in the topic syntax (caching problems?)');
$this->assertNotContains('tag:mytag', p_wiki_xhtml('tagged_page'), 'Removed tag is still listed in XHTML output');
}
开发者ID:omusico,项目名称:isle-web-framework,代码行数:17,代码来源:topic_tag.test.php
示例19: test_safeindex
public function test_safeindex()
{
global $conf;
global $AUTH_ACL;
$conf['superuser'] = 'john';
$conf['useacl'] = 1;
$AUTH_ACL = array('* @ALL 0', '* @user 8', 'public @ALL 1');
$_SERVER['REMOTE_USER'] = 'john';
saveWikiText('parent', "{{page>child}}\n\n[[public_link]]\n\n{{page>public}}", 'Test parent created');
saveWikiText('child', "[[foo:private]]", 'Test child created');
saveWikiText('public', "[[foo:public]]", 'Public page created');
idx_addPage('parent');
idx_addPage('child');
idx_addPage('public');
$this->assertEquals(array('parent', 'public'), ft_backlinks('foo:public'));
$this->assertEquals(array('child'), ft_backlinks('foo:private'));
$this->assertEquals(array('parent'), ft_backlinks('public_link'));
}
开发者ID:omusico,项目名称:isle-web-framework,代码行数:18,代码来源:safeindex.test.php
示例20: test_moveSingleMedia_colonstart
/**
* @group slow
*/
public function test_moveSingleMedia_colonstart()
{
global $AUTH_ACL;
$AUTH_ACL[] = "wiki:*\t@ALL\t16";
$AUTH_ACL[] = "foobar:*\t@ALL\t8";
$filepath = DOKU_TMP_DATA . 'media/wiki/testimage.png';
io_makeFileDir($filepath);
io_saveFile($filepath, '');
saveWikiText('wiki:movetest', '{{:wiki:testimage.png?200}}', 'Test initialized');
idx_addPage('wiki:movetest');
$src = 'wiki:testimage.png';
$dst = 'foobar:logo_2.png';
/** @var helper_plugin_move_op $move */
$move = plugin_load('helper', 'move_op');
$this->assertTrue($move->moveMedia($src, $dst));
$this->assertTrue(@file_exists(mediaFn('foobar:logo_2.png')));
$this->assertEquals('{{:foobar:logo_2.png?200}}', rawWiki('wiki:movetest'));
}
开发者ID:kochichi,项目名称:dokuwiki-plugin-move,代码行数:21,代码来源:mediamove.test.php
注:本文中的idx_addPage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论