$Transition['version'] < 2001006 - all transitions listed above $Transition['fplbygroup'] - restore FPLByGroup function $Transition['version'] < 2000915 - all transitions listed above $Transition['mainrc'] - keep using Main.AllRecentChanges $Transition['mainapprovedurls'] - keep using Main.ApprovedUrls $Transition['pageeditfmt'] - default $PageEditFmt value $Transition['mainpages'] - other default pages in Main $Transition['version'] < 1999944 - all transitions listed above To get all of the transitions for compatibility with a previous version of PmWiki, simply set $Transition['version'] in a local configuration file to the version number you want compatibility with. All of the transitions associated with that version will then be enabled. Example: # Keep compatibility with PmWiki version 2.0.13 $Transition['version'] = 2000013; To explicitly enable or disable specific transitions, set the corresponding $Transition[] element to 1 or 0. This will override the $Transition['version'] item listed above. For example, to enable just the 'pageeditfmt' transition, use $Transition['pageeditfmt'] = 1; */ ## if ?trans=0 is specified, then we don't do any fixups. if (@$_REQUEST['trans']==='0') return; ## Transitions from 2.1.12 if (@$Transition['version'] < 2001012) SDVA($Transition, array('nodivnest' => 1)); ## nodivnest: ## This restores the PmWiki 2.1.11 behavior that doesn't ## allow nesting of divs and tables. if (@$Transition['nodivnest']) { function TCells($name,$attr) { global $MarkupFrame; $attr = preg_replace('/([a-zA-Z]=)([^\'"]\\S*)/',"\$1'\$2'",$attr); $tattr = @$MarkupFrame[0]['tattr']; $name = strtolower($name); $out = '<:block>'; if (strncmp($name, 'cell', 4) != 0 || @$MarkupFrame[0]['closeall']['div']) { $out .= @$MarkupFrame[0]['closeall']['div']; unset($MarkupFrame[0]['closeall']['div']); $out .= @$MarkupFrame[0]['closeall']['table']; unset($MarkupFrame[0]['closeall']['table']); } if ($name == 'div') { $MarkupFrame[0]['closeall']['div'] = ""; $out .= "
"; } if ($name == 'table') $MarkupFrame[0]['tattr'] = $attr; if (strncmp($name, 'cell', 4) == 0) { if (strpos($attr, "valign=")===false) $attr .= " valign='top'"; if (!@$MarkupFrame[0]['closeall']['table']) { $MarkupFrame[0]['closeall']['table'] = ""; $out .= "
"; } else if ($name == 'cellnr') $out .= "
"; else $out .= ""; } return $out; } Markup('table', ' 1)); ## vspace: ## This restores PmWiki's use of

to mark ## vertical space in the output. if (@$Transition['vspace']) $HTMLVSpace = "

"; ## Transitions from 2.1.beta15 if (@$Transition['version'] < 2000915) SDVA($Transition, array('fplbygroup' => 1)); ## fplbygroup: ## The FPLByGroup function was removed in 2.1.beta15, this restores it. if (@$Transition['fplbygroup'] && !function_exists('FPLByGroup')) { SDV($FPLFormatOpt['bygroup'], array('fn' => 'FPLByGroup')); function FPLByGroup($pagename, &$matches, $opt) { global $FPLByGroupStartFmt, $FPLByGroupEndFmt, $FPLByGroupGFmt, $FPLByGroupIFmt, $FPLByGroupOpt; SDV($FPLByGroupStartFmt,"
"); SDV($FPLByGroupEndFmt,'
'); SDV($FPLByGroupGFmt,"
\$Group /
\n"); SDV($FPLByGroupIFmt,"
\$Name
\n"); SDVA($FPLByGroupOpt, array('readf' => 0, 'order' => 'name')); $matches = MakePageList($pagename, array_merge((array)$FPLByGroupOpt, $opt), 0); if (@$opt['count']) array_splice($matches, $opt['count']); if (count($matches)<1) return ''; $out = ''; foreach($matches as $pn) { $pgroup = FmtPageName($FPLByGroupGFmt, $pn); if ($pgroup != @$lgroup) { $out .= $pgroup; $lgroup = $pgroup; } $out .= FmtPageName($FPLByGroupIFmt, $pn); } return FmtPageName($FPLByGroupStartFmt, $pagename) . $out . FmtPageName($FPLByGroupEndFmt, $pagename); } } ## Transitions from 2.0.beta44 if (@$Transition['version'] < 1999944) SDVA($Transition, array('mainrc' => 1, 'mainapprovedurls' => 1, 'pageeditfmt' => 1, 'mainpages' => 1)); ## mainrc: ## 2.0.beta44 switched Main.AllRecentChanges to be ## $SiteGroup.AllRecentChanges. This setting keeps Main.AllRecentChanges ## if it exists. if (@$Transition['mainrc'] && PageExists('Main.AllRecentChanges')) { SDV($RecentChangesFmt['Main.AllRecentChanges'], '* [[$Group.$Name]] . . . $CurrentTime $[by] $AuthorLink'); } ## siteapprovedurls: ## 2.0.beta44 switched Main.ApprovedUrls to be $SiteGroup.ApprovedUrls . ## This setting keeps using Main.ApprovedUrls if it exists. if (@$Transition['mainapprovedurls'] && PageExists('Main.ApprovedUrls')) { $ApprovedUrlPagesFmt = (array)$ApprovedUrlPagesFmt; if (PageExists(FmtPageName($ApprovedUrlPagesFmt[0], $pagename))) $ApprovedUrlPagesFmt[] = 'Main.ApprovedUrls'; else array_unshift($ApprovedUrlPagesFmt, 'Main.ApprovedUrls'); } ## pageeditfmt: ## 2.0.beta44 switched to using wiki markup forms for page editing. ## However, some sites and skins have customized values of $PageEdit. ## This setting restores the default values. if (@$Transition['pageeditfmt']) { SDV($PageEditFmt, "

$[Editing \$FullName]

\$EditMessageFmt
$[Author]: $[This is a minor edit]
"); if (@$_POST['preview']) SDV($PagePreviewFmt, "

$[Preview \$FullName]

$[Page is unsaved]

\$PreviewText

$[End of preview -- remember to save]
$[Top]

"); SDV($HandleEditFmt, array(&$PageStartFmt, &$PageEditFmt, 'wiki:$[PmWiki.EditQuickReference]', &$PagePreviewFmt, &$PageEndFmt)); $EditMessageFmt = implode('', $MessagesFmt) . $EditMessageFmt; if ($action=='edit' && IsEnabled($EnableGUIButtons, 0)) array_push($EditFunctions, 'GUIEdit'); } else $MessagesFmt[] = @$EditMessageFmt; function GUIEdit($pagename, &$page, &$new) { global $EditMessageFmt; $EditMessageFmt .= GUIButtonCode($pagename); } ## mainpages: ## In 2.0.beta44 several utility pages change location to the new Site ## group. These settings cause some skins (that use translations) ## to know to link to the new locations. if ($Transition['mainpages']) { XLSDV('en', array( 'Main/SearchWiki' => XL('Site/Search'), 'PmWiki.EditQuickReference' => XL('Site/EditQuickReference'), 'PmWiki.UploadQuickReference' => XL('Site/UploadQuickReference'), )); }