function nodejs_get_add_channel in Node.js integration 7
Add a channel to the Node.js server.
Parameters
channel:
Return value
boolean
File
- ./
nodejs.module, line 364  
Code
function nodejs_get_add_channel($channel) {
  // Http request went ok. Process Node.js server response.
  if ($node_response = Nodejs::addChannel($channel)) {
    if ($node_response->status == 'success') {
      return TRUE;
    }
    else {
      watchdog('nodejs', 'Error adding channel to the Node.js server. Server response: %error', array(
        '%error' => $node_response->error,
      ));
      return FALSE;
    }
  }
  else {
    return FALSE;
  }
}