Commit b54002d2 authored by Jonny Bradley's avatar Jonny Bradley

[bp/r31354 & 31355] From xajax_removal branch.

[KIL] xajax removal: First pass of removing Xajax.
3rd party library link disconnected and support files removed.
"loadComponent" functionality removed.
Remaining dependant features' (gmap, webmail, shoutbox) ajax operation disabled and marked with AJAX_TODO comments.
[KIL] xajax removal: Part 2 - feature_wiki_save_draft
Table tiki_page_drafts not removed to preserve existing data but removed from tiki.sql for new installs.
Script in devtools started for manual removal.
parent 37710825
......@@ -102,6 +102,7 @@ doc/devtools/tikireleasediff.sh -text
doc/devtools/tikiwiki.spec -text
doc/devtools/upto_4.1_delete_all_cetgory_perms.sql -text
doc/devtools/upto_4.1_drop_unused_4.0_tables.sql -text
doc/devtools/upto_7_drop_unused_6.x_tables.sql -text
doc/devtools/usergeo.php -text
doc/index.php -text
doc/readme.txt -text
......@@ -1592,13 +1593,9 @@ lib/ZeroClipboard.js -text
lib/accounting/accountinglib.php -text
lib/admin/adminlib.php -text
lib/admin/index.php -text
lib/ajax/LICENSE.txt -text
lib/ajax/README.txt -text
lib/ajax/ajaxlib.php -text
lib/ajax/autosave.js -text
lib/ajax/autosave.php -text
lib/ajax/lib/activex_off.js -text
lib/ajax/tiki-ajax.js -text
lib/articles/artlib.php -text
lib/articles/index.php -text
lib/attributes/attributelib.php -text
......@@ -3258,8 +3255,6 @@ lib/wiki/pluginslib.php -text
lib/wiki/quantifylib.php -text
lib/wiki/renderlib.php -text
lib/wiki/semanticlib.php -text
lib/wiki/wiki-ajax.js -text
lib/wiki/wiki-ajax.php -text
lib/wiki/wikilib.php -text
lib/wiki/xmllib.php -text
lib/wiki3d/CHANGELOG -text
......
......@@ -123,7 +123,7 @@ class TikiDb_LegacyErrorHandler implements TikiDb_ErrorHandler
{
function handle( TikiDb $db, $query, $values, $result ) // {{{
{
global $smarty, $prefs, $ajaxlib;
global $smarty, $prefs;
$msg = $db->getErrorMessage();
$q=$query;
......@@ -170,22 +170,6 @@ class TikiDb_LegacyErrorHandler implements TikiDb_ErrorHandler
header("Cache-Control: no-cache, pre-check=0, post-check=0");
if ($prefs['ajax_xajax'] === 'y') {
global $ajaxlib;
include_once('lib/ajax/xajax/xajax_core/xajaxAIO.inc.php');
if ($ajaxlib && $ajaxlib->canProcessRequest()) {
// this was a xajax request -> return a xajax answer
$page = $smarty->fetch( 'database-connection-error.tpl' );
$objResponse = new xajaxResponse();
$page=addslashes(str_replace(array("\n", "\r"), array(' ', ' '), $page));
$objResponse->script("bugwin=window.open('', 'tikierror', 'width=760,height=500,scrollbars=1,resizable=1');".
"bugwin.document.write('$page');");
echo $objResponse->getOutput();
$this->log($msg.' - '.$q);
die();
}
}
$smarty->display('database-connection-error.tpl');
unset($_SESSION['fatal_error']);
$this->log($msg.' - '.$q);
......
......@@ -1632,17 +1632,6 @@ CREATE TABLE `tiki_pages` (
KEY `lastModif`(`lastModif`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
DROP TABLE IF EXISTS `tiki_page_drafts`;
CREATE TABLE `tiki_page_drafts` (
`user` varchar(200) default '',
`pageName` varchar(255) NOT NULL,
`data` mediumtext,
`description` varchar(200) default NULL,
`comment` varchar(200) default NULL,
`lastModif` int(14) default NULL,
PRIMARY KEY (`pageName`(120), `user`(120))
) ENGINE=MyISAM;
DROP TABLE IF EXISTS `tiki_pageviews`;
CREATE TABLE `tiki_pageviews` (
`day` int(14) NOT NULL default '0',
......
-- jonnyb: remove tables no longer used in tiki 7
DROP TABLE `tiki_page_drafts`;
This diff is collapsed.
====================================================================
xajax PHP Class Library
The easiest way to develop asynchronous Ajax applications with PHP
Version 0.2.5 (stable release)
README Text File
------------------------------------------------------
| Release Notes: |
| http://wiki.xajaxproject.org/0.2.5_Release_Notes |
| |
| Lead Developers: |
| Jared White (jared@intuitivefuture.com) |
| J. Max Wilson (jmaxwilson@users.sourceforge.net) |
| Eion Robb (eion@bigfoot.com) |
------------------------------------------------------
====================================================================
:: To find out what's changed since the 0.2.4 release of xajax, ::
:: view the Release Notes in the link above. ::
1. Introduction
xajax is a PHP library that you can include in your PHP scripts
to provide an easy way for Web pages to call PHP functions or
object methods using Ajax (Asynchronous Javascript And XML). Simply
register one or more functions/methods with the xajax object that
return a proper XML response using the supplied response class, add
a statement in your HTML header to print the Javascript include,
and run a request processor prior to outputting any HTML. Then add
some simple Javascript function calls to your HTML, and xajax takes
care of the rest!
xajax includes a Javascript object to facilitate the communication
between the browser and the server, and it can also be used as a
Javascript library directly to simplify certain DOM and event
manipulations. However, you can definitely choose to use a
dedicated Javascript "engine" of your liking and integrate it with
xajax's client/server communication features in a number of ways.
More tightly-coupled integration will be forthcoming in a future
version of xajax.
2. For More Information
The official xajax Web site is located at:
http://www.xajaxproject.org
Visit the xajax Forums at:
http://community.xajaxproject.org
to keep track of the latest news and participate in the community
discussion.
There is also a wiki with documentation, tips & tricks, and other
information located at:
http://wiki.xajaxproject.org
3. Installation
To run xajax, you need:
* Apache Web Server or IIS for Windows XP/2003 Server
(other servers may or may not work and are not supported at this
time)
* PHP 4.3.x or PHP 5.x
* Minimum supported browsers: Internet Explorer 5.5, Firefox 1.0 (or
equivalent Gecko-based browser), Safari 1.3, Opera 8.5 (older
versions only work with GET requests)
To install xajax:
Unpack the contents of this archive and copy them to your main Web
site folder. Or if you wish, you can put all of the files in a
dedicated "xajax" folder on your Web server (make sure that you
know what that URL is relative your site pages so you can provide
xajax with the correct installed folder URL). Note that the
"thewall" folder in the "examples" folder needs to be writable by
the Web server for that example to function.
Within the main xajax folder there are two folders: "examples"
and "tests". You should be able to view these PHP pages from your
Web browser and see xajax working in action. If you can view the
pages but the AJAX calls are not working, there may be something
wrong with your server setup or perhaps your browser is not
supported or configured correctly. If worst comes to worst, post
a message in our forums and someone may be able to help you.
4. Documentation
Detailed documentation for the xajax PHP classes is available on
our wiki (URL listed above in section 2), and more is on the way
(particularly in regards to the Javascript component of xajax).
Another good way of learning xajax is to look at the code for the
examples and tests. If you need any help, pop in the forums and
ask for assistance (and the more specific your questions are,
the better the answers will be).
5. Contributing to xajax
xajax is released under the LGPL open source license. If you wish
to contribute to the project or suggest new features, introduce
yourself on the forums or you can e-mail the lead developers at
the addresses listed at the top of this README.
6. Good luck and enjoy!
====================================================================
<?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
// This script may only be included - so it's better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
header("location: index.php");
die;
}
global $prefs;
if ($prefs['ajax_xajax'] === 'y') {
require_once("lib/ajax/xajax/xajax_core/xajaxAIO.inc.php");
if (!defined ('XAJAX_GET')) define ('XAJAX_GET', 0);
class TikiAjax extends xajax
{
/**
* Array of templates that are allowed to be served
*
* @access private
* @var array $aTemplates
*/
var $aTemplates;
var $deniedFunctions;
/**
* PHP 5 constructor.
*
* @access public
* @return void
*/
function __construct() {
parent::__construct();
$this->aTemplates = array( 'confirm.tpl' => 1, 'error.tpl' => 1);
$this->deniedFunctions = array();
$this->configure('waitCursor',true);
}
/**
* Tells ajax engine that a given template can be retrieved with
* this page
*
* @access public
* @param string $name
* @return void
*/
function registerTemplate($template) {
$this->aTemplates[$template] = 1;
}
/**
* Sets access permission for a given function.
* Permission MUST be set before registering the function.
*
* @access public
* @param string $functionName
* @param boolean $hasPermission
* @return void
*/
function setPermission($functionName, $hasPermission) {
if (!$hasPermission) {
$this->deniedFunctions[$functionName] = 1;
}
}
/**
* Checks if a given template is registered
*
* @access public
* @param string $template
* @return boolean
*/
function templateIsRegistered($template) {
return array_key_exists($template, $this->aTemplates);
}
/**
* Register a JavaScript function
*
* @access public
* @param string|array $mFunction - JS function name OR array e.g. array('myFunctionName', array('callback' => 'myCallbackVarName')
* @param int $sRequestType {XAJAX_GET = 0}
* @return void
*/
function registerFunction($mFunction, $sRequestType=XAJAX_GET) {
$functionName = is_array($mFunction) ? $mFunction[0] : $mFunction;
$this->setDefaultMethod($sRequestType);
if (isset($this->deniedFunctions[$functionName])) {
if (is_array($mFunction)) {
if (method_exists($mFunction[1], $mFunction[2] . 'Error')) {
$mFunction[2] .= 'Error';
} else {
$mFunction[1] &= $this;
$mFunction[2] = 'accessDenied';
}
} else {
if (function_exists($mFunction . 'Error')) {
$mFunction .= 'Error';
} else {
$mFunction = array($mFunction, &$this, 'accessDenied');
}
}
}
if (is_array($mFunction) && count($mFunction) > 1) {
xajax::register(XAJAX_FUNCTION,$functionName, $mFunction[1]);
} else {
xajax::register(XAJAX_FUNCTION,$mFunction);
}
}
/*
* Returns default access denied error
*
* @access public
* @return xajaxResponse object
*/
function accessDenied() {
$objResponse = new xajaxResponse();
$objResponse->Alert(tra("Permission denied"));
return $objResponse;
}
/**
* Assigns xajax javascript to smarty just before processing requests.
* this way developer can register functions in php code and don't have
* to manually assign xajax_js.
*
* @access public
* @return void
*/
function processRequests() {
global $smarty;
if (isset($smarty)) {
$smarty->assign("xajax_js",$this->getJavascript('lib/ajax/xajax/'));
}
xajax::processRequest();
}
}
} else {
// dumb TikiAjax class
class TikiAjax
{
function TikiAjax() {}
# function __construct() {} // commented out because it causes PHP notice "constructor already defined for class TikiAjax" (no idea, where and why it even goes through this file when ajax feature is not enabled)
function registerFunction() {}
function registerTemplate() {}
function templateIsRegistered() { return false; }
function processRequests() {}
function getJavascript() { return ''; }
}
}
global $ajaxlib;
$ajaxlib = new TikiAjax();
$ajaxlib->registerFunction("loadComponent");
function loadComponent($template, $htmlElementId, $max_tikitabs = 0, $last_user = '') {
global $smarty, $ajaxlib, $prefs, $user, $headerlib;
global $js_script;
$objResponse = new xajaxResponse();
$objResponse->setCharacterEncoding('UTF-8');
$confirmation_text = $smarty->get_template_vars('confirmation_text');
if ( $last_user != $user ) {
// If the user session timed out, completely reload the page to refresh right/left modules
$objResponse->Redirect($_SERVER['REQUEST_URI'], 0);
} elseif ( $ajaxlib->templateIsRegistered($template) ) {
$content = '';
if ($smarty->get_template_vars('mid') == $template) {
$content = $smarty->get_template_vars('mid_data');
}
if (empty($content)) {
$content = $smarty->fetch($template);
}
// Help
require_once $smarty->_get_plugin_filepath('function', 'show_help');
$content .= smarty_function_show_help(null,$smarty);
// Handle TikiTabs in order to display only the current tab in the XAJAX response
// This has to be done here, since it is tikitabs() is usually called when loading the <body> tag
// which is not done again when replacing content by the XAJAX response
//
// take out javascript from the html response because it needs to be sent specifically as javascript
// using $objResponse->script($s) below
$js_script = $headerlib->getJsFromHTML( $content, true );
// do included files too...
$js_files = array();
preg_match_all('/<script[^>]*src=[\'"]??(.*)[\'"]??>\s*<\/script>/Umis', $content, $jsarr);
if (count($jsarr) > 1 && is_array($jsarr[1])) {
$js = $jsarr[1];
$js_files = array_merge($js_files, $js);
}
// now remove all the js from the source
$content = preg_replace('/\s*<script.*javascript.*>.*\/script>\s*/Umis', '', $content);
// attach the cleaned xhtml to the response
$objResponse->Assign($htmlElementId, "innerHTML", $content);
} elseif ( $ajaxlib->templateIsRegistered('confirm.tpl') && !empty($confirmation_text) ) {
$params = array(
'_tag' => 'n',
'_keepall' => 'y'
);
if ( $prefs['feature_ticketlib2'] == 'y' ) {
$objResponse->confirmCommands(1, $confirmation_text);
$params['daconfirm'] = 'y';
$params['ticket'] = $smarty->get_template_vars('ticket');
}
require_once('lib/smarty_tiki/block.self_link.php');
require_once('lib/smarty_tiki/modifier.escape.php');
$uri = smarty_modifier_escape(smarty_block_self_link($params, '', $smarty), 'javascript');
$objResponse->call("loadComponent('$uri','$template','$htmlElementId',".((int)$max_tikitabs).",'$last_user')");
} elseif ( $ajaxlib->templateIsRegistered('error.tpl') ) {
$content = $smarty->fetch('error.tpl');
$objResponse->Assign($htmlElementId, "innerHTML", $content);
} else {
$objResponse->alert(sprintf(tra("Template %s not registered"),$template));
}
$js_files[] = array();
if (count($js_files)) {
foreach($js_files as $f) {
if (trim($f) != '') {
$objResponse->includeScript($f);
}
}
}
if( $prefs['tiki_minify_javascript'] == 'y' ) {
ksort($headerlib->jsfiles);
$hjsfiles = $headerlib->getMinifiedJs();
if( isset($prefs['javascript_cdn']) && $prefs['javascript_cdn'] == 'google' ) {
$hjsfiles[] = 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js';
if( $prefs['feature_jquery_ui'] == 'y' ) {
$hjsfiles[] = 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js';
}
}
} else {
$hjsfiles = $headerlib->getJsFilesList();
}
foreach($hjsfiles as $f) {
foreach ($f as $jsf) {
if (trim($jsf) != '') {
$objResponse->includeScriptOnce($jsf);
}
}
}
if (strpos($content, '<input type="hidden" name="wysiwyg" value="y" />') !== false) {
$ck_reset = "window.CKEDITOR = null;$.getScript('lib/ckeditor/ckeditor.js');";
} else {
$ck_reset = '';
}
$objResponse->script('xajax.config.requestURI="'.$ajaxlib->getRequestURI().'";' . $ck_reset);
$max_tikitabs = (int)$max_tikitabs;
if ( $max_tikitabs > 0 && $prefs['feature_tabs'] == 'y' ) {
global $cookietab;
$tab = ( $cookietab != '' ) ? (int)$cookietab : 1;
$headerlib->add_jq_onready("tikitabs($tab,$max_tikitabs);");
}
// collect js from headerlib
$jscontent = $headerlib->output_js(false);
global $tikidomainslash;
$tmp_jsfile = 'temp/public/'.$tikidomainslash.md5($jscontent).'.js';
if ( ! file_exists( $tmp_jsfile) ) {
file_put_contents( $tmp_jsfile, $jscontent );
chmod($tmp_jsfile, 0644);
}
$objResponse->includeScript($tmp_jsfile);
if ($prefs['ajax_autosave'] == 'y') {
$objResponse->call("auto_save");
}
return $objResponse;
}
if ($prefs['ajax_autosave'] === 'y') {
require_once("lib/ajax/autosave.php");
}
function loadComponent(url, template, htmlelement, max_tikitabs, last_user) {
ajaxLoadingShow(htmlelement);
xajax.config.requestURI = url;
xajax_loadComponent(template, htmlelement, max_tikitabs, last_user);
}
if (typeof xajax !== 'undefined') {
xajax.callback.global.onRequest = function () {
show('ajaxLoading');
};
xajax.callback.global.beforeResponseProcessing = ajaxLoadingHide;
}
......@@ -134,13 +134,6 @@ class Smarty_Tikiwiki extends Smarty
}
}
// Enable AJAX
if ( $prefs['ajax_xajax'] === 'y' && $_smarty_display ) {
global $ajaxlib; require_once('lib/ajax/ajaxlib.php');
$ajaxlib->registerTemplate('tiki-site_header_login.tpl');
$ajaxlib->registerTemplate($tpl);
}
if ( $_smarty_tpl_file == 'tiki-print.tpl' ) {
$this->assign('print_page', 'y');
}
......@@ -148,22 +141,9 @@ class Smarty_Tikiwiki extends Smarty
$this->assign('mid_data', $data);
if ($prefs['feature_fullscreen'] != 'y' || empty($_SESSION['fullscreen']) || $_SESSION['fullscreen'] != 'y')
include_once('tiki-modules.php');
if ( $prefs['ajax_xajax'] === 'y' && $_smarty_display ) {
$ajaxlib->processRequests();
}
} elseif ($_smarty_tpl_file == 'confirm.tpl' || $_smarty_tpl_file == 'error.tpl' || $_smarty_tpl_file == 'error_ticket.tpl' || $_smarty_tpl_file == 'error_simple.tpl') {
include_once('tiki-modules.php');
// Enable AJAX
if ( $prefs['ajax_xajax'] === 'y' && $_smarty_display ) {
$_POST['xajaxargs'][0] = $_smarty_tpl_file;
global $ajaxlib; require_once('lib/ajax/ajaxlib.php');
$ajaxlib->registerTemplate('tiki-site_header_login.tpl');
$ajaxlib->registerTemplate($_smarty_tpl_file);
$ajaxlib->processRequests();
}
}
if (isset($style_base)) {
if ($tikidomain and file_exists("templates/$tikidomain/styles/$style_base/$_smarty_tpl_file")) {
$_smarty_tpl_file = "$tikidomain/styles/$style_base/$_smarty_tpl_file";
......
......@@ -9,15 +9,6 @@ function prefs_ajax_list() {
return array(
'ajax_xajax' => array(
'name' => tra('Ajax Xajax'),
'description' => tra('Use "xajax" library to "ajaxify" most Tiki pages.'),
'help' => 'Ajax',
'type' => 'flag',
'dependencies' => array(
'feature_ajax',
),
),
'ajax_autosave' => array(
'name' => tra('Ajax auto-save'),
'description' => tra('Saves your edits as you go along enabling you to recover your work after an "interruption". Also enables "Live" preview and is required for wysiwyg plugin processing.'),
......
......@@ -412,18 +412,6 @@ function prefs_feature_list() {
'help' => 'Wysiwyg',
'type' => 'flag',
),
'feature_wiki_save_draft' => array(
'name' => tra('Save draft'),
'warning' => tra('Experimental (Requires AJAX)'),
'dependencies' => array(
'feature_ajax',
),
'type' => 'flag',
'dependencies' => array(
'feature_ajax',
'ajax_xajax',
),
),
'feature_kaltura' => array(
'name' => tra('Kaltura'),
'description' => tra('Collaborative video editing'),
......
......@@ -126,5 +126,4 @@ JS
if ($prefs['feature_ajax'] != 'y') {
$prefs['ajax_autosave'] = 'n';
$prefs['ajax_xajax'] = 'n';
}
......@@ -103,7 +103,6 @@ function get_default_prefs() {
'feature_wiki_userpage_prefix' => 'User:',
'feature_wiki_usrlock' => 'n',
'feature_wiki_feedback_polls' => array(),
'feature_wiki_save_draft' => 'n',
'feature_wikiwords' => 'n',
'feature_wikiwords_usedash' => 'y',
'feature_wiki_pagealias' => 'y',
......@@ -1519,7 +1518,6 @@ function get_default_prefs() {
'feature_htmlpurifier_output' => 'n',
'feature_ajax' => 'y',
'ajax_autosave' => 'y',
'ajax_xajax' => 'n',
'feature_antibot' => 'y',
'feature_banners' => 'n',
'feature_banning' => 'n',
......
......@@ -47,17 +47,5 @@ function smarty_block_ajax_href($params, $content, &$smarty, $repeat) {
$func = isset($params['function']) ? $params['function']: $def_func; // preserve previous behaviour
$last_user = htmlspecialchars($user);
// temporary switch to not do ajax for ckeditor button - not reliable in tiki 6
// Actually in tiki 6 even when not ckeditor if you edit while in tiki-index vs editpage the plugin help breaks as well, you get blank help
if ( $prefs['ajax_xajax'] !== 'y' || $prefs['javascript_enabled'] == 'n' || $template === 'tiki-editpage.tpl' ) {
return " href=\"$url\" ";
} else {
$max_tikitabs = 50; // Same value as in header.tpl, <body> tag onload's param
if (empty($params['_anchor'])) {
$anchor = "#main";
} else {
$anchor = '#'.$params['_anchor'];
}
return " href=\"$anchor\" onclick=\"$onclick $func('$url','$template','$htmlelement',$max_tikitabs,'$last_user'); return false\" ";
}
return " href=\"$url\" ";
}
......@@ -40,7 +40,7 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
* - zero_based_offset: Items addressed as zero-based (defaults to 'y'). If 'n' then "one based" offset used (1 to cant + 1)
* (jb tiki5: only fully tested without reloffset and step=1)
* - show_numbers: Show/hide direct_pagination links, current and total numbers (Defaults to 'y')
* - _ajax : if set to 'n', will force disabling AJAX even if the ajax_xajax feature is enabled (defaults to 'y')
* - _ajax : if set to 'n', will force disabling AJAX even if the ajax xajax feature is enabled (defaults to 'y') AJAX_TODO
*/
function smarty_block_pagination_links($params, $url, &$smarty, $repeat) {
global $prefs;
......
......@@ -20,7 +20,7 @@ if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
* params are the same as smarty 'query' function + some special params starting with an underscore:
* _sort_field : name of the field used for sorting,
* _sort_arg : name of the URL argument that contains the field to use for sorting. Defaults to 'sort',
* _ajax : if set to 'n', will force disabling AJAX even if the ajax_xajax feature is enabled,
* _ajax : if set to 'n', will force disabling AJAX even if the ajax xajax feature is enabled, AJAX_TODO
* _tag : if set to 'n', will only return an URL, not the full A tag + text (AJAX and sorting features are not available in this case),
* _class : CSS class to use for the A tag
* _template : (see smarty query function 'template' param)
......@@ -86,7 +86,6 @@ function smarty_block_self_link($params, $content, &$smarty, $repeat = false) {
}
$params['_type'] = $default_type;
if ( $prefs['ajax_xajax'] === 'y' && $params['_ajax'] === 'y') { unset ($params['_anchor']); }
$ret = smarty_function_query($params, $smarty);
}
......@@ -110,10 +109,7 @@ function smarty_block_self_link($params, $content, &$smarty, $repeat = false) {
$ret,
$smarty,
false
);
if ($prefs['ajax_xajax'] === 'y' || empty($params['_onclick'])) {
unset($params['_onclick']);
}
);
} else {
$ret = 'href="'.$ret.'"';
}
......
......@@ -450,11 +450,6 @@ class TikiAccessLib extends TikiLib
return $types;
}
function is_xajax_request() {
global $prefs;
return ( $prefs['ajax_xajax'] === 'y' && isset($_POST['xajaxargs']) );
}
function is_machine_request() {
foreach( $this->get_accept_types() as $name => $full ) {
switch( $name ) {
......
......@@ -4492,15 +4492,6 @@ class TikiLib extends TikiDb_Bridge
}
$this->cache_page_info[$pageNameEncode] = $row;
global $user, $prefs;
if ( $user && $prefs['feature_wiki_save_draft'] == 'y' ) {
$query = "select * from `tiki_page_drafts` where `user`=? and `pageName`=?";
$result = $this->query($query, array($user, $pageName));
if ( $result->numRows() ) {
$this->cache_page_info[$pageNameEncode]['draft'] = $result->fetchRow();
}
}
return $this->cache_page_info[$pageNameEncode];
}
}
......@@ -7412,9 +7403,6 @@ if( \$('#$id') ) {
sendWikiEmailNotification('wiki_page_changed', $pageName, $edit_user, $edit_comment, $old_version, $edit_data, $machine, $diff, $edit_minor, $hash['contributions'], 0, 0, $lang);
}
$query = "delete from `tiki_page_drafts` where `user`=? and `pageName`=?";
$this->query($query, array($GLOBALS['user'], $pageName));
if ($prefs['feature_score'] == 'y') {
$this->score_event($user, 'wiki_edit');
}
......
......@@ -1860,7 +1860,6 @@ class UsersLib extends TikiLib
$this->query("update `tiki_private_messages` set `toNickname`=? where `toNickname`=?", array($to,$from));
$this->query("update `tiki_pages` set `user`=? where `user`=?", array($to,$from));
$this->query("update `tiki_pages` set `creator`=? where `creator`=?", array($to,$from));