Review of the 6.x-2.x branch:
Severity minor, Drupal Commenting Standards, Internationalization, Drupal Security Checks, Drupal SQL Standards, Drupal Coding Standards
sites/all/modules/pareview_temp/test_candidate/consensus.module:
+10: [minor] Comment should be read "Implements hook_foo()."
+19: [minor] Comment should be read "Implements hook_foo()."
+121: [minor] Comment should be read "Implements hook_foo()."
+902: [minor] Comment should be read "Implements hook_foo()."
+1030: [minor] Comment should be read "Implements hook_foo()."
+1055: [minor] Comment should be read "Implements hook_foo()."
+1097: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
+1101: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
+1105: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
+1107: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
+1113: [minor] Comment should be read "Implements hook_foo()."
+1144: [minor] Comment should be read "Implements hook_foo()."
+1160: [minor] Comment should be read "Implements hook_foo()."
+1194: [minor] Comment should be read "Implements hook_foo()."
+1215: [minor] Comment should be read "Implements hook_foo()."
+1222: [minor] Comment should be read "Implements hook_foo()."
+1333: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
+1336: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
+1497: [minor] Comment should be read "Implements hook_foo()."
sites/all/modules/pareview_temp/test_candidate/consensus_users/consensus_users.install:
+57: [critical] In SQL strings, Use db_query() placeholders in place of variables. This is a potential source of SQL injection attacks when the variable can come from user data.
sites/all/modules/pareview_temp/test_candidate/consensus_groups/consensus_groups.tpl.php:
+27: [minor] The control statement should use ":" syntax instead of curly braces.
sites/all/modules/pareview_temp/test_candidate/consensus.install:
+8: [minor] Comment should be read "Implements hook_foo()."
+383: [minor] Comment should be read "Implements hook_foo()."
+398: [minor] Comment should be read "Implements hook_foo()."
sites/all/modules/pareview_temp/test_candidate/consensus.items.inc:
+8: [minor] Comment should be read "Implements hook_foo()."
sites/all/modules/pareview_temp/test_candidate/consensus.edit.inc:
+55: [minor] Use an indent of 2 spaces, with no tabs
+72: [critical] Potential problem: FAPI elements '#title' and '#description' only accept filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
+298: [critical] Potential problem: when FAPI element '#type' is set to 'markup' (default), '#value' only accepts filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
+444: [minor] Potential problem: use the Form API to prevent against CSRF attacks. If you need to use $_POST variables, ensure they are fully sanitized if displayed by using check_plain(), !f
ilter_xss() or similar.
Status Messages:
Coder found 1 projects, 20 files, 3 critical warnings, 6 normal warnings, 88 minor warnings, 0 warnings were flagged to be ignored
consensus.edit.inc:1013: //save to string
consensus_groups/consensus_groups.js:113: //containment: 'parent',
consensus_groups/consensus_groups.js:114: //forceHelperSize: true, // may not be necessary
consensus_groups/consensus_groups.js:115: //forcePlaceholderSize: true,
consensus_groups/consensus_groups.js:116: //helper: 'original',
consensus_groups/consensus_groups.js:117: //helper: 'clone', // if the display is better iwth clone
consensus_groups/consensus_groups.js:119: //placeholder: 'c_user_placeholder',
consensus_groups/consensus_groups.js:120: //revert: true,
consensus_groups/consensus_groups.js:123: //sort: function(event, ui) {
consensus_groups/consensus_groups.js:157: //this.formatFieldset();
consensus_groups/consensus_groups.tpl.php:16: //print theme('consensus_users_sortby', $sortby);
consensus_groups/consensus_groups.module:65: //drupal_add_js(array('consensus_users' => $users), 'setting');
consensus_groups/consensus_groups.module:172: //drupal_set_message(print_r($groups, true));
consensus_groups/consensus_groups.module:259: //watchdog('consensus_users', print_r($form['#post'], true));
consensus_groups/consensus_groups.module:293: //update the database row
consensus.inc:614: //get revid before a new revision is made
consensus.inc:722: //get revid before a new revision is made
consensus.inc:864: //select item to move
consensus.inc:887: //check that that it is in a different position
consensus.inc:898: //select new parent
consensus.inc:910: //insert before
consensus.inc:917: //add revision item to node
consensus_slider/consensus_slider.js:18: //check that the slider exists
consensus_slider/consensus_slider.js:56: //handle: '#slider-handle',
consensus_slider/consensus_slider.js:63: //values: timestamp,
consensus_slider/consensus_slider.js:64: //values: [1,2,3,4],
consensus_slider/consensus_slider.module:50: //drupal_set_message($settings['orientation']);
consensus_toolbox/consensus_toolbox.js:16: //this.addAllBox();
consensus_users/consensus_users.module:258: //unset sensitive information
consensus_users/consensus_users.module:624: //update the database row
consensus_users/consensus_users.js:183: //containment: 'parent',
consensus_users/consensus_users.js:184: //forceHelperSize: true, // may not be necessary
consensus_users/consensus_users.js:185: //forcePlaceholderSize: true,
consensus_users/consensus_users.js:186: //helper: 'original',
consensus_users/consensus_users.js:187: //helper: 'clone', // if the display is better iwth clone
consensus_users/consensus_users.js:189: //placeholder: 'c_user_placeholder',
consensus_users/consensus_users.js:190: //revert: true,
consensus_users/consensus_users.js:193: //sort: function(event, ui) {
consensus_users/consensus_users.js:220: //this.items = Drupal.settings.consensus_users[this.uid]['items'];
consensus_users/consensus_users.js:223: //this.endorsedItems = Array();
consensus_users/consensus_users.js:226: //this.endorsedList = Array();
consensus_users/consensus_users.js:228: //this.authoredItems = Array();
consensus_users/consensus_users.js:230: //this.authoredList = Array();
consensus_users/consensus_users.js:232: //this.itemList = Array();
consensus_users/consensus_users.js:234: //this.processItems();
js/consensus.js:334: //break outer;
js/consensus.js:1332: //items: 'li',
js/consensus.js:1335: //containment: '.c_content',
js/consensus.js:1339: //tabSize: 30,
js/consensus.js:1341: //helper: 'clone', // if the display is better with clone
js/consensus.js:1342: //handle: 'div.c_moving_button',
js/consensus.js:1452: //target.before('');
js/consensus.js:1712: //this.closeWindow(e);
js/consensus.js:1831: //var revid = revision.prev('.revision').attr('id');
js/consensus.js:1836: //var revid = revision.prev('.revision').attr('id');
js/consensus.js:2255: //revision.children('.data-text').css('display', 'none');
// double new lines, so they will be recognised by the parser as a new praragraph.
// build an array of all lines after the current line to send to the recursive function
// iterate backwards through list of revisions to find current - more efficient in most cases
// iterate backwards through list of revisions to find current - more efficient in most cases
//target.before('');
// if it is a revise (edit) button, check that the user has permission to edit it
// if it is a revise (edit) button, check that the user has permission to edit it
// Turn the legend into a clickable link and wrap the contents of the fieldset
// if entry exists, merge the new and old data TODO: it doesn't quite merge them yet
// important! The text node in $revsion->text is wrapped in CDATA tags, and these must be removed first.
//'users' => consensus_users_get_users($node), // TODO: this function is called twice - consider not doing so
//'endorsed-author-current' => t('Endorsed/Author ratio of only current items'),
// if entry exists, merge the new and old data TODO: it doesn't quite merge them yet
// Turn the legend into a clickable link and wrap the contents of the fieldset
// check to see if a node has been passed to the constructor, if not, create it
// if no object is passed to the $item variable, we find it by using itemid and revid
// retract and approve endorsements from all copies of this revision (reverted revisions)
// if itemid has been passed, then use function to find revid. Otherwise, set it to 1.
// $text, $type, FALSE, $parentid, $parentrevid, $note, $reason, $extra); //load revision tag
// if no object is passed to the $item variable, we find it by using itemid and revid
//$xslt_path = drupal_get_path('module', 'consensus') . '/xsl_scripts/consensus.xsl';
// check permissions for foreign (non-owner) edits TODO: the groups permission check is not implemented yet
function consensus_install() {
--
function consensus_update_6100() {
--
function consensus_uninstall() {
--
function consensus_upate_6200() {
function consensus_slider_block_form_submit($form, &$form_state) {
function theme_consensus_toolbox($form) {
function consensus_groups_get_data($nid = NULL, $uid = NULL, $cache = TRUE) {
--
function consensus_groups_form_submit($form, &$form_state) {
function consensus_groups_schema() {
--
function consensus_groups_uninstall() {
function consensus_users_schema() {
--
function consensus_users_uninstall() {
function consensus_users_settings($node = NULL) {
338- *
consensus.inc:86: if ($simple&&$dom) {
js/consensus.js:1960: else if (itemType == 'endorse' || itemType =='retract') {
js/consensus.js:1984: else if (itemType == 'endorse' || itemType =='retract') {
js/consensus.js:2140: case (action =='insert_revision'):
js/consensus.js:2146: case (action=='insert_item'):
js/consensus.js:2156: case (action=='insert_retract'):
js/consensus.js:2157: case (action=='insert_endorse'):
js/consensus.js:2165: case (action =='insert_translation'):
consensus.module:466: foreach ( $array2 as $key => &$value ) {
consensus.edit.inc:76: '#attributes' => array( 'class' => 'c_textarea'),
consensus.edit.inc:129: '#attributes' => array( 'class' => 'c_note'),
consensus.edit.inc:187: '#attributes' => array( 'class' => 'c_note'),
consensus.edit.inc:207: '#attributes' => array( 'class' => 'c_note'),
consensus.edit.inc:227: '#attributes' => array( 'class' => 'c_note'),
consensus.edit.inc:246: '#attributes' => array( 'class' => 'c_heading'),
consensus.edit.inc:275: '#attributes' => array( 'class' => 'c_note'),
consensus.edit.inc:334: drupal_set_message(t('the node with ID @nid does not exist', array( '@nid' => $post['nid'])), 'error');
consensus_users/consensus_users.module:307: 'author-current' => array( 'name' => t('No. of active contributions'), 'image' => 'bullet-edit.png'),
./consensus.module:145: $result = db_query("SELECT field_name FROM {content_node_field} WHERE type='consensus'");
./consensus.module:678: for ($c=$j+1; isset($section_lines[$c]) && $section_lines[$j] < $section_lines[$c]; $c++) {
./consensus_slider/consensus_slider.js:27: for (var i=0; typeof(revisions[i]) != 'undefined'; i++) {
./consensus_slider/consensus_slider.js:37: var i=0;
./consensus_slider/consensus_slider.module:22:function consensus_slider_block($op='list', $delta=0) {
./consensus.admin.inc:373: $result = db_query("SELECT item_name FROM {consensus_item_types} WHERE item_type='%s'", $type);
./consensus.admin.inc:380: $result = db_query("UPDATE {consensus_item_types} SET item_name='%s' WHERE item_type='%s'", $name, $type);
./consensus_toolbox/consensus_toolbox.module:32:function consensus_toolbox_block($op='list', $delta=0, $edit = array()) {
./js/consensus.js:122: for (var i=0; typeof(this.fieldNames[i]) != 'undefined'; i++) {
./js/consensus.js:126: for (var a=0; typeof(locs[a]) != 'undefined'; a++) {
./js/consensus.js:210: for (var d=0; typeof(this.docs[d]) != 'undefined'; d++) {
./js/consensus.js:328: for (var i=0; typeof(this.docs[i]) != 'undefined'; i++) {
./js/consensus.js:496: for (var i=0; typeof(items[i]) != 'undefined'; i++) {
./js/consensus.js:525: for (var i=0; typeof(items[i]) != 'undefined'; i++) {
./js/consensus.js:651: for (var j=0; typeof(items[j]) != 'undefined'; j++) {
./js/consensus.js:662: for (var i=0; typeof(doc.itemList[i]) != 'undefined'; i++) {
./js/consensus.js:692: for (var i=0; typeof(trees[i]) != 'undefined'; i++) {
./js/consensus.js:704: for (var i=0; typeof(data.messages[type][i]) != 'undefined'; i++) {
./js/consensus.js:901: for (var i=0; typeof(children[i]) != 'undefined'; i++) {
./js/consensus.js:924: for (var i=num-1; i>-1; i--) {
./js/consensus.js:937: for (var i=num-1; i>-1; i--) {
./js/consensus.js:991: for (var i=0; typeof(children[i]) != 'undefined'; i++) {
./js/consensus.js:1305: for (var a=0; typeof(parentTypes[a]) != 'undefined'; a++) {
./js/consensus.js:1643: for (var i=0; typeof(endorsements[i]) != 'undefined'; i++) {
./js/consensus.js:1860: for (var i= this.id - 2; this.conItem.revisionList[i] != 'undefined'; i--) {
./js/consensus.js:2027: for (var i=0; typeof(this.endorsements[i]) != 'undefined'; i++) {
./js/consensus.js:2355: for (i=0; typeof(jqContexts[i]) != 'undefined'; i++) {
./js/consensus.js:2367: for (var j=0; typeof(contexts[j]) != 'undefined'; j++) {
./consensus_groups/consensus_groups.module:25:function consensus_groups_block($op='list', $delta=0) {
./consensus_users/consensus_users.module:71:function consensus_users_block($op='list', $delta=0) {
./consensus_users/consensus_users.js:453: for (var e=0; typeof(this.endorsedRevs[i][r].endorsements[e]) != 'undefined'; e++) {
./consensus.inc:684: $dom_node= dom_import_simplexml($text);
./consensus.inc:720: function insertRevert($item = NULL, $revert_to_id=NULL, $itemid=NULL, $note) {