Changeset 1325
- Timestamp:
- 02/07/07 13:21:37 (2 years ago)
- Files:
-
- feedmelinks/.t (modified) (2 diffs)
- feedmelinks/_config/parse-config.xsl (modified) (1 diff)
- feedmelinks/_config/servers-template.xml (modified) (2 diffs)
- feedmelinks/bin/add-link.pl (modified) (3 diffs)
- feedmelinks/bin/configure.sh (modified) (1 diff)
- feedmelinks/bin/create-ddl.sh (modified) (1 diff)
- feedmelinks/bin/heuristics.sh (modified) (2 diffs)
- feedmelinks/bin/snuff-these-users.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/.t
r395 r1325 1 < %1 <?php 2 2 include_once( "modules/utils.inc.php" ); 3 3 include( "$modules/header.insecure.inc.php" ); 4 5 $tok = $_COOKIE["c_pass_token"];6 $u = $_COOKIE["c_uid"];7 $sessionUserId = $u;8 4 9 5 if( $tok && $tok == md5( getPasswdForUser( $u ))) { … … 22 18 23 19 conClose( $con_pageName ); 24 %>20 ?> 25 21 26 22 27 23 28 < % } %>24 <?php } ?> feedmelinks/_config/parse-config.xsl
r1314 r1325 46 46 <xsl:for-each select="/servers/server[@name=$server-name]/@*"> 47 47 sub get_<xsl:value-of select="translate(name(.), '-', '_')" /> { 48 return "<xsl:value-of select="." />";48 return '<xsl:value-of select="." />'; 49 49 } 50 50 </xsl:for-each> feedmelinks/_config/servers-template.xml
r1323 r1325 18 18 webserver-root="/path/to/your/webserver/root" 19 19 database-name="db_name" 20 database-user="db_username" 21 database-password="db_password" 20 22 maintainer-email="you@whatevs.obvs.com" 21 23 spamsafe-email=" @&encoded-somehow.com" … … 37 39 webserver-root="/home/whatever/your/name/here/www/" 38 40 database-name="db_name" 41 database-user="db_username" 42 database-password="db_password" 39 43 maintainer-email="your-email@your-domain.com" 40 44 spamsafe-email="somehow-obscured@domain.com" feedmelinks/bin/add-link.pl
r1084 r1325 1 1 #!/usr/local/bin/perl 2 use FeedMeLinks::Environment; 2 3 use strict; 3 4 # takes an email as stdin, "authenticates" the sender against … … 24 25 my $tagName = "new"; 25 26 26 open(LOG, ">> /home/fml/public_html/_logs/mail.log") or die "can't open file";27 open(LOG, ">>" . get_webserver_root() . "/_logs/mail.log") or die "can't open file"; 27 28 print LOG "--- starting run ---\n" if( $verbose ); 28 29 … … 74 75 if( $headersDone && $title && $submitter && $link ) { 75 76 print LOG "adding link to db\n" if( $verbose ); 76 my $dsn = "DBI:mysql:database= fml_fml;host=localhost"; # FIXME: need to retrieve this from our config arrays...77 my $dbh = DBI->connect($dsn, "fml_fml", "fml");77 my $dsn = "DBI:mysql:database=" . get_database_name() . ";host=localhost"; # FIXME: need to retrieve this from our config arrays... 78 my $dbh = DBI->connect($dsn, get_database_user(), get_database_password() ); 78 79 79 80 if( ! $dbh ) { feedmelinks/bin/configure.sh
r1314 r1325 15 15 xml="_config/servers.xml" 16 16 sp="stringparam" 17 18 if [ ! -d "_config" ]; 19 then 20 echo "Please run configure.sh from within your feedmelinks svn checkout directory." 21 exit 1 22 fi 23 24 if [ ! -f "$xml" ]; 25 then 26 echo "First, copy servers-template.xml to servers.xml (in the _config) folder, and fill in the values for your database and server paths" 27 exit 1 28 fi 17 29 18 30 root=`xsltproc --$sp server-name $s --$sp mode atom --$sp atom webserver-root $xsl $xml` feedmelinks/bin/create-ddl.sh
r1185 r1325 1 1 #!/bin/sh 2 2 3 # export the table structure of the DB 3 . env.sh # read in environment config vars 4 4 5 mysqldump -u fml_fml -pfml fml_fml --no-data 5 # export the table structure of the whole DB 6 mysqldump -u `get_database_user` -p`get_database_password` `get_database_name` --no-data 6 7 feedmelinks/bin/heuristics.sh
r1310 r1325 1 1 #!/bin/sh 2 2 # TODO: check for minima before building indices 3 4 . env.sh 3 5 4 6 if [ "$#" -lt 2 ] … … 44 46 45 47 # db auth: 46 u= fml_fml47 db= fml_fml48 p= fml48 u=`get_database_user` 49 db=`get_database_name` 50 p=`get_database_password` 49 51 50 52 for USER in $USERS feedmelinks/bin/snuff-these-users.sh
r1310 r1325 1 1 #!/bin/sh 2 # TODO: check for minima before building indices 2 # snuff a list of users passed in on the command line 3 # FIXME: REMEMBER that this does NOT privatize all their links, tags, etc. -- currently, only snuffing via php does that. 4 5 . env.sh # read in environment config vars 3 6 4 7 if [ "$#" -lt 1 ] … … 12 15 for user in $USERS 13 16 do 14 mysql -u fml_fml -pfml fml_fml-B -e "update linksUsers set snuffed = 1 where linksUsers.userid = '$user';"15 mysql -u fml_fml -pfml fml_fml-B -e "update linksUsers set disabled = 1 where linksUsers.userid = '$user';"17 mysql -u `get_database_user` -p`get_database_password` `get_database_name` -B -e "update linksUsers set snuffed = 1 where linksUsers.userid = '$user';" 18 mysql -u `get_database_user` -p`get_database_password` `get_database_name` -B -e "update linksUsers set disabled = 1 where linksUsers.userid = '$user';" 16 19 done 17 20 21 exit 0 22