https://drupal.org/sandbox/bisw/2257789
git clone --branch 6.x-1.0 http://git.drupal.org/sandbox/bisw/2257789.git change_content_status

Change Content Status module will provide us to make an any node Publish or Non Publish depending on a given date range or content type or both. In filter criteria we can choose multiple content type also.

CommentFileSizeAuthor
change_content_status.zip9.98 KBbisw

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxbisw2257789git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

bisw’s picture

Title: Change Content Status [D6] » [D6] Change Content Status
Issue summary: View changes
bisw’s picture

Status: Needs work » Needs review

Fixed the issues.

bisw’s picture

Priority: Normal » Major
parisek’s picture

bisw, you have fatal security issue in your module:

$items['admin/setting/change_content_status/setting'] = array(
      'title' => 'Change Content Status',
      'page callback' => 'change_content_status',
      'file' => 'includes/change_content_status.inc',
      'access arguments' => array('access content'),
      'type' => MENU_NORMAL_ITEM,
);

'access arguments' => array('access content') means that everyone who can access your site will have permission to modify your nodes!

// Get all the nodes according to given date range and content type.
  $result = db_query("SELECT * FROM {node} WHERE created >= '%s' AND created <= '%s' $output", $from_date, $to_date);

  // Set node as publish.
  if ($node_status == 'publish') {
    while ($row_result = db_fetch_object($result)) {
      db_query("UPDATE {node} SET status = 1 WHERE nid = '%s'", $row_result->nid);
    }
  }
  else {
    while ($row_result = db_fetch_object($result)) {
      // Set node as non publish.
      db_query("UPDATE {node} SET status = 0 WHERE nid = '%s'", $row_result->nid);
    }
  }

Isn't this above too complex? I think it's possible to achieve same functionality with single SQL query which is much more efficient.

Module definitely needs more fine tuning

klausi’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

So this needs work. Please don't remove the security tag, we keep that for statistics and to show examples of security problems.

bisw’s picture

Status: Needs work » Needs review

Hi parisek
thanks for review the code and i have fixed that security issue and also did refine code

bisw’s picture

Hi parisek
thanks for review the code and i have fixed that security issue and also did refine code

joachim’s picture

Status: Needs review » Needs work

I'm not sure I understand the summary of what this module does, but it does seem from the screenshot like it's a use case that's already covered by Views Bulk Operations.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.