Loading plugins/content/content.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -1494,17 +1494,18 @@ namespace blogi { json_object_object_add(jback, "label", json_object_new_string(tr(_lang,"Back to list").c_str())); json_object_object_add(jback, "url", json_object_new_string(Args->config->buildurl("settings/content").c_str())); json_object_array_add(jnav, jback); json_object_object_add(jroot, "nav", jnav); bool isOwn = (postAuthor == currentAuthor); if((isOwn && checkGPO(GPO_CONTENT_DELETE_OWN)) || checkGPO(GPO_CONTENT_DELETE_OTHERS)) { json_object *jlinks = json_object_new_array(); json_object *jdel = json_object_new_object(); json_object_object_add(jdel, "label", json_object_new_string(tr(_lang,"Delete post").c_str())); json_object_object_add(jdel, "url", json_object_new_string((Args->config->buildurl("settings/content/delete?id=") + std::to_string(cid)).c_str())); json_object_array_add(jnav, jdel); json_object_array_add(jlinks, jdel); json_object_object_add(jroot, "links", jlinks); } json_object_object_add(jroot, "nav", jnav); json_object *jform = json_object_new_object(); json_object_object_add(jform, "method", json_object_new_string("POST")); json_object_object_add(jform, "action", json_object_new_string(curl.c_str())); Loading Loading
plugins/content/content.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -1494,17 +1494,18 @@ namespace blogi { json_object_object_add(jback, "label", json_object_new_string(tr(_lang,"Back to list").c_str())); json_object_object_add(jback, "url", json_object_new_string(Args->config->buildurl("settings/content").c_str())); json_object_array_add(jnav, jback); json_object_object_add(jroot, "nav", jnav); bool isOwn = (postAuthor == currentAuthor); if((isOwn && checkGPO(GPO_CONTENT_DELETE_OWN)) || checkGPO(GPO_CONTENT_DELETE_OTHERS)) { json_object *jlinks = json_object_new_array(); json_object *jdel = json_object_new_object(); json_object_object_add(jdel, "label", json_object_new_string(tr(_lang,"Delete post").c_str())); json_object_object_add(jdel, "url", json_object_new_string((Args->config->buildurl("settings/content/delete?id=") + std::to_string(cid)).c_str())); json_object_array_add(jnav, jdel); json_object_array_add(jlinks, jdel); json_object_object_add(jroot, "links", jlinks); } json_object_object_add(jroot, "nav", jnav); json_object *jform = json_object_new_object(); json_object_object_add(jform, "method", json_object_new_string("POST")); json_object_object_add(jform, "action", json_object_new_string(curl.c_str())); Loading