Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Fixed issue with 127.0.0.1 and localhost piling up in node list.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Jan 14, 2011
1 parent 5bac949 commit cdecf85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hooks/quicksocial/quicksocial.php
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,9 @@ public function _StoreNodeNetwork ( $pSource, $pMethods, $pDescription, $pVersio
// Add the trusted nodes.
foreach ( $pTrusted as $t => $trusted ) {
if ( strtolower ( $trusted ) == strtolower ( QUICKSOCIAL_DOMAIN ) ) continue;
if ( strtolower ( $trusted ) == 'localhost' ) continue;
if ( strtolower ( $trusted ) == '127.0.0.1' ) continue;

// Update the recieved information
if ( !in_array ( strtolower ( $trusted ), $NodeNetwork ) ) {
$model->Destroy ( 'Node_PK' );
Expand Down Expand Up @@ -1290,6 +1293,8 @@ public function _StoreNodeNetwork ( $pSource, $pMethods, $pDescription, $pVersio
// Add the discovered nodes.
foreach ( $pDiscovered as $d => $discovered ) {
if ( strtolower ( $discovered ) == strtolower ( QUICKSOCIAL_DOMAIN ) ) continue;
if ( strtolower ( $discovered ) == 'localhost' ) continue;
if ( strtolower ( $discovered ) == '127.0.0.1' ) continue;
// Update the recieved information
if ( !in_array ( strtolower ( $discovered ), $NodeNetwork ) ) {
$model->Destroy ( 'Node_PK' );
Expand All @@ -1315,6 +1320,9 @@ public function _StoreNodeNetwork ( $pSource, $pMethods, $pDescription, $pVersio
// Add the blocked nodes.
foreach ( $pBlocked as $b => $blocked ) {
if ( strtolower ( $blocked ) == strtolower ( QUICKSOCIAL_DOMAIN ) ) continue;
if ( strtolower ( $blocked ) == 'localhost' ) continue;
if ( strtolower ( $blocked ) == '127.0.0.1' ) continue;

// Update the recieved information
if ( in_array ( strtolower ( $blocked ), $NodeNetwork ) ) {
$model->Retrieve ( array ( 'Domain' => $blocked ) );
Expand Down

0 comments on commit cdecf85

Please sign in to comment.