Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9112
Modified Files:
compat.php serendipity_admin_images.inc.php
serendipity_config.inc.php
serendipity_functions_images.inc.php
Log Message:
list="`find . -name \*.php`"
list="$list `find . -name \*.txt`"
perl -i -pe 's=^M==g' $list
cvs tag pre-control-m-removal
cvs commit
cvs tag post-control-m-removal
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- serendipity_config.inc.php 22 Mar 2004 07:52:14 -0000 1.60
+++ serendipity_config.inc.php 3 Apr 2004 17:36:16 -0000 1.61
@@ -81,12 +81,12 @@
* Make sure that the file included is in the current directory and not any possible
* include path
*/
-if (file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php')) {
- include_once($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php');
-} elseif (file_exists($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php')) {
- include_once($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php');
-} else {
- include_once(S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php');
+if (file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php')) {
+ include_once($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php');
+} elseif (file_exists($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php')) {
+ include_once($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php');
+} else {
+ include_once(S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php');
}
/*
Index: serendipity_functions_images.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions_images.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- serendipity_functions_images.inc.php 21 Mar 2004 16:35:32 -0000 1.7
+++ serendipity_functions_images.inc.php 3 Apr 2004 17:36:16 -0000 1.8
@@ -305,21 +305,21 @@
if (is_null($newheight)) {
// calculate aspect ratio
- $div_width = $width / $newwidth;
- $div_height = $height / $newwidth;
+ $div_width = $width / $newwidth;
+ $div_height = $height / $newwidth;
- if ($div_width <= 1 && $div_height <= 1) {
- // do not scale small images
- $newheight = $width;
- $newwidth = $height;
- } elseif ($div_width >= $div_height) {
- // max width - calculate height, keep width as scaling base
- $newheight = round($height / $div_width);
- } else {
- // max height - calculate width, keep height as scaling base
- $newheight = $newwidth;
- $newwidth = round($width / $div_height);
- }
+ if ($div_width <= 1 && $div_height <= 1) {
+ // do not scale small images
+ $newheight = $width;
+ $newwidth = $height;
+ } elseif ($div_width >= $div_height) {
+ // max width - calculate height, keep width as scaling base
+ $newheight = round($height / $div_width);
+ } else {
+ // max height - calculate width, keep height as scaling base
+ $newheight = $newwidth;
+ $newwidth = round($width / $div_height);
+ }
}
$out = imagecreatetruecolor($newwidth, $newheight);
Index: compat.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/compat.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- compat.php 21 Mar 2004 16:35:31 -0000 1.13
+++ compat.php 3 Apr 2004 17:36:16 -0000 1.14
@@ -1,17 +1,17 @@
<?php # $Id$
if (!function_exists('file_get_contents')) {
- function file_get_contents($filename, $use_include_path = 0) {
+ function file_get_contents($filename, $use_include_path = 0) {
$file = fopen($filename, 'rb', $use_include_path);
- $data = '';
- if ($file) {
- while (!feof($file)) {
- $data .= fread($file, 4096);
- }
- fclose($file);
- }
+ $data = '';
+ if ($file) {
+ while (!feof($file)) {
+ $data .= fread($file, 4096);
+ }
+ fclose($file);
+ }
- return $data;
+ return $data;
}
}
Index: serendipity_admin_images.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_images.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- serendipity_admin_images.inc.php 22 Mar 2004 15:19:25 -0000 1.19
+++ serendipity_admin_images.inc.php 3 Apr 2004 17:36:16 -0000 1.20
@@ -157,7 +157,7 @@
<script type="text/javascript">
function getfilename(field, value) {
- re = /^.+[\/\\]+?(.+)$/;
+ re = /^.+[\/\\]+?(.+)$/;
document.getElementById(field).value = value.replace(re, "$1");
}
</script>
|