Changeset 37772 for other-projects
- Timestamp:
- 2023-06-15T20:28:30+12:00 (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/crons-and-scripts/caveat-emptor/index.php
r32968 r37772 31 31 32 32 //chdir("/greenstone/greenstone.org/base/caveat-emptor"); 33 if ( $_GET['latest']) {33 if ( isset($_GET['latest']) ) { 34 34 chdir("/greenstone/greenstone.org/base/caveat-emptor/latest"); 35 35 } else { … … 40 40 $todayFiles = array(); 41 41 42 if ( $_GET['offset']) {42 if ( isset($_GET['offset'])) { 43 43 $todayStart = strtotime(date("Y-m-d",strtotime($_GET['offset'] . " days"))); 44 44 } else { … … 49 49 $today = date("Y.m.d", $todayStart); 50 50 $todayWithHyphens = date("Y-m-d", $todayStart); 51 52 51 $nextRelease2 = trim(file_get_contents("/greenstone/greenstone.org/base/next-release.txt")); 53 52 $nextRelease3 = trim(file_get_contents("/greenstone/greenstone.org/base/next-release-greenstone3.txt")); … … 56 55 if ( substr($file,0,1) == "." ) continue; 57 56 if ( $file === "index.php" ) continue; 58 if ( $_GET['latest'] ) { 57 if ( $file === "latest" ) continue; 58 if ( isset($_GET['latest']) ) { 59 59 $todayFiles[$file] = true; 60 60 continue; … … 105 105 } 106 106 107 function show( $file, $forceShow , $extra_info, $rename) {107 function show( $file, $forceShow = false, $extra_info = NULL, $rename = NULL ) { 108 108 global $todayFiles; 109 109 110 if ( $_GET['latest']) {110 if ( isset($_GET['latest']) ) { 111 111 //echo "XXX $file"; 112 112 … … 130 130 131 131 if ( file_exists($file) || $forceShow ) { 132 if ( $_GET['latest']) {132 if ( isset($_GET['latest']) ) { 133 133 134 134 $filepath="latest/".$file; … … 139 139 <tr> 140 140 <td><a href="<?php echo $filepath; ?>"><?php if($rename) { echo $rename; } else { echo $file; } ?></a><?php if($extra_info) { echo " - ".$extra_info; } ?></td> 141 <td><?php echo date("h:ia",filemtime($file));?></td>142 <td><?php echo formatBytes(filesize($file));?></td>141 <td><?php if (file_exists($file)) {echo date("h:ia",filemtime($file));} ?></td> 142 <td><?php if (file_exists($file)) {echo formatBytes(filesize($file));} ?></td> 143 143 </tr> 144 144 <?php … … 171 171 // in the latest folder, display the bin/src link for any available date 172 172 // (there should only be one) 173 if( $_GET['latest']) {173 if(isset($_GET['latest'])) { 174 174 $regex = preg_replace( "/\d{4}.\d{2}\.\d{2}/", "\d{4}.\d{2}.\d{2}", $regex ); 175 175 } … … 186 186 187 187 //show time machine 188 if ( $_GET['latest']) {188 if (isset($_GET['latest']) ) { 189 189 echo "latest "; 190 190 } else { … … 193 193 for ( $i=4; $i>=0; $i-- ) { 194 194 $d = date("Y-m-d",strtotime("-$i days")); 195 if ( $d == $todayWithHyphens && ! $_GET['latest']) {195 if ( $d == $todayWithHyphens && ! isset($_GET['latest'])) { 196 196 echo $d; 197 197 } else { … … 210 210 show("Greenstone-$nextRelease3-candidate-$today-windows.exe"); 211 211 showAllMatching("Greenstone-$nextRelease3-candidate-$today-MacOS-intel.dmg", 0, "for (Snow) Leopards (v10.5-10.6)", "Greenstone-$nextRelease3-candidate-$today-Leopard-MacOS-intel.dmg"); 212 show("Greenstone-$nextRelease3-candidate-$today-Lion-MacOS-intel.dmg", 0, "for (Mountain) Lions (v10.7-10.8)"); 212 //show("Greenstone-$nextRelease3-candidate-$today-Lion-MacOS-intel.dmg", 0, "for (Mountain) Lions (v10.7-10.8)"); 213 show("Greenstone-$nextRelease3-candidate-$today-Monterey-MacOS-intel.dmg", 0, "for Monterey (MacOS v12)"); 213 214 //this picks up similar releases of other version numbers lying around 214 215 showAllMatching("Greenstone-3\..*-candidate-$today-linux$"); 215 216 showAllMatching("Greenstone-3\..*-candidate-$today-windows.exe$"); 216 showAllMatching("Greenstone-3\..*-candidate-$today-MacOS-intel.dmg$", 0, "for (Snow) Leopards (v10.5-10.6)"); 217 showAllMatching("Greenstone-3\..*-candidate-$today-Lion-MacOS-intel.dmg$", 0, "for (Mountain) Lions (v10.7-10.8)"); 217 //showAllMatching("Greenstone-3\..*-candidate-$today-MacOS-intel.dmg$", 0, "for (Snow) Leopards (v10.5-10.6)"); 218 //showAllMatching("Greenstone-3\..*-candidate-$today-Lion-MacOS-intel.dmg$", 0, "for (Mountain) Lions (v10.7-10.8)"); 219 showAllMatching("Greenstone-3\..*-candidate-$today-Monterey-MacOS-intel.dmg$", 0, "for Monterey (MacOS v12)"); 218 220 gap(); 219 221 … … 230 232 show("Greenstone-$nextRelease2-candidate-$today-windows.exe"); 231 233 showAllMatching("Greenstone-$nextRelease2-candidate-$today-MacOS-intel.dmg", 0, "for (Snow) Leopards (v10.5-10.6)","Greenstone-$nextRelease2-candidate-$today-Leopard-MacOS-intel.dmg"); 232 show("Greenstone-$nextRelease2-candidate-$today-Lion-MacOS-intel.dmg", 0, "for (Mountain) Lions (v10.7-10.8)"); 234 //show("Greenstone-$nextRelease2-candidate-$today-Lion-MacOS-intel.dmg", 0, "for (Mountain) Lions (v10.7-10.8)"); 235 show("Greenstone-$nextRelease2-candidate-$today-Monterey-MacOS-intel.dmg", 0, "for Monterey (MacOS v12)"); 233 236 234 237 showAllMatching("Greenstone-2\..*-candidate-$today-linux$"); 235 238 showAllMatching("Greenstone-2\..*-candidate-$today-linux-x64$"); 236 239 showAllMatching("Greenstone-2\..*-candidate-$today-windows.exe$"); 237 showAllMatching("Greenstone-2\..*-candidate-$today-MacOS-intel.dmg$", 0, "for Snow Leopards (v10.5-10.6)"); 238 showAllMatching("Greenstone-2\..*-candidate-$today-Lion-MacOS-intel.dmg$", 0, "for (Mountain) Lions (v10.7-10.8)"); 240 //showAllMatching("Greenstone-2\..*-candidate-$today-MacOS-intel.dmg$", 0, "for Snow Leopards (v10.5-10.6)"); 241 //showAllMatching("Greenstone-2\..*-candidate-$today-Lion-MacOS-intel.dmg$", 0, "for (Mountain) Lions (v10.7-10.8)"); 242 showAllMatching("Greenstone-2\..*-candidate-$today-Monterey-MacOS-intel.dmg$", 0, "for Monterey (MacOS v12)"); 239 243 gap(); 240 244 … … 247 251 248 252 heading("Documented Examples" ); 249 show("Greenstone -documented-examples-$today.tar.gz");250 show("Greenstone -documented-examples-$today.zip");251 gap(); 252 253 if ( ! $_GET['latest']) {253 show("Greenstone3-documented-examples-$today.tar.gz"); 254 show("Greenstone3-documented-examples-$today.zip"); 255 gap(); 256 257 if ( !isset( $_GET['latest']) ) { 254 258 heading("Nightly Build Logs"); 255 259 showAllMatching("\.txt$"); … … 266 270 show("IsisGdl.bin32", 1,"","IsisGdl.linux32"); // temporary 267 271 show("IsisGdl.macleopard", 1); // temporary 272 show("IsisGdl.mac64mojave", 1); // temporary 268 273 gap(); 269 274
Note:
See TracChangeset
for help on using the changeset viewer.