Changeset 1184
- Timestamp:
- 10/24/06 13:10:44 (2 years ago)
- Files:
-
- feedmelinks/import/do-random-checks.inc.php (modified) (1 diff)
- feedmelinks/import/ready-to-import.php (modified) (5 diffs)
- feedmelinks/misc/forgot-password.php (modified) (3 diffs)
- feedmelinks/modules/highest-linking-users.inc.php (modified) (1 diff)
- feedmelinks/modules/utils.inc.php (modified) (2 diffs)
- feedmelinks/modules/view-link.inc.php (modified) (1 diff)
- feedmelinks/portal-uncached.php (modified) (1 diff)
- feedmelinks/users.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/import/do-random-checks.inc.php
r1172 r1184 1 1 <% 2 # 3. randomly sample (both contiguous run and scatter) the links to 3 # check 4 uniqueness against other links in the imported bookmarks4 # file as well as uniqueness against the users existing FML links5 # (to detect possible linkspammers)2 # 3. randomly sample (both contiguous run and scatter) the links to: 3 # 4 # * check 4 uniqueness against other links in the imported bookmarks 5 # * check for uniqueness against the users existing FML links 6 6 7 7 $p = 10; # % feedmelinks/import/ready-to-import.php
r1175 r1184 16 16 $dir = $b["dir"]; 17 17 $path = $b["path"]; 18 18 19 19 $max_allowed_links = 1000; 20 $max_allowed_tags = 500; 20 $max_allowed_tags = 300; 21 $max_tags_to_links_ratio = 0.3; 21 22 22 23 $parser = get_xsl_parser(); … … 27 28 $result = exec( $cmd ); 28 29 if( preg_match( "/SUCCESS/", $result )) { 29 30 30 # extract whatever delimeter the perl used from the result XML: 31 31 $delimeter = preg_replace( '/^[^"]+"([^"]+).*/', "\${1}", $result ); … … 36 36 $ls = sizeof( $links ); 37 37 $ts = sizeof( $tags ); 38 39 if( ($ls < $max_allowed_links && $ts < $max_allowed_tags) || is_privileged_importer( $u ) ) { 38 39 if( 40 ( 41 $ls < $max_allowed_links 42 && $ts < $max_allowed_tags 43 && ($max_allowed_tags / $max_allowed_links) < $max_tags_to_links_ratio 44 ) 45 || is_privileged_importer( $u ) ) 46 { 47 40 48 #tell( "Debugging Check:", "We found " . $ls . " links and " . $ts . " tags, which is allowed. Proceeding." ); 41 49 … … 47 55 48 56 } else { 49 fatal( "Wow! You have a very nice collection of links. Because you have approximately " . $ls . " links and " . $ts . " tags, which is more than the average user,your import has bene 'flagged for review' by our team to make sure everything is imported correctly. A notice has been sent to the team and they will be in contact with you shortly to finish the import process. <p />Thanks very much,<p /> -- <a href='http://jm3.net/'><b>John Manoogian III</b></a><br /> <a href='http://codeswami.com'>Code Swami</a>: Feed Me Links" );57 fatal( "Wow! You have a very nice collection of links. Because you have approximately " . $ls . " links and " . $ts . " tags, your import has bene 'flagged for review' by our team to make sure everything is imported correctly. A notice has been sent to the team and they will be in contact with you shortly to finish the import process. <p />Thanks very much,<p /> -- <a href='http://jm3.net/'><b>John Manoogian III</b></a><br /> <a href='http://codeswami.com'>Code Swami</a>: Feed Me Links" ); 50 58 51 # FIXME: missing mail call here.52 59 $headers = ""; 53 60 … … 65 72 } else { 66 73 fatal( "$result : couldn't parse result of $bin/import-bookmarks.pl $dir/$file_name" ); 67 }74 } 68 75 69 76 include_once( "$modules/footer.inc.php" ); feedmelinks/misc/forgot-password.php
r927 r1184 7 7 $messages = ""; 8 8 9 if( $userId || $email) {9 if( ($userId || $email) && !snuffed( $userId )) { 10 10 mysql_connect(); 11 11 mysql_selectdb( getDBName() ); 12 12 13 13 if( $userId ) { 14 14 # check for id … … 42 42 $mailSuccess = mail( $email, $subject, $body, $headers); 43 43 #echo "mailSuccessL $mailSuccess<br />"; 44 log_mesg_to( "sent password reminder to $email ($userId)", "mail" ); 44 45 45 46 $messages = "emailing your password to " . ( $userId ? "$userId's email address" : $email ) . "...<br /><h2>Email sent!</h2>"; … … 48 49 $messages = "That $label was not found. Please check your spelling<br />(and make sure that you still exist.)"; 49 50 } 50 51 51 } 52 52 %> 53 53 54 <title> Feed Me My Password, Dammit! </title>54 <title> Feed Me My Password, please! </title> 55 55 56 56 <% if( $messages ) { %> feedmelinks/modules/highest-linking-users.inc.php
r395 r1184 3 3 4 4 $limit = $limit ? $limit : 7; 5 $qs = "SELECT COUNT(*) AS lc, submitter AS u FROM links GROUP BY submitter ORDER BY lc DESC LIMIT $limit;";5 $qs = "SELECT COUNT(*) AS lc, submitter AS u FROM links WHERE isPrivate IS NULL GROUP BY submitter ORDER BY lc DESC LIMIT $limit;"; 6 6 7 7 $con = mysql_connect(); feedmelinks/modules/utils.inc.php
r1178 r1184 2406 2406 } 2407 2407 2408 # this depends on the next being a closure: function is_banned( $u, $mesg ) { } 2409 2408 2410 function addUser( $argUserId, $argEmail, $argPassword, $argName ) { 2409 2411 … … 2411 2413 $ip = get_ip(); 2412 2414 $q = run_query( getQuery( "multiple_accounts_from_this_ip", $ip )); 2413 2414 2415 $num_rows = mysql_num_rows($q); 2415 2416 if( $num_rows > 1 ) { 2416 fire( "Possible spammer-birth in progress!", "Multiple accounts being requested from the same IP ($ip) -- user: $argUserId, $argEmail" );2417 fire( "Possible spammer-birth in progress!", "Multiple accounts being requested from the same IP ($ip) -- user: http://feedmelinks.com/u/$argUserId, $argEmail" ); 2417 2418 log_mesg_to( "WARN. potential spammer $argUserId ($argEmail) creating multiple accounts from the same IP", "global" ); 2418 2419 $q = run_query( getQuery( "log_ip", $argUserId, $argEmail, $ip )); 2419 2420 return; 2420 } else { 2421 # if not, log this IP in case we see it again: 2421 } else { # if not, log this IP in case we see it again: 2422 2422 $q = run_query( getQuery( "log_ip", $argUserId, $argEmail, $ip )); 2423 2423 } feedmelinks/modules/view-link.inc.php
r1177 r1184 98 98 </div> 99 99 100 <% if( getNumSimilarUrls( $link, $l )) { %>101 102 <div class="linkbox" style="border: 1px solid #bbbbbb; margin-top: 5px;">103 <%= getSimilarlyLinkingUsers( $link, $l, 5 ) %><br />104 </div>105 106 <% } %>107 108 100 <div class="linkbox" style="border: 1px solid #bbbbbb; margin-top: 5px;"> 109 101 <a accesskey="f" href="/search?q=<%= urlencode( str_replace ( " ", "%", $name) ) %>"><img src="/img/mag-glass.png" height="20" feedmelinks/portal-uncached.php
r1170 r1184 234 234 </div> 235 235 236 < div id="newUsers" class="box">236 <!-- <div id="newUsers" class="box"> 237 237 <div class="subhead"> 238 238 new users 239 239 <span class="note">(with at least 2 links)</span> 240 240 </div> 241 <% include_once( "$modules/recent-users.inc.php"); %> 242 </div> 241 disabled for now 242 <% #include_once( "$modules/recent-users.inc.php"); %> 243 </div> 244 --> 243 245 244 246 <div id="hallOfFame" class="box"> feedmelinks/users.php
r1182 r1184 114 114 <form name="snuff_user_form" action="/admin/snuff" method="POST"> 115 115 <input type="hidden" name="user" value="<%= $userId %>" /> 116 <input type="submit" style="background-color: firebrick;" value="End this user's pathetic life?" />116 <input type="submit" style="background-color: pink;" value="End this user's pathetic life?" /> 117 117 </form> 118 118 </p>