Skip to content

Commit

Permalink
messages changed in ajax share
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonid Dinershtein committed Jun 18, 2010
1 parent 2a31538 commit 44f3c1f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6,378 deletions.
12 changes: 5 additions & 7 deletions public/mod/googleappslogin/actions/change_doc_permissions.php
@@ -1,7 +1,4 @@
<?php <?php

$url_to_redirect = $CONFIG->wwwroot . 'pg/docs/my';

$data = unserialize($_SESSION['google_docs_to_share_data']); $data = unserialize($_SESSION['google_docs_to_share_data']);
$comment = $data['comment']; $comment = $data['comment'];
$access = $data['access']; $access = $data['access'];
Expand Down Expand Up @@ -38,10 +35,11 @@
share_document($doc, $user, $comment, $access); share_document($doc, $user, $comment, $access);
break; break;


case 'Cancel': case 'Cancel': echo 'Canceled'; exit; break;
break;
} }
die('OK');
forward($url_to_redirect); die ( elgg_echo("googleappslogin:doc:share:ok") );
exit;


?> ?>
15 changes: 6 additions & 9 deletions public/mod/googleappslogin/actions/share_doc.php
Expand Up @@ -4,8 +4,6 @@
$comment = get_input('comment', ''); $comment = get_input('comment', '');
$activity_access = get_input('access', ''); $activity_access = get_input('access', '');
$group_id = get_input('group', ''); $group_id = get_input('group', '');
$url_to_redirect=$CONFIG->wwwroot . 'pg/docs/my';
$url_for_permission_redirect=$CONFIG->wwwroot . 'pg/docs/permissions';


$to_share=array(); $to_share=array();
$to_share['doc_id']=$doc_id; $to_share['doc_id']=$doc_id;
Expand All @@ -15,14 +13,13 @@
$_SESSION['google_docs_to_share_data']=serialize( $to_share ); // remember data $_SESSION['google_docs_to_share_data']=serialize( $to_share ); // remember data


if ( is_null($doc_id) ) { if ( is_null($doc_id) ) {
die('No doc id'); echo elgg_echo("googleappslogin:doc:share:no_doc_id");
system_message(elgg_echo("googleappslogin:doc:share:no_doc_id")); exit;
forward($url_to_redirect);
} }


if( empty($comment)) { if( empty($comment)) {
die('No comment'); echo elgg_echo("googleappslogin:doc:share:no_comment");
system_message(elgg_echo("googleappslogin:doc:share:no_comment")); exit;
forward($url_to_redirect); forward($url_to_redirect);
} }


Expand Down Expand Up @@ -61,8 +58,8 @@ function save_answer(el) {
} }


share_document($doc, $user, $comment, $activity_access, $doc_access); // Share and public document activity share_document($doc, $user, $comment, $activity_access, $doc_access); // Share and public document activity
die('Document shared'); echo elgg_echo("googleappslogin:doc:share:ok");
forward($url_to_redirect); // forward exit;
} }




Expand Down
2 changes: 1 addition & 1 deletion public/mod/googleappslogin/models/functions.php
Expand Up @@ -910,7 +910,7 @@ function share_document($doc, $user, $message, $access, $collaborators = null) {
add_to_river('river/object/doc_activity/create', 'create doc', $user->guid, $doc_activity->guid, "", strtotime($date)); add_to_river('river/object/doc_activity/create', 'create doc', $user->guid, $doc_activity->guid, "", strtotime($date));
} }


system_message(elgg_echo("googleappslogin:doc:share:ok")); // system_message(elgg_echo("googleappslogin:doc:share:ok"));
} }




Expand Down

0 comments on commit 44f3c1f

Please sign in to comment.