Show
Ignore:
Timestamp:
03/16/07 10:17:44 (2 years ago)
Author:
jm3
Message:

gulp. svn diff for the deltas

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks

    • Property svn:ignore changed from
      .htaccess
      cgi-bin
      cheat
      logs
      portal.php
      testing
      the-lost-urls
      utils.inc.php
      wall-of-ancients.php
      work
      *webalizer*
      _assets
      _profiling
      TODO
      info.php
      setup
      _comments
      local-remote-root
      .DS_Store
      flash
      _logs
      usage
      mint
      cgi-bin
      dev
      please
      usr
      blog
      xfer
      to
      .htaccess
      cgi-bin
      cheat
      logs
      portal.php
      testing
      the-lost-urls
      utils.inc.php
      wall-of-ancients.php
      work
      *webalizer*
      _assets
      _profiling
      TODO
      info.php
      setup
      _comments
      local-remote-root
      .DS_Store
      flash
      _logs
      usage
      mint
      cgi-bin
      dev
      please
      usr
      blog
      xfer
      _backups
  • feedmelinks/bin/add-link.pl

    r1402 r1425  
    2828my $tagName = "new"; 
    2929 
    30 open(LOG, ">>" . get_webserver_root() . "/_logs/mail.log") or die "can't open file"; 
     30open(LOG, ">>" . FeedMeLinks::Environment::get_webserver_root() . "/_logs/mail.log") or die "can't open file"; 
    3131print LOG "--- starting run ---\n" if( $verbose ); 
    3232 
     
    7878if( $headersDone && $title && $submitter && $link ) { 
    7979        print LOG "adding link to db\n" if( $verbose ); 
    80         my $dsn = "DBI:mysql:database=" . get_database_name() . ";host=localhost"; # FIXME: need to retrieve this from our config arrays... 
    81         my $dbh = DBI->connect($dsn, get_database_user(), get_database_password() ); 
     80        my $dsn = "DBI:mysql:database=" . FeedMeLinks::Environment::get_database_name() . ";host=localhost"; # FIXME: need to retrieve this from our config arrays... 
     81        my $dbh = DBI->connect($dsn, FeedMeLinks::Environment::get_database_user(), FeedMeLinks::Environment::get_database_password() ); 
    8282 
    8383        if( ! $dbh ) { 
     
    8686        } 
    8787 
    88         my $qs = "SELECT userid, password FROM linksUsers WHERE email = ? OR email = ? LIMIT 1"; 
     88        my $qs = "SELECT userid, password FROM users WHERE email = ? OR email = ? LIMIT 1"; 
    8989        my $sth = $dbh->prepare( $qs ); 
    9090 
     
    111111                        print LOG "$now [link-by-mail] $dbUser added $linkID\n"; 
    112112 
    113                         $qs = "SELECT ID FROM linksGroups WHERE name = ? AND userid = ? AND isPrivate IS NULL"; 
     113                        $qs = "SELECT ID FROM tags WHERE name = ? AND userid = ? AND isPrivate IS NULL"; 
    114114                        $sth = $dbh->prepare( $qs ); 
    115115                        $sth->execute( $tagName, $dbUser ); 
     
    118118                        if( ! $tagID ) { 
    119119                                print LOG "couldn't find a tag named $tagName; trying to insert it\n" if( $verbose ); 
    120                                 $qs = "INSERT INTO linksGroups VALUES( NULL, ?, ?, NULL, NULL)"; 
     120                                $qs = "INSERT INTO tags VALUES( NULL, ?, ?, NULL, NULL)"; 
    121121                                print LOG "SQL: $qs with $dbUser, $tagName\n" if( $verbose ); 
    122122                                $sth = $dbh->prepare( $qs ); 
     
    136136                        if( $tagID ) { 
    137137                                print LOG "found existing tag as ID $tagID\n" if( $verbose ); 
    138                                 $qs = "INSERT INTO linksCategoriesXRef VALUES( ?, ?)"; 
     138                                $qs = "INSERT INTO links_tags_xref VALUES( ?, ?)"; 
    139139                                $sth = $dbh->prepare( $qs ); 
    140140                                $sth->execute( $linkID, $tagID ); 
     
    163163print LOG "--- ending run ---\n\n" if( $verbose ); 
    164164close(LOG); 
    165  
    166 From root@raptor.webhostserver.biz Thu Mar 08 13:20:49 2007 
    167 Return-path: <root@raptor.webhostserver.biz> 
    168 Envelope-to: add@feedmelinks.com 
    169 Delivery-date: Thu, 08 Mar 2007 13:20:49 -0700 
    170 Received: from fml by raptor.webhostserver.biz with local-bsmtp (Exim 4.63) 
    171         (envelope-from <root@raptor.webhostserver.biz>) 
    172         id 1HPP6P-0007Ie-RH 
    173         for add@feedmelinks.com; Thu, 08 Mar 2007 13:20:45 -0700 
    174 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on 
    175         raptor.webhostserver.biz 
    176 X-Spam-Level:  
    177 X-Spam-Status: No, score=-0.0 required=5.0 tests=NO_RELAYS autolearn=ham 
    178         version=3.1.8 
    179 Received: from root by raptor.webhostserver.biz with local (Exim 4.63) 
    180         (envelope-from <root@raptor.webhostserver.biz>) 
    181         id 1HPP6O-0007IO-ND 
    182         for add@feedmelinks.com; Thu, 08 Mar 2007 13:20:41 -0700 
    183 To: add@feedmelinks.com 
    184 Subject: test 
    185 Message-Id: <E1HPP6O-0007IO-ND@raptor.webhostserver.biz> 
    186 From: root <root@raptor.webhostserver.biz> 
    187 Date: Thu, 08 Mar 2007 13:20:40 -0700 
    188  
    189 test support 
    190