Created
March 14, 2014 13:58
-
-
Save tarto-dev/9548152 to your computer and use it in GitHub Desktop.
WTF DRUDRU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function copris_demande_get_comments() { | |
die('plouf'); | |
$nid = FALSE; | |
$json['comments'] = array(); | |
$json['status'] = 400; | |
$json['message'] = 'Erreur de recuperation des donnees. Soit vous n\'avez pas accès à la node, soit il n\'y à pas de commentaires'; | |
if(!empty($_POST['nid'])) { | |
$nid = $_POST['nid']; | |
} | |
if($nid) { | |
$node = node_load($nid); | |
$json['comments'] = comment_get_thread($node, '', 100); | |
$json['status'] = 200; | |
$json['message'] = 'success'; | |
} | |
die('penis'); | |
return drupal_json_output($json); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment