[100018] trunk/www
ryandesign at macports.org
ryandesign at macports.org
Sat Nov 24 00:57:57 PST 2012
Revision: 100018
https://trac.macports.org/changeset/100018
Author: ryandesign at macports.org
Date: 2012-11-24 00:57:57 -0800 (Sat, 24 Nov 2012)
Log Message:
-----------
remove use of deprecated POSIX regex (ereg*) functions in favor of PCRE regex (preg*) functions (#22281)
Modified Paths:
--------------
trunk/www/localized/es/downloads/index.php
trunk/www/localized/es/ports.php
trunk/www/localized/fr/downloads/index.php
trunk/www/localized/fr/ports.php
trunk/www/localized/it/downloads/index.php
trunk/www/localized/it/ports.php
trunk/www/localized/ru/ports.php
trunk/www/ports.php
Modified: trunk/www/localized/es/downloads/index.php
===================================================================
--- trunk/www/localized/es/downloads/index.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/localized/es/downloads/index.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -14,7 +14,7 @@
$rep=opendir($chemin);
chdir($chemin);
while($file = readdir($rep)) {
- if($file != '..' && $file !='.' && (!eregi('php$', $file))) {
+ if($file != '..' && $file !='.' && (!preg_match('/\.php$/i', $file))) {
if(!is_dir($file)) {
echo "<a href=\"/downloads/$file\">$file</a>";
echo "<br>";
Modified: trunk/www/localized/es/ports.php
===================================================================
--- trunk/www/localized/es/ports.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/localized/es/ports.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -178,7 +178,7 @@
<?
while ( $nrow = mysql_fetch_array($nresult) ) {
// lib:libpng.3:libpng -> libpng
- $library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+ $library = preg_replace("/^(?:[^:]*:){1,2}/", "", $nrow[0]);
?>
<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
<?
Modified: trunk/www/localized/fr/downloads/index.php
===================================================================
--- trunk/www/localized/fr/downloads/index.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/localized/fr/downloads/index.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -14,7 +14,7 @@
$rep=opendir($chemin);
chdir($chemin);
while($file = readdir($rep)) {
- if($file != '..' && $file !='.' && (!eregi('php$', $file))) {
+ if($file != '..' && $file !='.' && (!preg_match('/\.php$/i', $file))) {
if(!is_dir($file)) {
echo "<a href=\"/downloads/$file\">$file</a>";
echo "<br>";
Modified: trunk/www/localized/fr/ports.php
===================================================================
--- trunk/www/localized/fr/ports.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/localized/fr/ports.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -178,7 +178,7 @@
<?
while ( $nrow = mysql_fetch_array($nresult) ) {
// lib:libpng.3:libpng -> libpng
- $library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+ $library = preg_replace("/^(?:[^:]*:){1,2}/", "", $nrow[0]);
?>
<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
<?
Modified: trunk/www/localized/it/downloads/index.php
===================================================================
--- trunk/www/localized/it/downloads/index.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/localized/it/downloads/index.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -14,7 +14,7 @@
$rep=opendir($chemin);
chdir($chemin);
while($file = readdir($rep)) {
- if($file != '..' && $file !='.' && (!eregi('php$', $file))) {
+ if($file != '..' && $file !='.' && (!preg_match('/\.php$/i', $file))) {
if(!is_dir($file)) {
echo "<a href=\"/downloads/$file\">$file</a>";
echo "<br>";
Modified: trunk/www/localized/it/ports.php
===================================================================
--- trunk/www/localized/it/ports.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/localized/it/ports.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -179,7 +179,7 @@
<?
while ( $nrow = mysql_fetch_array($nresult) ) {
// lib:libpng.3:libpng -> libpng
- $library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+ $library = preg_replace("/^(?:[^:]*:){1,2}/", "", $nrow[0]);
?>
<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
<?
Modified: trunk/www/localized/ru/ports.php
===================================================================
--- trunk/www/localized/ru/ports.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/localized/ru/ports.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -177,7 +177,7 @@
<?
while ( $nrow = mysql_fetch_array($nresult) ) {
// lib:libpng.3:libpng -> libpng
- $library = eregi_replace("^([^:]*:[^:]*:|[^:]*:)", "", $nrow[0]);
+ $library = preg_replace("/^(?:[^:]*:){1,2}/", "", $nrow[0]);
?>
<a href="<?= $PHP_SELF; ?>?by=library&substr=<?= $library; ?>"><?= $library; ?></a>
<?
Modified: trunk/www/ports.php
===================================================================
--- trunk/www/ports.php 2012-11-24 08:50:18 UTC (rev 100017)
+++ trunk/www/ports.php 2012-11-24 08:57:57 UTC (rev 100018)
@@ -243,7 +243,7 @@
if ($nresult && mysql_num_rows($nresult) > 0) {
print '<br /><i>Dependencies:</i> ';
while ($nrow = mysql_fetch_row($nresult)) {
- $library = eregi_replace('^([^:]*:[^:]*:|[^:]*:)', '', $nrow[0]);
+ $library = preg_replace('/^(?:[^:]*:){1,2}/', '', $nrow[0]);
print "<a href=\"$_SERVER[PHP_SELF]?by=library&substr=" . urlencode($library) . '">'
. htmlspecialchars($library) . '</a> ';
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121124/601062da/attachment.html>
More information about the macports-changes
mailing list