The environment variable must be set if you are creating a new article using a different script than VaultWiki:
Code:
$vault->misc['creating_article'] = true;
If you are editing an existing article, this must be set instead:
Code:
$vault->misc['editing_wiki'] = true;
If you are editing then you must also manually start the Revision DM, or you can call:
Code:
require_once(DIR . '/vault/functions/rollback.php');
revision_quick_update($revision, $foruminfo, $threadinfo, $post);
// $revision should contain the changes to the article
Both options assume you already checked wiki permissions and that you already confirmed the article title doesn't exist or isn't banned.
Bookmarks