From: <je...@us...> - 2006-07-13 02:23:35
|
Revision: 13959 Author: jenst Date: 2006-07-12 19:23:24 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/gallery/?rev=13959&view=rev Log Message: ----------- 2006-07-13 Jens Tkotz <je...@pe...> 1.6-svn-b1-j84-UNSTABLE * NEW: Added fs_fileIsHidden() to platform functions. Modified Paths: -------------- branches/DEV_1_6/gallery/ChangeLog branches/DEV_1_6/gallery/Version.php branches/DEV_1_6/gallery/platform/fs_unix.php branches/DEV_1_6/gallery/platform/fs_win32.php Modified: branches/DEV_1_6/gallery/ChangeLog =================================================================== --- branches/DEV_1_6/gallery/ChangeLog 2006-07-13 00:03:56 UTC (rev 13958) +++ branches/DEV_1_6/gallery/ChangeLog 2006-07-13 02:23:24 UTC (rev 13959) @@ -1,3 +1,7 @@ +2006-07-13 Jens Tkotz <je...@pe...> 1.6-svn-b1-j84-UNSTABLE + + * NEW: Added fs_fileIsHidden() to platform functions. + 2006-07-12 Jens Tkotz <je...@pe...> 1.6-svn-b1-j83-UNSTABLE * Send_email to new users now default unchecked. Modified: branches/DEV_1_6/gallery/Version.php =================================================================== --- branches/DEV_1_6/gallery/Version.php 2006-07-13 00:03:56 UTC (rev 13958) +++ branches/DEV_1_6/gallery/Version.php 2006-07-13 02:23:24 UTC (rev 13959) @@ -22,7 +22,7 @@ ?> <?php -$gallery->version = '1.6-svn-b1-j83-UNSTABLE'; +$gallery->version = '1.6-svn-b1-j84-UNSTABLE'; $gallery->config_version = 97; $gallery->album_version = 38; $gallery->user_version = 6; Modified: branches/DEV_1_6/gallery/platform/fs_unix.php =================================================================== --- branches/DEV_1_6/gallery/platform/fs_unix.php 2006-07-13 00:03:56 UTC (rev 13958) +++ branches/DEV_1_6/gallery/platform/fs_unix.php 2006-07-13 02:23:24 UTC (rev 13959) @@ -167,4 +167,19 @@ return $result; } + +/** + * Is file hidden ? Means it starts with a . + * @param $filename string + * @return boolean + * @author Jens Tkotz <je...@pe...> +*/ +function fs_fileIsHidden($filename) { + if($filename{0} == '.') { + return true; + } + else { + return false; + } +} ?> Modified: branches/DEV_1_6/gallery/platform/fs_win32.php =================================================================== --- branches/DEV_1_6/gallery/platform/fs_win32.php 2006-07-13 00:03:56 UTC (rev 13958) +++ branches/DEV_1_6/gallery/platform/fs_win32.php 2006-07-13 02:23:24 UTC (rev 13959) @@ -2,17 +2,17 @@ /* * Gallery - a web based photo album viewer and editor * Copyright (C) 2000-2006 Bharat Mediratta - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. @@ -35,7 +35,7 @@ $result = copy(fs_import_filename($source, 0), fs_import_filename($dest, 0)); chmod (fs_import_filename($dest, 0), 0644); - return $result; + return $result; } function fs_file_exists($filename) { @@ -112,9 +112,9 @@ $oldname = fs_import_filename($oldname, 0); $newname = fs_import_filename($newname, 0); - /* - * It appears that win32 doesn't like it when you rename - * a file to end with ".dat.bak". Why? This is very + /* + * It appears that win32 doesn't like it when you rename + * a file to end with ".dat.bak". Why? This is very * annoying. */ $newname = str_replace(".dat.bak", ".bak", $newname); @@ -191,14 +191,13 @@ if (strstr($filename, " ")) { $filename = "\"$filename\""; } - } + } debug("Import after: $filename"); return $filename; } function fs_export_filename($filename) { - # Convert "d:\winnt\temp" to "d:/winnt/temp" # while (strstr($filename, "\\\\")) { @@ -210,13 +209,12 @@ } function fs_exec($cmd, &$results, &$status, $debugfile) { - // We can't redirect stderr with Windows. Hope that we won't need to. return exec($cmd, $results, $status); } function fs_tempdir() { - return export_filename($gallery->app->tmpDir); + return export_filename($gallery->app->tmpDir); } function fs_is_executable($filename) { @@ -228,4 +226,14 @@ print "<br>$msg<br>"; } } + +/** + * Files in windows cant start with a . + * @param $filename string + * @return boolean + * @author Jens Tkotz <je...@pe...> +*/ +function fs_fileIsHidden($filename) { + return false; +} ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |