Skip to content

Commit

Permalink
appstore fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Oct 20, 2008
1 parent 81c3a8f commit 8b7870c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ edit the file: app/config/config.yml
adapter: mysql // 'mysql' or 'postgresql'
database: microblog // name of database
username: jacques // name of database user
password:
password: shhh // password of database user
host: localhost // name or IP address of database server

and find the email settings too

email_from: root@localhost
email_name: Notifier
email_from: root@localhost // "From address" for email msgs from this service
email_name: Notifier // Name of email sender


////////////////////////////
Expand Down
12 changes: 12 additions & 0 deletions app/plugins/omb.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ function omb_filter_posts( &$model, &$db ) {
// 'subscriptions.subscriber'=>$request->params['byid']
//);
//$model->set_param( 'find_by', $where );

// THREADED MODE

// } elseif (in_array($request->action, array('index','get')) && $model->table == 'posts' && $request->resource == 'posts' && $request->id == 0) {
// $where = array(
// 'parent_id'=>0
// );


} elseif ($request->action == 'index' && $model->table == 'posts' && $request->resource == 'posts' && $request->id == 0) {
$where = array(
'local'=>1
Expand Down Expand Up @@ -214,6 +223,8 @@ function wp_set_post_fields( &$model, &$rec ) {
if ( isset( $_POST['profile_id'] ))
$request->set_param( array( 'post', 'profile_id' ), $_POST['profile_id'] );

$request->set_param( array( 'post', 'parent_id' ), 0 );

$Category =& $db->model('Category');

$Category->find();
Expand Down Expand Up @@ -1042,6 +1053,7 @@ function oauth_omb_post( &$vars ) {
if (!$p) {
$p = $Post->base();
$p->set_value( 'profile_id', $sender->id );
$p->set_value( 'parent_id', 0 );
$p->set_value( 'uri', $notice_uri );
$p->set_value( 'url', $notice_url );
$p->set_value( 'title', $content );
Expand Down
3 changes: 3 additions & 0 deletions app/plugins/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,14 @@ function complete_openid_authentication( &$request ) {
$names = explode(' ',$_GET['openid_sreg_fullname']);
if (strlen($names[0]) > 0 && empty($i->given_name))
$i->set_value( 'given_name', $names[0] );

if (isset($names[2]) && empty($i->family_name)) {
$i->set_value( 'family_name', $names[2] );
} elseif (isset($names[1]) && empty($i->family_name)) {
$i->set_value( 'family_name', $names[1] );
}

$i->set_value( 'fullname', $_GET['openid_sreg_fullname']);

}

Expand Down
25 changes: 23 additions & 2 deletions app/plugins/wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,9 @@ function comments_template() {
global $comment_author_email;
global $comment_author_url;
$user_ID = 0;
global $the_post;
$id = $the_post->id;
$comments = array(1);
include('comments.php');
}

Expand All @@ -1182,7 +1185,8 @@ function get_template_directory() {
}

function comment_ID() {
return 0;
global $request;
return $request->id;
}

function comment_author_link( ) {
Expand All @@ -1201,8 +1205,25 @@ function comment_date() {
return "";
}

function comment_type() {
echo "Comment";
}

function comment_text() {
return "";

global $the_post;
global $db;
$sql = "SELECT title from posts where parent_id = ".$the_post->id;

$result = $db->get_result($sql);

while ( $row = $db->fetch_array( $result ) ) {
// $id = owner_of($p);
//echo "<h3>".$id->nickname." said:</h3>\n";
echo "<p>".$row['title']."</p>\n";
}


}

function check_admin_referer( $var ) {
Expand Down

0 comments on commit 8b7870c

Please sign in to comment.