From: <sy...@us...> - 2011-06-30 12:56:31
|
Revision: 35145 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=35145&view=rev Author: sylvieg Date: 2011-06-30 12:56:24 +0000 (Thu, 30 Jun 2011) Log Message: ----------- [FIX]rollback: big hack for wysiwyg/tiki rollback to preserve tiki html page. Usually when you go for wysiwyg you do not get back - so if the latest version is tiki, probably the rollback is tiki : TODO a column wysiwyg in tiki_history Modified Paths: -------------- branches/7.x/lib/wiki/histlib.php Modified: branches/7.x/lib/wiki/histlib.php =================================================================== --- branches/7.x/lib/wiki/histlib.php 2011-06-30 12:34:59 UTC (rev 35144) +++ branches/7.x/lib/wiki/histlib.php 2011-06-30 12:56:24 UTC (rev 35145) @@ -78,11 +78,13 @@ $query = "update `tiki_pages` set `data`=?,`lastModif`=?,`user`=?,`comment`=?,`version`=`version`+1,`ip`=?, `description`=?, `is_html`=?"; $bindvars = array($res['data'], $res['lastModif'], $res['user'], $res['comment'], $res['ip'], $res['description'], $res['is_html']); - + // handle rolling back once page has been edited in a different editor (wiki or wysiwyg) based on is_html in history if ($prefs['feature_wysiwyg'] == 'y' && $prefs['wysiwyg_optional'] == 'y' && $prefs['wysiwyg_memo'] == 'y') { if ($res['is_html'] == 1) { - $bindvars[] = 'y'; + // big hack: when you move to wysiwyg you do not come back usually -> wysiwyg should be a column in tiki_history + $info = $this->get_page_info($page); + $bindvars[] = $info['wysiwyg']; } else { $bindvars[] = 'n'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |