Browse files

messages changed in ajax share

  • Loading branch information...
1 parent 2a31538 commit 44f3c1fe0214373b0ef1278d108b34fb665f8d43 Leonid Dinershtein committed Jun 18, 2010
View
12 public/mod/googleappslogin/actions/change_doc_permissions.php
@@ -1,7 +1,4 @@
<?php
-
-$url_to_redirect = $CONFIG->wwwroot . 'pg/docs/my';
-
$data = unserialize($_SESSION['google_docs_to_share_data']);
$comment = $data['comment'];
$access = $data['access'];
@@ -38,10 +35,11 @@
share_document($doc, $user, $comment, $access);
break;
- case 'Cancel':
- break;
+ case 'Cancel': echo 'Canceled'; exit; break;
+
}
-die('OK');
-forward($url_to_redirect);
+
+ die ( elgg_echo("googleappslogin:doc:share:ok") );
+ exit;
?>
View
15 public/mod/googleappslogin/actions/share_doc.php
@@ -4,8 +4,6 @@
$comment = get_input('comment', '');
$activity_access = get_input('access', '');
$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['doc_id']=$doc_id;
@@ -15,14 +13,13 @@
$_SESSION['google_docs_to_share_data']=serialize( $to_share ); // remember data
if ( is_null($doc_id) ) {
- die('No doc id');
- system_message(elgg_echo("googleappslogin:doc:share:no_doc_id"));
- forward($url_to_redirect);
+ echo elgg_echo("googleappslogin:doc:share:no_doc_id");
+ exit;
}
if( empty($comment)) {
- die('No comment');
- system_message(elgg_echo("googleappslogin:doc:share:no_comment"));
+ echo elgg_echo("googleappslogin:doc:share:no_comment");
+ exit;
forward($url_to_redirect);
}
@@ -61,8 +58,8 @@ function save_answer(el) {
}
share_document($doc, $user, $comment, $activity_access, $doc_access); // Share and public document activity
- die('Document shared');
- forward($url_to_redirect); // forward
+ echo elgg_echo("googleappslogin:doc:share:ok");
+ exit;
}
View
2 public/mod/googleappslogin/models/functions.php
@@ -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));
}
- system_message(elgg_echo("googleappslogin:doc:share:ok"));
+// system_message(elgg_echo("googleappslogin:doc:share:ok"));
}
View
6,361 upload/views_simplecache/2c792ea7fbe861fc0830a0fd72c9e447
0 additions, 6,361 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 44f3c1f

Please sign in to comment.