Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update adaptive-images.php #85

Open
wants to merge 1 commit into from

1 participant

@iepathos

Added spacing to line 41, 80, 167, 179, 268, and 304
to maintain code style and enhance human readability.

@iepathos iepathos Update adaptive-images.php
Added spacing to line 41, 80, 167, 179, 268, 304
to maintain code style and enhance human readability.
3700ecd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 15, 2012
  1. @iepathos

    Update adaptive-images.php

    iepathos authored
    Added spacing to line 41, 80, 167, 179, 268, 304
    to maintain code style and enhance human readability.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −6 adaptive-images.php
View
12 adaptive-images.php
@@ -38,7 +38,7 @@ function is_mobile() {
}
/* Does the UA string indicate this is a mobile? */
-if(!is_mobile()){
+if (!is_mobile()) {
$is_mobile = FALSE;
} else {
$is_mobile = TRUE;
@@ -77,7 +77,7 @@ function sendErrorImage($message) {
$requested_file = basename($requested_uri);
$source_file = $document_root.$requested_uri;
- if(!is_mobile()){
+ if (!is_mobile()) {
$is_mobile = "FALSE";
} else {
$is_mobile = "TRUE";
@@ -164,7 +164,7 @@ function generateImage($source_file, $cache_file, $resolution) {
break;
}
- if($extension=='png'){
+ if ($extension=='png') {
imagealphablending($dst, false);
imagesavealpha($dst,true);
$transparent = imagecolorallocatealpha($dst, 255, 255, 255, 127);
@@ -176,7 +176,7 @@ function generateImage($source_file, $cache_file, $resolution) {
// sharpen the image?
// NOTE: requires PHP compiled with the bundled version of GD (see http://php.net/manual/en/function.imageconvolution.php)
- if($sharpen == TRUE && function_exists('imageconvolution')) {
+ if ($sharpen == TRUE && function_exists('imageconvolution')) {
$intSharpness = findSharp($width, $new_width);
$arrMatrix = array(
array(-1, -2, -1),
@@ -265,7 +265,7 @@ function generateImage($source_file, $cache_file, $resolution) {
$total_width = $client_width * $pixel_density; // required physical pixel width of the image
// the required image width is bigger than any existing value in $resolutions
- if($total_width > $resolutions[0]){
+ if ($total_width > $resolutions[0]) {
// firstly, fit the CSS size into a break point ignoring the multiplier
foreach ($resolutions as $break_point) { // filter down
if ($total_width <= $break_point) {
@@ -301,7 +301,7 @@ function generateImage($source_file, $cache_file, $resolution) {
}
/* if the requested URL starts with a slash, remove the slash */
-if(substr($requested_uri, 0,1) == "/") {
+if (substr($requested_uri, 0,1) == "/") {
$requested_uri = substr($requested_uri, 1);
}
Something went wrong with that request. Please try again.