Unverified Commit 06ed2cf4 authored by Tristan Olive's avatar Tristan Olive Committed by GitHub

Merge pull request #3372 from drshawnkwang/drupal_fix-featureflag

Drupal: Set consistent defaults in flag_abuse module
parents a3159ad7 393f7013
......@@ -23,309 +23,232 @@
* Node Flags
* * * * * * * * * * * * * * * * * * * * * * * * * * * */
function _flag_abuse_reason_abuse_node_flags(&$flags) {
// Exported flag: "Node Abuse metalink".
$flags[] = array (
// Exported flag: "Node Abuse 1 SPAM".
$flags['abuse_node_1'] = array(
'content_type' => 'node',
'name' => 'abuse_node_meta',
'title' => 'Node Abuse meta',
'global' => false,
'types' => array (
'title' => 'Node Abuse 1 SPAM',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
2 => 'reset',
),
'flag_short' => 'Meta Flag for node',
'flag_long' => 'Meta Flag for node.',
'flag_short' => 'Flag as SPAM',
'flag_long' => 'Flag this content SPAM.',
'flag_message' => '',
'unflag_short' => 'Meta Flag for node',
'unflag_long' => 'Meta Flag for node.',
'unflag_short' => 'Unflag as SPAM',
'unflag_long' => 'Unflag this content as SPAM.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'roles' => array (
'flag' => array (
0 => '2',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array (
0 => '2',
'unflag' => array(
'0' => 2,
),
),
'show_on_page' => true,
'show_on_teaser' => false,
'show_on_form' => false,
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => 0,
'flag_confirmation' => 'Are you sure you want to flag this content?',
'unflag_confirmation' => 'Are you sure you want to unflag this content?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this content',
'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
'status' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 1".
$flags[] = array (
// Exported flag: "Node Abuse 2 Link".
$flags['abuse_node_2'] = array(
'content_type' => 'node',
'name' => 'abuse_node_1',
'title' => 'Node Abuse 1',
'global' => false,
'types' => array (
'title' => 'Node Abuse 2 Link',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
2 => 'reset',
),
'flag_short' => 'Flag as offensive',
'flag_long' => 'Flag this content as offensive.',
'flag_short' => 'Report as abusive link',
'flag_long' => 'Flag this content as abusive link.',
'flag_message' => '',
'unflag_short' => 'Flag as non-offensive',
'unflag_long' => 'Flag this content as non-offensive.',
'unflag_short' => 'Unflag as abusive link',
'unflag_long' => 'Unflag this content as abusive link.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'roles' => array (
'flag' => array (
0 => '2',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array (
0 => '2',
'unflag' => array(
'0' => 2,
),
),
'show_on_page' => true,
'show_on_teaser' => false,
'show_on_form' => false,
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => 0,
'flag_confirmation' => 'Are you sure you want to flag this content as offensive?',
'unflag_confirmation' => 'Are you sure you want to flag this content as non-offensive?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this content',
'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
'status' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 2".
$flags[] = array (
// Exported flag: "Node Abuse 3 Hostile".
$flags['abuse_node_3'] = array(
'content_type' => 'node',
'name' => 'abuse_node_2',
'title' => 'Node Abuse 2',
'global' => false,
'types' => array (
'title' => 'Node Abuse 3 Hostile',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
2 => 'reset',
),
'flag_short' => 'Flag as offensive',
'flag_long' => 'Flag this content as offensive.',
'flag_short' => 'Flag as hostile',
'flag_long' => 'Flag this content as hostile.',
'flag_message' => '',
'unflag_short' => 'Flag as non-offensive',
'unflag_long' => 'Flag this content as non-offensive.',
'unflag_short' => 'Unflag as hostile',
'unflag_long' => 'Unflag this content as hostile.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'roles' => array (
'flag' => array (
0 => '2',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array (
0 => '2',
'unflag' => array(
'0' => 2,
),
),
'show_on_page' => true,
'show_on_teaser' => false,
'show_on_form' => false,
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => 0,
'flag_confirmation' => 'Are you sure you want to flag this content as offensive?',
'unflag_confirmation' => 'Are you sure you want to flag this content as non-offensive?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this content',
'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
'status' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 3".
$flags[] = array (
// Exported flag: "Node Abuse 4 Not Kid Friendly".
$flags['abuse_node_4'] = array(
'content_type' => 'node',
'name' => 'abuse_node_3',
'title' => 'Node Abuse 3',
'global' => false,
'types' => array (
'title' => 'Node Abuse 4 Not Kid Friendly',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
2 => 'reset',
),
'flag_short' => 'Flag as offensive',
'flag_long' => 'Flag this content as offensive.',
'flag_short' => 'Flag as not kid-friendly',
'flag_long' => 'Flag this content as not kid-friendly.',
'flag_message' => '',
'unflag_short' => 'Flag as non-offensive',
'unflag_long' => 'Flag this content as non-offensive.',
'unflag_short' => 'Unflag as kid-friendly',
'unflag_long' => 'Unflag this content as not kid-friendly.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'roles' => array (
'flag' => array (
0 => '2',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array (
0 => '2',
'unflag' => array(
'0' => 2,
),
),
'show_on_page' => true,
'show_on_teaser' => false,
'show_on_form' => false,
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => 0,
'flag_confirmation' => 'Are you sure you want to flag this content as offensive?',
'unflag_confirmation' => 'Are you sure you want to flag this content as non-offensive?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this content',
'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
'status' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 4".
$flags[] = array (
// Exported flag: "Node Abuse 5 Other".
$flags['abuse_node_5'] = array(
'content_type' => 'node',
'name' => 'abuse_node_4',
'title' => 'Node Abuse 4',
'global' => false,
'types' => array (
'title' => 'Node Abuse 5 Other',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
2 => 'reset',
),
'flag_short' => 'Flag as offensive',
'flag_long' => 'Flag this content as offensive.',
'flag_short' => 'Flag as other',
'flag_long' => 'Flag this content - other reason.',
'flag_message' => '',
'unflag_short' => 'Flag as non-offensive',
'unflag_long' => 'Flag this content as non-offensive.',
'unflag_short' => 'Unflag as other',
'unflag_long' => 'Unflag this content - other reason.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'roles' => array (
'flag' => array (
0 => '2',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array (
0 => '2',
'unflag' => array(
'0' => 2,
),
),
'show_on_page' => true,
'show_on_teaser' => false,
'show_on_form' => false,
'weight' => 0,
'show_on_page' => 0,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => 0,
'flag_confirmation' => 'Are you sure you want to flag this content as offensive?',
'unflag_confirmation' => 'Are you sure you want to flag this content as non-offensive?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this content',
'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
'status' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Node Abuse 5".
$flags[] = array (
// Exported flag: "Node Abuse meta".
$flags['abuse_node_meta'] = array(
'content_type' => 'node',
'name' => 'abuse_node_5',
'title' => 'Node Abuse 5',
'global' => false,
'types' => array (
'title' => 'Node Abuse meta',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
2 => 'reset',
),
'flag_short' => 'Flag as offensive',
'flag_long' => 'Flag this content as offensive.',
'flag_short' => 'Report',
'flag_long' => 'Report content',
'flag_message' => '',
'unflag_short' => 'Flag as non-offensive',
'unflag_long' => 'Flag this content as non-offensive.',
'unflag_short' => 'Cancel Report',
'unflag_long' => 'Cancel report of content',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'roles' => array (
'flag' => array (
0 => '2',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array (
0 => '2',
'unflag' => array(
'0' => 2,
),
),
'show_on_page' => true,
'show_on_teaser' => false,
'show_on_form' => false,
'weight' => 0,
'show_on_page' => 1,
'show_on_teaser' => 0,
'show_on_form' => 0,
'access_author' => '',
'i18n' => 0,
'flag_confirmation' => 'Are you sure you want to flag this content as offensive?',
'unflag_confirmation' => 'Are you sure you want to flag this content as non-offensive?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this content',
'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
'status' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'i18n' => '0',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
......@@ -336,30 +259,24 @@ function _flag_abuse_reason_abuse_node_flags(&$flags) {
* Comment Flags
* * * * * * * * * * * * * * * * * * * * * * * * * * * */
function _flag_abuse_reason_abuse_comment_flags(&$flags) {
// Exported flag: "Comment Abuse meta".
$flags[] = array(
// Exported flag: "Comment Abuse 1 SPAM".
$flags['abuse_comment_1'] = array(
'content_type' => 'comment',
'name' => 'abuse_comment_meta',
'title' => 'Comment Abuse meta',
'global' => '0',
'title' => 'Comment Abuse 1 SPAM',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
),
'flag_short' => 'Meta Flag for comment',
'flag_long' => 'Meta Flag for comment.',
'flag_short' => 'Flag as SPAM',
'flag_long' => 'Flag this comment as SPAM.',
'flag_message' => '',
'unflag_short' => 'Meta Flag for comment',
'unflag_long' => 'Meta Flag for comment.',
'unflag_short' => 'Unflag as SPAM',
'unflag_long' => 'Unflag this comment as SPAM.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
......@@ -371,258 +288,185 @@ function _flag_abuse_reason_abuse_comment_flags(&$flags) {
'weight' => 0,
'access_author' => '',
'show_on_comment' => 0,
'flag_confirmation' => 'Are you sure you want to flag this content?',
'unflag_confirmation' => 'Are you sure you want to unflag this content?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this comment',
'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
'status' => false,
'show_on_teaser' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Comment Abuse 1".
$flags[] = array (
// Exported flag: "Comment Abuse 2 LINK".
$flags['abuse_comment_2'] = array(
'content_type' => 'comment',
'name' => 'abuse_comment_1',
'title' => 'Comment Abuse 1',
'global' => false,
'types' => array (
'title' => 'Comment Abuse 2 LINK',
'global' => FALSE,
'types' => array(
'0' => 'forum',
'1' => 'news',
'2' => 'team_forum',
),
'events' => array (
0 => 'flag',
1 => 'unflag',
),
'flag_short' => 'Flag as offensive',
'flag_long' => 'Flag this content as offensive.',
'flag_short' => 'Flag as abusive link',
'flag_long' => 'Flag this comment with abusive link.',
'flag_message' => '',
'unflag_short' => 'Flag as non-offensive',
'unflag_long' => 'Flag this content as non-offensive.',
'unflag_short' => 'Unflag as abusive link',
'unflag_long' => 'Unflag this comment with abusive link.',
'unflag_message' => '',
'unflag_denied_text' => '',
'link_type' => 'confirm',
'roles' => array (
'flag' => array (
0 => '2',
'link_type' => 'toggle',
'roles' => array(
'flag' => array(
'0' => 2,
),
'unflag' => array (
0 => '2',
'unflag' => array(
'0' => 2,
),
),
'weight' => 0,
'access_author' => '',
'show_on_comment' => true,
'flag_confirmation' => 'Are you sure you want to flag this content as offensive?',
'unflag_confirmation' => 'Are you sure you want to flag this content as non-offensive?',
'reset_short' => 'Reset flags',
'reset_long' => 'Reset all flags on this comment',
'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
'status' => false,
'show_on_teaser' => false,
'locked' => array (
'name' => 'name',
'global' => 'global',
),
'module' => 'flag_abuse_reason',
'show_on_comment' => 0,
'module' => 'boinc_standard',
'locked' => array(
'0' => 'name',
),
'api_version' => 2,
);
// Exported flag: "Comment Abuse 2".
$flags[] = array (
// Exported flag: "Comment Abuse 3 Hostile".
$flags['abuse_comment_3'] = array(
'content_type' => 'comment',