I need to figure out where to add visible=1 so that no drafts are no longer being displayed in the widget. Can anyone help with this? I know that it must go in the mybbxp-recent-topics-widget.php file, but I cannot figure out the SQL code. I have tried editing the following code but I have only been able to produce the mybbdb->last_error. Any help on the right code would be very helpful.
$sql = 'select tid, subject from ' . $options['db_prefix'] . 'threads' // sanitized in MyBBXPSettings . ' where fid in( ' . $instance['fids'] // sanitized below . ') and visible=1' // <<<<I TRIED THIS>>> . 'order by ' . ($instance['define_recent'] == 'created' ? 'dateline' : 'lastpost') // sanitized below and inline . ' desc limit ' . $instance['num_topics'] // sanitized below . ';';
- The topic ‘Stop Displaying Drafts’ is closed to new replies.