Skip to content

Commit

Permalink
.htaccess fix, mysql fix
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Feb 9, 2009
1 parent 0a6ef63 commit 6704ee5
Show file tree
Hide file tree
Showing 92 changed files with 15,161 additions and 1 deletion.
100 changes: 100 additions & 0 deletions app/notifixious/models/notifix.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php


after_filter( 'broadcast_notifixious_notice', 'insert_from_post' );

function broadcast_notifixious_notice( &$model, &$rec ) {

$notifixkey = '';

$login = 'brianjesse';
$pass = '';
$notifixurl = 'notifixio.us';

if (!(isset($rec->title)))
return;

if (!get_profile_id())
return;

$installed = environment( 'installed' );

if ( !in_array( 'notifixious', $installed ))
return;

if (!(class_exists('Services_JSON')))
lib_include( 'json' );

$url = "http://".$notifixurl."/sources/find.json";
$params = "url=".urlencode(get_bloginfo('rss2_url'));

$results = notifixious_http_request($url."?".$params, "GET");

$jsonobj = json_decode($results[1]);

$source_id = $jsonobj->sources->source->permalink;

if($source_id != "")
{
update_option('notifixiousSourceId',''.$source_id.'', '', 'no');
update_option('notifixiousRegistered','1', '', 'no');
update_option('notifixiousClaimed','0', '', 'yes');
}
else
{
update_option('notifixiousSourceId','0', '', 'no');
update_option('notifixiousRegistered','0', '', 'no');
}

$post = get_post($rec);

$title = urlencode($post->post_title);
$text = urlencode($post->post_content);
$link = urlencode($post->guid);
$url = "http://".urlencode($login).":".urlencode($pass)."@".
$notifixurl."/sources/".$source_id."/events.json?"."event[title]=".$title."&event[text]=".$text."&event[link]=".$link;

echo $url; exit;
//http://:@?event[title]=&event[text]=&event[link]=

$arr = notifixious_http_request($url, "POST");
print_r($arr);
exit;
}

function notifixious_http_request($link, $method){
$url_parts = @parse_url( $link );
$host = $url_parts["host"];
$path = $url_parts["path"];
if($url_parts["query"])
{
$query = $url_parts["query"];
$http_request = "$method $path?$query HTTP/1.0\r\n";
}
else
{
$http_request = "$method $path HTTP/1.0\r\n";
}
if($url_parts["user"] && $url_parts["pass"])
{
$user = $url_parts["user"];
$pass = $url_parts["pass"];
$auth = $user.":".$pass ;
$encoded_auth = base64_encode($auth);
$http_request .= "Authorization: Basic ".$encoded_auth."\r\n";
}
$port = 80;
$http_request .= "Host: $host\r\n";
$http_request .= "User-Agent: WordPress \r\n";
$http_request .= "\r\n";
$response = '';
if( false != ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
fwrite($fs, $http_request);
while ( !feof($fs) )
$response .= fgets($fs); // One TCP-IP packet
fclose($fs);
}
$response = explode("\r\n\r\n", $response, 2);
return $response;

}
2 changes: 1 addition & 1 deletion db/library/dbscript/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ function has_table($t) {
function get_tables() {
trigger_before( 'get_tables', $this, $this );
$tables = array();
$sql = "SHOW tables FROM ".$this->dbname;
$sql = "SHOW tables";
$result = $this->get_result($sql);
while ($arr = $this->fetch_array($result)) {
foreach($arr as $key=>$value) {
Expand Down
Binary file added resource/favicon.ico
Binary file not shown.
26 changes: 26 additions & 0 deletions resource/jquery.ui/AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
jQuery UI Authors (http://ui.jquery.com/about)

This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
and logs, available at http://jquery-ui.googlecode.com/svn/

Brandon Aaron
Paul Bakaus (paulbakaus.com)
David Bolter
Chi Cheng (cloudream@gmail.com)
Maggie Costello
Aaron Eisenberger (aaronchi@gmail.com)
Ariel Flesler
Scott González
Marc Grabanski (m@marcgrabanski.com)
Klaus Hartl (stilbuero.de)
Scott Jehl
Cody Lindley
Eduardo Lundgren (eduardolundgren@gmail.com)
Todd Parker
John Resig
Patty Toland
Ca-Phun Ung (yelotofu.com)
Keith Wood (kbwood@virginbroadband.com.au)
Richard D. Worth (rdworth.org)
Jörn Zaefferer

0 comments on commit 6704ee5

Please sign in to comment.