From: <var...@us...> - 2016-05-25 08:47:36
|
Revision: 9845 http://sourceforge.net/p/phpwiki/code/9845 Author: vargenau Date: 2016-05-25 08:47:34 +0000 (Wed, 25 May 2016) Log Message: ----------- FileSet: be case consistent Modified Paths: -------------- trunk/SOAP.php trunk/lib/XmlRpcServer.php trunk/lib/editpage.php trunk/lib/plugin/PhotoAlbum.php trunk/lib/plugin/PluginManager.php trunk/lib/plugin/WikiAdminSelect.php trunk/lib/plugin/WikiTranslation.php trunk/lib/stdlib.php trunk/lib/upgrade.php trunk/themes/Hawaiian/lib/random.php Modified: trunk/SOAP.php =================================================================== --- trunk/SOAP.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/SOAP.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -245,7 +245,7 @@ $plugin_dir = 'lib/plugin'; if (defined('PHPWIKI_DIR')) $plugin_dir = PHPWIKI_DIR . "/$plugin_dir"; - $pd = new fileSet($plugin_dir, '*.php'); + $pd = new FileSet($plugin_dir, '*.php'); $plugins = $pd->getFiles(); unset($pd); sort($plugins); Modified: trunk/lib/XmlRpcServer.php =================================================================== --- trunk/lib/XmlRpcServer.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/XmlRpcServer.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -696,7 +696,7 @@ $plugin_dir = 'lib/plugin'; if (defined('PHPWIKI_DIR')) $plugin_dir = PHPWIKI_DIR . "/$plugin_dir"; - $pd = new fileSet($plugin_dir, '*.php'); + $pd = new FileSet($plugin_dir, '*.php'); $plugins = $pd->getFiles(); unset($pd); sort($plugins); Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/editpage.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -833,7 +833,7 @@ $plugin_dir = 'lib/plugin'; if (defined('PHPWIKI_DIR')) $plugin_dir = PHPWIKI_DIR . "/$plugin_dir"; - $pd = new fileSet($plugin_dir, '*.php'); + $pd = new FileSet($plugin_dir, '*.php'); $plugins = $pd->getFiles(); unset($pd); sort($plugins); @@ -942,12 +942,12 @@ global $WikiTheme, $request; $image_dir = getUploadFilePath(); - $pd = new imageOrVideoSet($image_dir, '*'); + $pd = new ImageOrVideoSet($image_dir, '*'); $images = $pd->getFiles(); unset($pd); if (defined('UPLOAD_USERDIR') and UPLOAD_USERDIR) { $image_dir .= "/" . $request->_user->_userid; - $pd = new imageOrVideoSet($image_dir, '*'); + $pd = new ImageOrVideoSet($image_dir, '*'); $images = array_merge($images, $pd->getFiles()); unset($pd); } Modified: trunk/lib/plugin/PhotoAlbum.php =================================================================== --- trunk/lib/plugin/PhotoAlbum.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/plugin/PhotoAlbum.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -590,7 +590,7 @@ //all images $list = array(); foreach (array('jpeg', 'jpg', 'png', 'gif') as $ext) { - $fileset = new fileSet($src, "*.$ext"); + $fileset = new FileSet($src, "*.$ext"); $list = array_merge($list, $fileset->getFiles()); } // convert dirname($src) (local fs path) to web path Modified: trunk/lib/plugin/PluginManager.php =================================================================== --- trunk/lib/plugin/PluginManager.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/plugin/PluginManager.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -90,7 +90,7 @@ $plugin_dir = 'lib/plugin'; if (defined('PHPWIKI_DIR')) $plugin_dir = PHPWIKI_DIR . "/$plugin_dir"; - $pd = new fileSet($plugin_dir, '*.php'); + $pd = new FileSet($plugin_dir, '*.php'); $plugins = $pd->getFiles(); unset($pd); sort($plugins); Modified: trunk/lib/plugin/WikiAdminSelect.php =================================================================== --- trunk/lib/plugin/WikiAdminSelect.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/plugin/WikiAdminSelect.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -173,7 +173,7 @@ $plugin_dir = 'lib/plugin'; if (defined('PHPWIKI_DIR')) $plugin_dir = PHPWIKI_DIR . "/$plugin_dir"; - $fs = new fileSet($plugin_dir, 'WikiAdmin*.php'); + $fs = new FileSet($plugin_dir, 'WikiAdmin*.php'); $actions = $fs->getFiles(); sort($actions); foreach ($actions as $f) { Modified: trunk/lib/plugin/WikiTranslation.php =================================================================== --- trunk/lib/plugin/WikiTranslation.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/plugin/WikiTranslation.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -438,7 +438,7 @@ $exclude = $pagelist->explodePageList($exclude, false, $sortby, $limit, $exclude); $path = FindLocalizedFile(WIKI_PGSRC); - $pgsrc = new fileSet($path); + $pgsrc = new FileSet($path); foreach ($pgsrc->getFiles($exclude, $sortby, $limit) as $pagename) { $pagename = urldecode($pagename); if (substr($pagename, -1, 1) == '~') continue; Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/stdlib.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -54,10 +54,10 @@ file_mtime ($filename) sort_file_mtime ($a, $b) - class fileSet {fileSet($directory, $filepattern = false), + class FileSet {FileSet($directory, $filepattern = false), getFiles($exclude='', $sortby='', $limit='') } - class imageSet extends fileSet - class imageOrVideoSet extends fileSet + class ImageSet extends FileSet + class ImageOrVideoSet extends FileSet glob_to_pcre ($glob) glob_match ($glob, $against, $case_sensitive = true) @@ -1333,7 +1333,7 @@ return ($ma > $mb) ? -1 : 1; } -class fileSet +class FileSet { function __construct($directory, $filepattern = false) { @@ -1410,7 +1410,7 @@ } } -class imageSet extends fileSet +class ImageSet extends FileSet { /** * A file is considered an image when the suffix matches one from @@ -1422,7 +1422,7 @@ } } -class imageOrVideoSet extends fileSet +class ImageOrVideoSet extends FileSet { protected function _filenameSelector($filename) { Modified: trunk/lib/upgrade.php =================================================================== --- trunk/lib/upgrade.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/lib/upgrade.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -135,7 +135,7 @@ $this->_rename_page_helper("InterWikiKarte", "InterWikiListe"); // german only $path = FindFile('pgsrc'); - $pgsrc = new fileSet($path); + $pgsrc = new FileSet($path); // most actionpages have the same name as the plugin $loc_path = FindLocalizedFile('pgsrc'); foreach ($pgsrc->getFiles() as $filename) { @@ -161,10 +161,10 @@ // theme specific and global pgsrc global $WikiTheme; $path = $WikiTheme->file("pgsrc"); - // TBD: the call to fileSet prints a warning: + // TBD: the call to FileSet prints a warning: // Notice: Unable to open directory 'themes/MonoBook/pgsrc' for reading $themepgsrc = array(); - $pgsrc = new fileSet($path); + $pgsrc = new FileSet($path); if ($pgsrc->getFiles()) { echo "<h2>", sprintf(_("Check for necessary theme %s updates"), "pgsrc"), "</h2>\n"; @@ -188,7 +188,7 @@ } else { $path = FindLocalizedFile(WIKI_PGSRC); } - $pgsrc = new fileSet($path); + $pgsrc = new FileSet($path); // fixme: verification, ... foreach ($pgsrc->getFiles() as $filename) { if (substr($filename, -1, 1) == '~') continue; Modified: trunk/themes/Hawaiian/lib/random.php =================================================================== --- trunk/themes/Hawaiian/lib/random.php 2016-05-25 08:34:43 UTC (rev 9844) +++ trunk/themes/Hawaiian/lib/random.php 2016-05-25 08:47:34 UTC (rev 9845) @@ -12,7 +12,7 @@ $this->filename = ""; // Pick up your filename here. - $_imageSet = new imageSet($dirname); + $_imageSet = new ImageSet($dirname); $this->imageList = $_imageSet->getFiles(); unset($_imageSet); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |