From: <gar...@us...> - 2003-07-08 12:05:23
|
Update of /cvsroot/php-blog/serendipity In directory sc8-pr-cvs1:/tmp/cvs-serv25754 Modified Files: serendipity_functions.inc.php Log Message: Code style, printf usage. Index: serendipity_functions.inc.php =================================================================== RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- serendipity_functions.inc.php 8 Jul 2003 09:13:27 -0000 1.99 +++ serendipity_functions.inc.php 8 Jul 2003 12:05:21 -0000 1.100 @@ -1484,14 +1484,14 @@ $checkfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $f[0] . '.' . $serendipity['thumbSuffix'] . '.' . $f[1]; if (!file_exists($checkfile) && ($fdim[0] > $serendipity['thumbSize'] || $fdim[1] > $serendipity['thumbSize'])) { - sprintf(RESIZE_BLAHBLAH, $files[$x] . ': ' . serendipity_makeThumbnail($files[$x])); + printf(RESIZE_BLAHBLAH, $files[$x] . ': ' . serendipity_makeThumbnail($files[$x])); $i++; } elseif (!file_exists($checkfile) && $fdim[0] < $serendipity['thumbSize'] && $fdim[1] < $serendipity['thumbSize']) { $res = copy ($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $files[$x], $checkfile); if ($res === true) { - sprintf(THUMBNAIL_USING_OWN . '<br />', $files[$x]); + printf(THUMBNAIL_USING_OWN . '<br />', $files[$x]); } else { - sprintf('<span style="color: #ff0000">' . THUMBNAIL_FAILED_COPY . '</span><br />', $files[$x]); + printf('<span style="color: #ff0000">' . THUMBNAIL_FAILED_COPY . '</span><br />', $files[$x]); } } } @@ -1857,10 +1857,10 @@ for($x=1; $x<13; $x++) { $entries = serendipity_postAmount($currYear, $x); if ($entries>0) { - $a = "<a href='{$serendipity['serendipityHTTPPath']}archives/$currYear".sprintf("%02s",$x).".html'>"; - $b = "</a>"; - $c = "<a href='{$serendipity['serendipityHTTPPath']}archives/$currYear".sprintf("%02s",$x)."_short.html'>"; - $d = "<a href='{$serendipity['serendipityHTTPPath']}archives/$currYear".sprintf("%02s",$x).".html'>"; + $a = "<a href='{$serendipity['serendipityHTTPPath']}archives/$currYear" . sprintf('%02s', $x) . '.html\'>'; + $b = '</a>'; + $c = "<a href='{$serendipity['serendipityHTTPPath']}archives/$currYear" . sprintf('%02s', $x) . '_short.html\'>'; + $d = "<a href='{$serendipity['serendipityHTTPPath']}archives/$currYear" . sprintf('%02s', $x) . '.html\'>'; } else { $a = $c = '<span style="color: #CDCDCD">'; $b = $d = '</span>'; |