cvs: php-master-web /manage mirrors.php

From: Date: Sun, 05 Jan 2003 12:12:39 +0000
Subject: cvs: php-master-web /manage mirrors.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14735@lists.php.net to get a copy of this message
goba Sun Jan 5 07:12:39 2003 EDT Modified files: /php-master-web/manage mirrors.php Log: Move has_search out of the editable territory, and to the information table. Now local search information is updated from the mirrors local data, and needs no administration. Also send a notification mail to php-mirrors when a new mirror is added. Introduce the third type of local search for mirrors which need to be informed that their search setup is not actual. This type can be removed if no mirrors have this type of search anymore. Index: php-master-web/manage/mirrors.php diff -u php-master-web/manage/mirrors.php:1.22 php-master-web/manage/mirrors.php:1.23 --- php-master-web/manage/mirrors.php:1.22 Thu Jan 2 12:32:50 2003 +++ php-master-web/manage/mirrors.php Sun Jan 5 07:12:38 2003 @@ -13,7 +13,6 @@ // Get boolean values from form $active = isset($active) ? 1 : 0; -$has_search = isset($has_search) ? 1 : 0; $has_stats = isset($has_stats) ? 1 : 0; // We have something to update in the database @@ -31,7 +30,7 @@ "mirrortype=$mirrortype, cname='$cname', maintainer='$maintainer', " . "providername='$providername', providerurl='$providerurl', " . "cc='$cc', lang='$lang', has_stats=$has_stats, " . - "has_search=$has_search, lastedited=NOW() WHERE id = $id"; + "lastedited=NOW() WHERE id = $id"; $msg = "$hostname updated"; break; @@ -45,10 +44,10 @@ case "insert": $query = "INSERT INTO mirrors (hostname, active, mirrortype, " . "cname, maintainer, providername, providerurl, cc, " . - "lang, has_stats, has_search, created, lastedited) " . + "lang, has_stats, created, lastedited) " . "VALUES ('$hostname', $active, $mirrortype, '$cname', " . "'$maintainer', '$providername', '$providerurl', '$cc', " . - "'$lang', $has_stats, $has_search, NOW(), NOW())"; + "'$lang', $has_stats, NOW(), NOW())"; $msg = "$hostname added"; break; } @@ -68,8 +67,8 @@ // In case a of a mirror is deleted, mail a notice to the // php-mirrors list, so any malicios deletions can be tracked - if ($mode == "delete") { - $body = "The mirrors list was updated, and $hostname was deleted."; + if ($mode == "delete" || $mode == "insert") { + $body = "The mirrors list was updated, and $hostname was " . ($mode == "delete" ? "deleted." : "added."); @mail( "php-mirrors@lists.php.net", "PHP Mirrors Updated by $user.", @@ -104,6 +103,13 @@ ); } + // Local search type displays + $searchtypes = array( + '0' => 'Not supported', + '1' => 'Supported', + '2' => 'Supported (old method)' + ); + // Print out mirror data table with or without values ?> <form method="POST" action="<?php echo $PHP_SELF; ?>"> @@ -150,10 +156,6 @@ <th align="right">Local Stats</th> <td><input type="checkbox" name="has_stats"<?php echo $row['has_stats'] ? " checked" : ""; ?> /></td> <tr> - <th align="right">Local Search</th> - <td><input type="checkbox" name="has_search"<?php echo $row['has_search'] ? " checked" : ""; ?> /></td> - </tr> - <tr> <td colspan="2" align="center"><input type="submit" value="<?php echo $id ? "Change" : "Add"; ?>" /> </tr> </table> @@ -182,6 +184,10 @@ <tr> <th>PHP version used:</th> <td><?php print_version($row['phpversion']); ?></td> + </tr> + <tr> + <th>Local Search</th> + <td><?php echo $searchtypes[$row['has_search']]; ?></td> </tr> </table> <?php } else { echo "&nbsp;"; } ?>

« previous php.mirrors (#14735) next »