Permalink
Browse files

Fixed dbplugins

  • Loading branch information...
1 parent 5ee367d commit 26b68c5d087ac001be130a53b9ca56f10a3c9da7 @riemers committed Apr 22, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 dbplugins.php
View
@@ -93,7 +93,7 @@ function dbcompare() {
} else { echo '<br/><b>-- No plugins are outdated, your a champ!</b><br/>'; }
}
- function doplugin($threadid,$args) {
+ function doplugin($threadid,$filename,$args) {
$html = file_get_contents("http://forums.alliedmods.net/showthread.php?t=$threadid&postcount=1");
@@ -124,7 +124,8 @@ function doplugin($threadid,$args) {
if ($url) {
echo "HIT -> $url[2]\n";
}
- $result = mysql_query( "INSERT INTO plugindb (pluginid,threadid,description,version) VALUES('$url[0]','$threadid','$description','$url[1]') ON DUPLICATE KEY UPDATE description='$description',version='$url[1]'") or die(mysql_error());
+ echo "$url";
+ $result = mysql_query( "INSERT INTO plugindb (pluginid,threadid,filename,description,version) VALUES('$url[0]','$threadid','$filename','$description','$url[1]') ON DUPLICATE KEY UPDATE description='$description',version='$url[1]'") or die(mysql_error());
}
function threadmatch() {
@@ -156,7 +157,7 @@ function threadmatch() {
$result = mysql_query( "select distinct threadid from mods where threadid != 'NULL' and threadid != '0'" ) or die(mysql_error());
while( $row = mysql_fetch_array( $result ) ) {
echo "Updating " . $row['threadid'] . "... ";
- doplugin($row['threadid'],$args);
+ doplugin($row['threadid'],$row['filename'],$args);
}
dbcompare();
}

0 comments on commit 26b68c5

Please sign in to comment.