Author: jfthomps
Date: Tue Mar 20 19:12:04 2012
New Revision: 1303101
URL: http://svn.apache.org/viewvc?rev=1303101&view=rev
Log:
VCL-520
Improving display control, on an detailed information of an image
modified newReservation and AJupdateWaitTime - changed preg_match to print
image description if it matches anything more than whitespace
modified connectRequest - changed preg_match to print image usage notes if it
matches anything more than whitespace
Modified:
incubator/vcl/trunk/web/.ht-inc/requests.php
Modified: incubator/vcl/trunk/web/.ht-inc/requests.php
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/requests.php?rev=1303101&r1=1303100&r2=1303101&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/requests.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/requests.php Tue Mar 20 19:12:04 2012
@@ -151,7 +151,7 @@ function newReservation() {
$imagenotes = getImageNotes($imageid);
$desc = '';
- if(preg_match('/\w/', $imagenotes['description'])) {
+ if(! preg_match('/^\s*$/', $imagenotes['description'])) {
$desc = preg_replace("/\n/", '<br>',
$imagenotes['description']);
$desc = preg_replace("/\r/", '', $desc);
$desc = "<strong>Image
Description</strong>:<br>\n$desc<br><br>\n";
@@ -270,7 +270,7 @@ function AJupdateWaitTime() {
$desconly = processInputVar('desconly', ARG_NUMERIC, 1);
$imagenotes = getImageNotes($imageid);
- if(preg_match('/\w/', $imagenotes['description'])) {
+ if(! preg_match('/^\s*$/', $imagenotes['description'])) {
$desc = preg_replace("/\n/", '<br>',
$imagenotes['description']);
$desc = preg_replace("/\r/", '', $desc);
$desc = preg_replace("/'/", ''', $desc);
@@ -3144,7 +3144,7 @@ function connectRequest() {
<a href=\"" . BASEURL . SCRIPT .
"?mode=imageClickThrough\">click-through agreement</a> about software
licensing.</big></font><br><br>\n";
}
$imagenotes = getImageNotes($requestData['reservations'][0]['imageid']);
- if(preg_match('/\w/', $imagenotes['usage'])) {
+ if(! preg_match('/^\s*$/', $imagenotes['usage'])) {
print "<h3>Notes on using this environment:</h3>\n";
print "{$imagenotes['usage']}<br><br><br>\n";
}