From: <jon...@us...> - 2013-05-31 10:14:03
|
Revision: 46108 http://sourceforge.net/p/tikiwiki/code/46108 Author: jonnybradley Date: 2013-05-31 10:14:01 +0000 (Fri, 31 May 2013) Log Message: ----------- [FIX] get_style_path: Allow custom.css and js in styles or styles/tikidomain dir to be used Modified Paths: -------------- branches/11.x/lib/tikilib.php Modified: branches/11.x/lib/tikilib.php =================================================================== --- branches/11.x/lib/tikilib.php 2013-05-30 18:24:30 UTC (rev 46107) +++ branches/11.x/lib/tikilib.php 2013-05-31 10:14:01 UTC (rev 46108) @@ -5539,9 +5539,6 @@ if (!empty($stl)) { $sbase = $this->get_style_base($stl).'/'; } - if (!is_dir('styles/'.$dbase.$sbase)) { // if the style dir doesn't exist in tikidomain, use root/styles - $dbase = ''; - } $obase = ''; if (!empty($opt)) { @@ -5551,25 +5548,28 @@ } } - if (is_dir('styles/'.$dbase.$sbase)) { - if (empty($filename)) { - if (is_dir('styles/'.$dbase.$sbase.$obase)) { - $path = 'styles/'.$dbase.$sbase.$obase; - } else { - $path = 'styles/'.$dbase.$sbase; // fall back to "parent" style dir if no option one - } + if (empty($filename)) { + if (is_dir('styles/'.$dbase.$sbase.$obase)) { + $path = 'styles/'.$dbase.$sbase.$obase; } else { - if (is_file('styles/'.$dbase.$sbase.$obase.$filename)) { - $path = 'styles/'.$dbase.$sbase.$obase.$filename; - } else if (is_file('styles/'.$dbase.$sbase.$filename)) { // try "parent" style dir if no option one - $path = 'styles/'.$dbase.$sbase.$filename; - } else if (is_file('styles/'.$sbase.$obase.$filename)) { // try non-tikidomain dirs if not found - $path = 'styles/'.$sbase.$obase.$filename; - } else if (is_file('styles/'.$sbase.$filename)) { - $path = 'styles/'.$sbase.$filename; // fall back to "parent" style dir if no option one - } + $path = 'styles/'.$dbase.$sbase; // fall back to "parent" style dir if no option one } + } else { + if (is_file('styles/'.$dbase.$sbase.$obase.$filename)) { + $path = 'styles/'.$dbase.$sbase.$obase.$filename; + } else if (is_file('styles/'.$dbase.$sbase.$filename)) { // try "parent" style dir if no option one + $path = 'styles/'.$dbase.$sbase.$filename; + } else if (is_file('styles/'.$sbase.$obase.$filename)) { // try non-tikidomain dirs if not found + $path = 'styles/'.$sbase.$obase.$filename; + } else if (is_file('styles/'.$sbase.$filename)) { + $path = 'styles/'.$sbase.$filename; // fall back to "parent" style dir if no option + } else if (is_file('styles/'.$dbase.$filename)) { + $path = 'styles/'.$dbase.$filename; // tikidomain root style dir? + } else if (is_file('styles/'.$dbase.$filename)) { + $path = 'styles/'.$filename; // root style dir? + } } + return $path; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |