|
From: <ru...@us...> - 2010-06-24 06:35:46
|
Revision: 7567
http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7567&view=rev
Author: rurban
Date: 2010-06-24 06:35:40 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
revert r7565, deletion of fixThemeTemplate.
This is optionally needed by custom themes, not by the standard.
Modified Paths:
--------------
trunk/lib/upgrade.php
Modified: trunk/lib/upgrade.php
===================================================================
--- trunk/lib/upgrade.php 2010-06-23 19:43:46 UTC (rev 7566)
+++ trunk/lib/upgrade.php 2010-06-24 06:35:40 UTC (rev 7567)
@@ -1204,6 +1204,29 @@
$replace = $args[1];
$template = $args[2];
}
+
+ function fixThemeTemplate($match, $new, $template) {
+ // for all custom themes
+ $ourthemes = explode(":","blog:Crao:default:Hawaiian:MacOSX:MonoBook:Portland:shamino_com:SpaceWiki:wikilens:Wordpress");
+ $themedir = NormalizeLocalFileName("themes");
+ $dh = opendir($themedir);
+ while ($r = readdir($dh)) {
+ if (filetype($r) == 'dir' and $r[0] != '.' and !is_array($r, $ourthemes))
+ $customthemes[] = $r;
+ }
+ $success = true;
+ $errors = '';
+ foreach ($customthemes as $customtheme) {
+ $template = FindFile("themes/$customtheme/templates/$template");
+ $do = $this->parent->fixLocalFile($match, $new, template);
+ if (!$do[0]) {
+ $success = false;
+ $errors .= $do[1]." ";
+ echo $do[1];
+ }
+ }
+ return array($success, $errors);
+ }
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|