Skip to content
Browse files

.jpeg -> .jpg;

  • Loading branch information...
1 parent dfe4a82 commit 7e59d0afa9c03499216404e236d498a02fd0cde5 tamlyn committed Mar 2, 2006
Showing with 6 additions and 5 deletions.
  1. +3 −3 includes/admin.class.php
  2. +3 −2 tools/cleanup.php
View
6 includes/admin.class.php
@@ -6,7 +6,7 @@
* @package singapore
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
* @copyright (c)2003-2005 Tamlyn Rhodes
- * @version $Id: admin.class.php,v 1.53 2006/02/06 18:47:57 tamlyn Exp $
+ * @version $Id: admin.class.php,v 1.54 2006/03/02 16:14:02 tamlyn Exp $
*/
define("SG_ADMIN", 1024);
@@ -1234,7 +1234,7 @@ function addImage()
else $image = basename($_REQUEST["sgFileName"]);
//make sure file has a recognised extension
- if(!preg_match("/\.(".$this->config->recognised_extensions.")$/i",$image)) $image .= ".jpeg";
+ if(!preg_match("/\.(".$this->config->recognised_extensions.")$/i",$image)) $image .= ".jpg";
$path = $this->config->pathto_galleries.$this->gallery->id."/".$image;
$srcImage = $image;
@@ -1332,7 +1332,7 @@ function addMultipleImages()
foreach($contents->files as $image) {
//make sure file has a recognised extension
- if(!preg_match("/\.(".$this->config->recognised_extensions.")$/i",$image)) $image .= ".jpeg";
+ if(!preg_match("/\.(".$this->config->recognised_extensions.")$/i",$image)) $image .= ".jpg";
$path = $this->config->pathto_galleries.$this->gallery->id."/".$image;
$srcImage = $image;
View
5 tools/cleanup.php
@@ -8,7 +8,7 @@
* @author Tamlyn Rhodes <tam at zenology dot co dot uk>
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
* @copyright (c)2004 Tamlyn Rhodes
- * @version $Id: cleanup.php,v 1.3 2005/10/02 03:35:24 tamlyn Exp $
+ * @version $Id: cleanup.php,v 1.4 2006/03/02 16:14:03 tamlyn Exp $
*/
/**
@@ -21,7 +21,8 @@ function makeWritable($dir)
if (is_dir($dir)) {
$d = dir($dir);
while (($file = $d->read()) !== false) {
- if ($file == '.' || $file == '..') continue;
+ //ignore current and parent dirs and php files
+ if ($file == '.' || $file == '..' || substr($file, strlen($file)-4)=='.php') continue;
$fullfile = $d->path . $file;
if(@chmod($fullfile,0777))
echo "Made $fullfile writable.<br />";

0 comments on commit 7e59d0a

Please sign in to comment.
Something went wrong with that request. Please try again.