fix api/direct_messages/new at least for the json case. We seem to have a missing template for XML
This commit is contained in:
parent
0cb5f009b4
commit
6df98f080b
@ -909,7 +909,7 @@ require_once('include/api_auth.php');
|
|||||||
function red_item(&$a, $type) {
|
function red_item(&$a, $type) {
|
||||||
|
|
||||||
if (api_user() === false) {
|
if (api_user() === false) {
|
||||||
logger('api_red_item_new: no user');
|
logger('api_red_item_full: no user');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2196,7 +2196,7 @@ require_once('include/api_auth.php');
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = send_message($recipient['id'], $_POST['text'], $sub, $replyto);
|
$id = send_message(api_user(),$recipient['guid'], $_POST['text'], $sub, $replyto);
|
||||||
|
|
||||||
if ($id>-1) {
|
if ($id>-1) {
|
||||||
$r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));
|
$r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* ACL selector json backend */
|
|
||||||
|
|
||||||
|
/* ACL selector json backend */
|
||||||
require_once("include/acl_selectors.php");
|
require_once("include/acl_selectors.php");
|
||||||
|
|
||||||
function acl_init(&$a){
|
function acl_init(&$a){
|
||||||
|
@ -1 +1 @@
|
|||||||
2015-11-15.1217
|
2015-11-16.1218
|
||||||
|
@ -25,7 +25,6 @@ function ACL(backend_url, preset) {
|
|||||||
/*events*/
|
/*events*/
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// setTimeout( function() {
|
|
||||||
that.showall.click(that.on_showall);
|
that.showall.click(that.on_showall);
|
||||||
$(document).on('click','.acl-button-show',that.on_button_show);
|
$(document).on('click','.acl-button-show',that.on_button_show);
|
||||||
$(document).on('click','.acl-button-hide',that.on_button_hide);
|
$(document).on('click','.acl-button-hide',that.on_button_hide);
|
||||||
@ -34,11 +33,10 @@ function ACL(backend_url, preset) {
|
|||||||
/* startup! */
|
/* startup! */
|
||||||
that.get(0,100);
|
that.get(0,100);
|
||||||
that.on_submit();
|
that.on_submit();
|
||||||
// }, 5000 );
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// no longer called on submit - call to update whenever a change occurs to the acl list.
|
// no longer called only on submit - call to update whenever a change occurs to the acl list.
|
||||||
|
|
||||||
ACL.prototype.on_submit = function() {
|
ACL.prototype.on_submit = function() {
|
||||||
aclfileds = $("#acl-fields").html("");
|
aclfileds = $("#acl-fields").html("");
|
||||||
@ -66,7 +64,9 @@ ACL.prototype.search = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ACL.prototype.on_search = function(event) {
|
ACL.prototype.on_search = function(event) {
|
||||||
if (that.kp_timer) clearTimeout(that.kp_timer);
|
if (that.kp_timer) {
|
||||||
|
clearTimeout(that.kp_timer);
|
||||||
|
}
|
||||||
that.kp_timer = setTimeout( that.search, 1000);
|
that.kp_timer = setTimeout( that.search, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -90,15 +90,37 @@ ACL.prototype.on_showall = function(event) {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ACL.prototype.on_selectall = function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
|
/* This function has not yet been completed. */
|
||||||
|
/* The goal is to select all ACL "show" entries with one action. */
|
||||||
|
|
||||||
|
$('.acl-button-show').each(function(){});
|
||||||
|
|
||||||
|
if (that.showall.hasClass("btn-warning")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
that.showall.removeClass("btn-default").addClass("btn-warning");
|
||||||
|
|
||||||
|
that.allow_cid = [];
|
||||||
|
that.allow_gid = [];
|
||||||
|
that.deny_cid = [];
|
||||||
|
that.deny_gid = [];
|
||||||
|
|
||||||
|
that.update_view();
|
||||||
|
that.on_submit();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
ACL.prototype.on_button_show = function(event) {
|
ACL.prototype.on_button_show = function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
/*that.showall.removeClass("selected");
|
|
||||||
$(this).siblings(".acl-button-hide").removeClass("selected");
|
|
||||||
$(this).toggleClass("selected");*/
|
|
||||||
|
|
||||||
that.set_allow($(this).parent().attr('id'));
|
that.set_allow($(this).parent().attr('id'));
|
||||||
that.on_submit();
|
that.on_submit();
|
||||||
|
|
||||||
@ -110,10 +132,6 @@ ACL.prototype.on_button_hide = function(event) {
|
|||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
/*that.showall.removeClass("selected");
|
|
||||||
$(this).siblings(".acl-button-show").removeClass("selected");
|
|
||||||
$(this).toggleClass("selected");*/
|
|
||||||
|
|
||||||
that.set_deny($(this).parent().attr('id'));
|
that.set_deny($(this).parent().attr('id'));
|
||||||
that.on_submit();
|
that.on_submit();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user