Changeset 1172

Show
Ignore:
Timestamp:
10/02/06 11:00:24 (2 years ago)
Author:
jm3
Message:

prettier error handling and auto-email of admins on failed bookmarks file imports

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/import/do-random-checks.inc.php

    r1082 r1172  
    3434 
    3535        if( $num_dupes > $max_dupes_allowed ) { 
    36                 fatal( "We noticed that a percentage ($max_dupes_allowed links) of the links you're importing already exist in your Feed Me Links account. Have you imported this bookmarks file already? If not, please <a href='mailto:" . get_spamsafe_email() . "'>Contact Us</a> for help importing your favorites." ); 
     36                fatal( "We noticed that a large percentage ($max_dupes_allowed links) of the links you're importing already exist in your Feed Me Links account. Have you imported this bookmarks file already? If not, please <a href='mailto:" . get_spamsafe_email() . "'>Contact Us</a> for help importing your favorites." ); 
    3737                exit( 0 ); 
    3838        } # else 
  • feedmelinks/import/ready-to-import.php

    r1166 r1172  
    4646                                include_once( "present-clean-pre-flight-input.inc.php" ); 
    4747 
    48                         } else 
    49                                 fatal( "We found " . $ls . " links and " . $ts . " tags, which is more than we allow to be imported. Please email the administrators for help importing your sizeable links collection.<p />-- The Management" ); 
     48                        } 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 /> &nbsp; &nbsp;<a href='http://codeswami.com'>Code Swami</a>: Feed Me Links" ); 
     50 
     51                                # FIXME: missing mail call here. 
     52                                $headers = ""; 
     53 
     54                                $message = "user $u is trying to import $ls links and $ts tags, please help them."; 
     55                                $message = str_replace ( "\'", "'", $message); 
     56                                $headers .= "From: FML Link Import Request <" . getEmailAddressForUser( $u ) . ">\n"; 
     57                                $message .= "\n\n --\n\n$u: http://feedmelinks.com/u/$u"; 
     58                                $headers .= "X-Mailer: feedmelinks-mailer-daemon\n"; 
     59 
     60                                $success = mail( get_maintainer_email(), "$u would like to import $ls links & $ts tags", $message, $headers); 
     61                                if( $success ) 
     62                                        log_mesg_to( "sent overlarge import mail from $from to " . get_maintainer_email(), "mail" ); 
     63                        } 
    5064 
    5165                } else {