Commit 5dd736e8 authored by lphuberdeau's avatar lphuberdeau

[ENH] Conerting wikilib

parent 716d16d8
......@@ -46,8 +46,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$transaction->commit();
if ($target = $profile->getInstructionPage()) {
global $wikilib;
require_once 'lib/wiki/wikilib.php';
$wikilib = TikiLib::lib('wiki');
$target = $wikilib->sefurl($target);
header('Location: ' . $target);
exit;
......@@ -75,8 +74,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$installer->install($profile);
if (($profile != null) && ($target = $profile->getInstructionPage())) {
global $wikilib;
require_once 'lib/wiki/wikilib.php';
$wikilib = TikiLib::lib('wiki');
$target = $wikilib->sefurl($target);
header('Location: ' . $target);
exit;
......@@ -107,8 +105,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$installer->install($profile, $empty_cache);
if ($target = $profile->getInstructionPage()) {
global $wikilib;
require_once 'lib/wiki/wikilib.php';
$wikilib = TikiLib::lib('wiki');
$target = $wikilib->sefurl($target);
header('Location: ' . $target);
exit;
......
......@@ -84,8 +84,7 @@ if (isset($_REQUEST['wikifeatures'])) {
}
if (isset($backlinksChange) && $backlinksChange) {
global $wikilib;
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$wikilib->refresh_backlinks();
}
}
......
......@@ -11,8 +11,7 @@ if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) {
exit;
}
global $wikilib;
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$auto_query_args = array('sort_mode', 'page');
if (isset($_REQUEST['action']) and isset($_REQUEST['attId'])) {
......
......@@ -39,5 +39,8 @@
<service id="tiki.lib.user" class="UsersLib">
<file>%kernel.root_dir%/lib/userslib.php</file>
</service>
<service id="tiki.lib.wiki" class="WikiLib">
<file>%kernel.root_dir%/lib/wiki/wikilib.php</file>
</service>
</services>
</container>
......@@ -17,7 +17,7 @@ require_once ('tiki-setup.php');
$access->check_feature('feature_wiki');
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true);
$smarty->assign_by_ref('plugins', $plugins);
$smarty->display("tiki-edit_help.tpl");
......@@ -381,8 +381,8 @@ class TikiWebdav_Backends_Wiki extends ezcWebdavSimpleBackend
protected function performCopy($fromPath, $toPath, $depth = ezcWebdavRequest::DEPTH_INFINITY)
{
global $tikilib, $wikilib;
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
print_debug('performCopy ' . $fromPath . " -> " . $toPath . "\n");
......
......@@ -211,8 +211,8 @@ class Tiki_Profile
public static function fromDb( $pageName ) // {{{
{
global $tikilib, $wikilib;
require_once 'lib/wiki/wikilib.php';
$tikilib = TikiLib::lib('tiki');
$wikilib = TikiLib::lib('wiki');
$parserlib = TikiLib::lib('parser');
$profile = new self;
......
......@@ -292,12 +292,12 @@ class MenuLib extends TikiLib
$option['url'] = preg_replace('/&structure=.*/', '', $option['url']);
}
if (preg_match('/.*tiki.index.php$/', $url)) {
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$homePage = $wikilib->get_default_wiki_page();
$url .= "?page=$homePage";
}
if (preg_match('/.*tiki.index.php$/', $option['url'])) {
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$homePage = $wikilib->get_default_wiki_page();
$option['url'] .= "?page=$homePage";
}
......
......@@ -72,7 +72,7 @@ class ModLib extends TikiLib
global $cachelib; require_once("lib/cache/cachelib.php");
$cachelib->invalidate("user_modules_$name");
require_once("lib/wiki/wikilib.php");
$wikilib = TikiLib::lib('wiki');
$converter = new convertToTiki9();
$converter->saveObjectStatus($name, 'tiki_user_modules', 'new9.0+');
......
......@@ -1134,9 +1134,9 @@ class NlLib extends TikiLib
public function get_emails_from_page($wikiPageName)
{
global $prefs, $wikilib;
global $prefs;
include_once 'lib/wiki/wikilib.php';
$wikilib = TikiLib::lib('wiki');
$emails = false;
$canBeRefreshed = false;
......
......@@ -12,7 +12,7 @@ $groupHome = $userlib->get_user_default_homepage($user);
if ( $groupHome != '' ) {
if ( ! preg_match('/^(\/|https?:)/', $groupHome) ) {
$prefs['wikiHomePage'] = $groupHome;
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$prefs['tikiIndex'] = $wikilib->sefurl($prefs['wikiHomePage']);
$smarty->assign('wikiHomePage', $prefs['wikiHomePage']);
} else
......
......@@ -15,7 +15,7 @@ if (!function_exists('smarty_function_sefurl')) {
function smarty_function_sefurl($params, $smarty)
{
global $prefs;
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
// structure only yet
if (isset($params['structure'])) {
......
......@@ -15,8 +15,10 @@ if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
function smarty_modifier_sefurl($source, $type='wiki', $with_next = '', $all_langs='', $with_title='y', $title='' )
{
global $prefs, $tikilib, $wikilib, $smarty;
require_once('lib/wiki/wikilib.php');
global $prefs;
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
$smarty = TikiLib::lib('smarty');
$sefurl = $prefs['feature_sefurl'] == 'y';
......
......@@ -94,8 +94,7 @@ class StructLib extends TikiLib
$page_info = $this->s_get_page_info($page_ref_id);
$query = 'select count(*) from `tiki_structures` where `page_id`=?';
$count = $this->getOne($query, array((int) $page_info['page_id']));
global $wikilib;
include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
if ($count == 1 && $wikilib->is_editable($page_info['pageName'], $user)) {
$this->remove_all_versions($page_info['pageName']);
}
......@@ -366,7 +365,7 @@ class StructLib extends TikiLib
public function get_subtree($page_ref_id, $level = 0, $parent_pos = '')
{
global $tikilib;
$tikilib = TikiLib::lib('tiki');
$ret = array();
$pos = 1;
//The structure page is used as a title
......@@ -378,7 +377,7 @@ class StructLib extends TikiLib
$aux['page_ref_id'] = $struct_info['page_ref_id'];
$aux['pageName'] = $struct_info['pageName'];
$aux['page_alias'] = $struct_info['page_alias'];
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$is_locked = $wikilib->is_locked($struct_info['pageName']);
if ($is_locked) {
$aux['flag'] = 'L';
......
......@@ -65,9 +65,6 @@ class TikiLib extends TikiDb_Bridge
case 'tiki':
global $tikilib;
return self::$libraries[$name] = $tikilib;
case 'wiki':
global $wikilib; include_once('lib/wiki/wikilib.php');
return self::$libraries[$name] = $wikilib;
case 'smarty':
global $smarty;
return self::$libraries[$name] = $smarty;
......@@ -4432,7 +4429,7 @@ class TikiLib extends TikiDb_Bridge
$page_id = $pages->insert($insertData);
//update status, page storage was updated in tiki 9 to be non html encoded
require_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$converter = new convertToTiki9();
$converter->saveObjectStatus($page_id, 'tiki_pages');
......@@ -4521,7 +4518,7 @@ class TikiLib extends TikiDb_Bridge
$id = $this->lastInsertId();
//update status, we don't want the page to be decoded later
require_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$converter = new convertToTiki9();
$converter->saveObjectStatus($id, 'tiki_history');
......@@ -4901,7 +4898,7 @@ class TikiLib extends TikiDb_Bridge
}
//update status, page storage was updated in tiki 9 to be non html encoded
require_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$converter = new convertToTiki9();
$converter->saveObjectStatus($this->getOne("SELECT page_id FROM tiki_pages WHERE pageName = ?", array($pageName)), 'tiki_pages');
......
......@@ -1392,9 +1392,10 @@ class ToolbarHelptool extends Toolbar
function getWikiHtml( $areaId ) // {{{
{
global $wikilib, $smarty, $plugins, $section;
global $plugins, $section;
$smarty = TikiLib::lib('smarty');
if (!isset($plugins)) {
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true, $areaId);
}
......@@ -1415,9 +1416,10 @@ class ToolbarHelptool extends Toolbar
function getWysiwygToken( $areaId ) // {{{
{
global $wikilib, $smarty, $plugins;
global $plugins;
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$smarty = TikiLib::lib('smarty');
$plugins = $wikilib->list_plugins(true, $areaId);
$smarty->assign_by_ref('plugins', $plugins);
......
......@@ -131,10 +131,11 @@ function wikiplugin_attach($data, $params)
{
global $atts;
global $mimeextensions;
global $wikilib; include_once('lib/wiki/wikilib.php');
global $tikilib;
global $user, $section, $section_class;
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
extract($params, EXTR_SKIP);
$loop = array();
......
......@@ -36,7 +36,7 @@ class WikiPluginBackLinks extends PluginsLib
function run ($data, $params)
{
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$params = $this->getParams($params, true);
$aInfoPreset = array_keys($this->aInfoPresetNames);
extract($params, EXTR_SKIP);
......
......@@ -571,8 +571,7 @@ function wikiplugin_img( $data, $params )
$basepath = $prefs['fgal_use_dir'];
} else { //only attachments left
global $atts;
global $wikilib;
include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$dbinfo = $wikilib->get_item_attachment($imgdata['attId']);
$basepath = $prefs['w_use_dir'];
}
......
......@@ -36,7 +36,9 @@ class WikiPluginPluginManager extends PluginsLib
}
function run($data, $params)
{
global $wikilib, $helpurl, $tikilib;
global $helpurl;
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
if (!is_dir(PLUGINS_DIR)) {
return $this->error('No plugin directory defined');
}
......
......@@ -144,7 +144,7 @@ function wikiplugin_realnamelist($data, $params)
if (isset($link)) {
if ($link == 'userpage') {
if ($prefs['feature_wiki_userpage'] == 'y') {
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$page = $prefs['feature_wiki_userpage_prefix'].$row['login'];
if ($tikilib->page_exists($page)) {
$res = '<a href="'.$wikilib->sefurl($page).'" title="'.tra('Page').'">';
......
......@@ -81,8 +81,8 @@ class WikiPluginTitleSearch extends PluginsLib
}
function run ($data, $params)
{
global $wikilib; include_once('lib/wiki/wikilib.php');
global $tikilib;
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
$aInfoPreset = array_keys($this->aInfoPresetNames);
$params = $this->getParams($params, true);
extract($params, EXTR_SKIP);
......
......@@ -935,7 +935,7 @@ function wikiplugin_tracker($data, $params)
TikiLib::lib('relation')->add_relation('tiki.wiki.linkedfield', 'wiki page', $newpagename, 'trackerfield', $outputtowiki);
}
if (empty($url)) {
global $wikilib;
$wikilib = TikiLib::lib('wiki');
$url[0] = $wikilib->sefurl($newpagename);
}
}
......
......@@ -143,7 +143,7 @@ function wikiplugin_userlist($data, $params)
if (isset($link)) {
if ($link == 'userpage') {
if ($prefs['feature_wiki_userpage'] == 'y') {
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$page = $prefs['feature_wiki_userpage_prefix'].$row['login'];
if ($tikilib->page_exists($page)) {
$res = '<a href="'.$wikilib->sefurl($page).'" title="'.tra('Page').'">';
......
......@@ -29,8 +29,11 @@ class EditLib
function make_sure_page_to_be_created_is_not_an_alias($page, $page_info)
{
global $_REQUEST, $semanticlib, $access, $wikilib, $tikilib;
require_once 'lib/wiki/semanticlib.php';
$access = TikiLib::lib('access');
$tikilib = TikiLib::lib('tiki');
$wikilib = TikiLib::lib('wiki');
$semanticlib = TikiLib::lib('semantic');
$aliases = $semanticlib->getAliasContaining($page, true);
if (!$page_info && count($aliases) > 0) {
$error_title = tra("Cannot create aliased page");
......@@ -1220,7 +1223,9 @@ class EditLib
function get_new_page_attributes_from_parent_pages($page, $page_info)
{
global $wikilib, $tikilib;
$tikilib = TikiLib::lib('tiki');
$wikilib = TikiLib::lib('wiki');
$new_page_attrs = array();
$parent_pages = $wikilib->get_parent_pages($page);
$parent_pages_info = array();
......
......@@ -155,7 +155,7 @@ class HistLib extends TikiLib
function get_version($page, $version)
{
//fix for encoded slowly without doing it all at once in the installer upgrade script
require_once("lib/wiki/wikilib.php");
$wikilib = TikiLib::lib('wiki');
$converter = new convertToTiki9();
$converter->convertPageHistoryFromPageAndVersion($page, $version);
......@@ -246,7 +246,7 @@ class HistLib extends TikiLib
// without the data itself (version = 0 now returns data from current version)
function get_page_from_history($page,$version,$fetchdata=false)
{
require_once("lib/wiki/wikilib.php");
$wikilib = TikiLib::lib('wiki');
$converter = new convertToTiki9();
$converter->convertPageHistoryFromPageAndVersion($page, $version);
......
......@@ -159,7 +159,8 @@ class WikiRenderer
private function setupContributors() // {{{
{
global $prefs, $wikilib;
global $prefs;
$wikilib = TikiLib::lib('wiki');
if ( $prefs['wiki_authors_style'] != 'classic' ) {
$contributors = $wikilib->get_contributors($this->page, $this->info['user']);
......@@ -169,7 +170,7 @@ class WikiRenderer
private function setupCreator() // {{{
{
global $wikilib;
$wikilib = TikiLib::lib('wiki');
if (isset($this->info['creator'])) {
$creator = $this->info['creator'];
......@@ -216,7 +217,8 @@ class WikiRenderer
private function setupBacklinks() // {{{
{
global $prefs, $wikilib, $tiki_p_view_backlink;
global $prefs, $tiki_p_view_backlink;
$wikilib = TikiLib::lib('wiki');
if ( $prefs['feature_backlinks'] == 'y' && $tiki_p_view_backlink == 'y') {
$backlinks = $wikilib->get_backlinks($this->page);
......@@ -226,7 +228,8 @@ class WikiRenderer
private function setupActions() // {{{
{
global $prefs, $wikilib, $tiki_p_edit, $tiki_p_remove, $tiki_p_admin_wiki;
global $prefs, $tiki_p_edit, $tiki_p_remove, $tiki_p_admin_wiki;
$wikilib = TikiLib::lib('wiki');
// Verify lock status
if ( $prefs['feature_wiki_usrlock'] == 'y' ) {
......@@ -272,7 +275,9 @@ class WikiRenderer
private function setupPage() // {{{
{
global $prefs, $tikilib, $wikilib, $user;
global $prefs, $user;
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
$this->smartyassign('page', $this->page);
$this->smartyassign('show_page', 'y');
......@@ -412,14 +417,18 @@ class WikiRenderer
private function setupAttachments() // {{{
{
global $prefs, $wikilib;
if ( $prefs['feature_wiki_attachments'] != 'y' || $prefs['feature_use_fgal_for_wiki_attachments'] == 'y' )
global $prefs;
$wikilib = TikiLib::lib('wiki');
if ( $prefs['feature_wiki_attachments'] != 'y' || $prefs['feature_use_fgal_for_wiki_attachments'] == 'y' ) {
return;
}
// If anything below here is changed, please change lib/wiki-plugins/wikiplugin_attach.php as well.
$this->smartyassign('sort_mode', $this->sortMode);
if ( $this->showAttachments !== false )
if ( $this->showAttachments !== false ) {
$this->smartyassign('atts_show', $this->showAttachments);
}
$atts = $wikilib->list_wiki_attachments($this->page, 0, -1, $this->sortMode, '');
$this->smartyassign('atts', $atts["data"]);
......@@ -428,7 +437,9 @@ class WikiRenderer
private function setupFootnotes() // {{{
{
global $prefs, $wikilib, $tikilib;
global $prefs;
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
$this->smartyassign('footnote', '');
$this->smartyassign('has_footnote', 'n');
......
......@@ -260,7 +260,8 @@ class SemanticLib
function getRelationList( $page ) // {{{
{
global $tikilib, $wikilib;
$wikilib = TikiLib::lib('wiki');
$tikilib = TikiLib::lib('tiki');
$relations = array();
$result = $tikilib->fetchAll("SELECT `target_itemId` `toPage`, SUBSTR(`relation` FROM 11) `reltype` FROM tiki_object_relations WHERE `source_itemId` = ? AND `source_type` = 'wiki page' AND `target_type` = 'wiki page' AND `relation` LIKE 'tiki.link.%'", array($page));
......
......@@ -1445,8 +1445,7 @@ class WikiLib extends TikiLib
// Determine the auto TOC setting
$isAutoTocActive = isset($prefs['wiki_auto_toc']) ? $prefs['wiki_auto_toc'] === 'y' : false;
if ($isAutoTocActive) {
$wikilib = TikiLib::lib('wiki');
$isPageAutoToc = $wikilib->get_page_auto_toc($currPage);
$isPageAutoToc = $this->get_page_auto_toc($currPage);
if ($isPageAutoToc != 0) {
// Use page specific setting
$isAutoTocActive = $isPageAutoToc > 0 ? true : false;
......@@ -1487,8 +1486,7 @@ class WikiLib extends TikiLib
if ($isHideTitlePerPage) {
$isHideTitle = false;
if (!empty($currPage)) {
$wikilib = TikiLib::lib('wiki');
$isPageHideTitle = $wikilib->get_page_hide_title($currPage);
$isPageHideTitle = $this->get_page_hide_title($currPage);
if ($isPageHideTitle != 0) {
// Use page specific setting
$isHideTitle = $isPageHideTitle < 0 ? true : false;
......@@ -1503,10 +1501,6 @@ class WikiLib extends TikiLib
}
}
global $wikilib;
$wikilib = new WikiLib;
class convertToTiki9
{
public $parserlib;
......
......@@ -197,7 +197,7 @@ class XmlLib extends TikiLib
$smarty->assign_by_ref('images', $images);
if ($prefs['feature_wiki_attachments'] == 'y' && $this->config['attachments']) {
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$attachments = $wikilib->list_wiki_attachments($page, 0, -1);
if (!empty($attachments['cant'])) {
foreach ($attachments['data'] as $key=>$att) {
......@@ -293,7 +293,8 @@ class XmlLib extends TikiLib
/* create a page from an xml parsing result */
function create_page($info)
{
global $tikilib, $wikilib, $prefs, $tiki_p_wiki_attach_files, $tiki_p_edit_comments, $dbTiki, $tikidomain;
global $prefs, $tiki_p_wiki_attach_files, $tiki_p_edit_comments, $tikidomain;
$tikilib = TikiLib::lib('tiki');
if (($info['data'] = $this->zip->getFromName($info['zip'])) === false) {
$this->errors[] = 'Can not unzip';
......@@ -391,7 +392,7 @@ class XmlLib extends TikiLib
}
}
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$wikilib->wiki_attach_file(
$info['name'],
$attachment['filename'],
......@@ -403,8 +404,6 @@ class XmlLib extends TikiLib
$fhash,
$attachment['created']
);
//change the page data attach is needed $res['attId']
//$res = $wikilib->get_wiki_attach_file($info['name'], $attachment['filename'], $attachment['type'], $attachment['size']);
}
}
......
......@@ -13,7 +13,7 @@
require_once('tiki-setup.php');
$access->check_script($_SERVER["SCRIPT_NAME"], basename(__FILE__));
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true);
$smarty->assign_by_ref('plugins', $plugins);
......@@ -233,7 +233,7 @@ include 'lib/setup/editmode.php';
$info['section_wiki_html'] = $_SESSION['wysiwyg']; //$info['is_html'] ? 'y' : 'n';
// Handles switching editor modes
global $editlib; include_once ('lib/wiki/editlib.php');
$editlib = TikiLib::lib('edit');
if (isset($_REQUEST['mode_normal']) && $_REQUEST['mode_normal']=='y') {
// Parsing page data as first time seeing html page in normal editor
$smarty->assign('msg', "Parsing html to wiki");
......@@ -248,8 +248,7 @@ if (isset($_REQUEST['mode_normal']) && $_REQUEST['mode_normal']=='y') {
$smarty->assign_by_ref('channels', $channels["data"]);
ask_ticket('admin-content-templates');
global $wikilib;
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true, 'editwiki');
$smarty->assign_by_ref('plugins', $plugins);
// disallow robots to index page:
......
......@@ -9,7 +9,7 @@
// $Id$
require_once ('tiki-setup.php');
include_once ('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$access->check_feature(array('feature_wiki', 'feature_backlinks'));
// Get the page from the request var or default it to HomePage
......
......@@ -582,7 +582,7 @@ if ($calitem['allday']) {
if (array_key_exists('CalendarViewGroups', $_SESSION) && count($_SESSION['CalendarViewGroups']) == 1)
$smarty->assign('calendarView', $_SESSION['CalendarViewGroups'][0]);
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true, 'editwiki');
$smarty->assign_by_ref('plugins', $plugins);
$smarty->assign('impossibleDates', $impossibleDates);
......
......@@ -12,8 +12,8 @@ $section = 'wiki page';
$section_class = "tiki_wiki_page manage"; // This will be body class instead of $section
require_once ('tiki-setup.php');
include_once ('lib/wiki/histlib.php');
include_once ('lib/wiki/wikilib.php');
$histlib = TikiLib::lib('hist');
$wikilib = TikiLib::lib('wiki');
$access->check_feature('feature_wiki');
......
......@@ -9,9 +9,9 @@
// $Id$
include_once('tiki-setup.php');
include_once('lib/tikilib.php');
include_once('lib/wiki/wikilib.php');
include_once 'lib/wiki/semanticlib.php';
$tikilib = TikiLib::lib('tiki');
$wikilib = TikiLib::lib('wiki');
$semanticlib = TikiLib::lib('semantic');
$multilinguallib = TikiLib::lib('multilingual');
$access->check_feature(array( 'feature_wiki', 'feature_multilingual' ));
......
......@@ -769,7 +769,7 @@ $smarty->assign('siteTimeZone', $prefs['display_timezone']);
include_once ('tiki-section_options.php');
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true, 'body');
$smarty->assign_by_ref('plugins', $plugins);
......
......@@ -574,7 +574,7 @@ $smarty->assign('publishDate', $publishDate);
$smarty->assign('expireDate', $expireDate);
$smarty->assign('siteTimeZone', $prefs['display_timezone']);
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true, 'body');
$smarty->assign_by_ref('plugins', $plugins);
$smarty->assign('errors', $errors);
......
......@@ -31,10 +31,10 @@ $inputConfiguration = array(
$section = "wiki page";
$section_class = "tiki_wiki_page manage"; // This will be body class instead of $section
require_once ('tiki-setup.php');
include_once ('lib/wiki/wikilib.php');
include_once ('lib/structures/structlib.php');
include_once ('lib/notifications/notificationlib.php');
require_once ("lib/wiki/editlib.php");
$wikilib = TikiLib::lib('wiki');
$structlib = TikiLib::lib('struct');
$notificationlib = TikiLib::lib('notification');
$editlib = TikiLib::lib('edit');
/**
* @param $page
......@@ -1076,7 +1076,7 @@ if (
if (isset($_REQUEST['wiki_cache'])) {
$wikilib->set_page_cache($_REQUEST['page'], $_REQUEST['wiki_cache']);
}
include_once("lib/imagegals/imagegallib.php");
$imagegallib = TikiLib::lib('imagegal');
$cat_desc = ($prefs['feature_wiki_description'] === 'y') ? substr($_REQUEST["description"], 0, 200) : '';
$cat_name = $_REQUEST["page"];
$cat_href = "tiki-index.php?page=" . urlencode($cat_objid);
......
......@@ -122,7 +122,7 @@ include_once ('tiki-section_options.php');
ask_ticket('faq-questions');
global $wikilib; include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$plugins = $wikilib->list_plugins(true, 'faqans');
$smarty->assign_by_ref('plugins', $plugins);
......
......@@ -10,9 +10,9 @@
$section = 'wiki page';
require_once('tiki-setup.php');
include_once('lib/structures/structlib.php');
$structlib = TikiLib::lib('struct');
include_once('lib/wiki/wikilib.php');
$wikilib = TikiLib::lib('wiki');
$parserlib = TikiLib::lib('parser');