Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
Lucifix
Regular
Regular



Joined: Mar 11, 2005
Posts: 67

PostPosted: Fri Apr 05, 2013 12:02 am Reply with quote

Function in /modules/News/admin/index.php
Code:


function autoEdit($anid) {
   global $aid, $bgcolor1, $bgcolor2, $prefix, $db, $multilingual, $admin_file, $language, $radminsuper, $sid;
   $result2 = $db->sql_query('select aid from '.$prefix.'_stories where sid=\''.$sid.'\'');


With it you can edit autonews / programmed news which are stored in _autonews table. But sql query (posted above) is checking _stories table if admin is authorized for this story. Shouldn't function check autonews table and not _stories?
Code:
function autoEdit($anid) {

   global $aid, $bgcolor1, $bgcolor2, $prefix, $db, $multilingual, $admin_file, $language, $radminsuper, $sid;
   $result2 = $db->sql_query('select aid from '.$prefix.'_autonews where anid=\''.$sid.'\'');
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Sat Apr 06, 2013 10:54 am Reply with quote

I haven't had a chance to look at the current released code in detail, but what you are saying sounds like it could be correct. Although I'm not real familiar with that code and how it relates to other functions.

There are significant changes to the News module for our next major release and function autoEdit has either been removed or replaced. I've been immersed in other areas of the code so haven't had a chance to examine those changes yet.
 
View user's profile Send private message Visit poster's website
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Sat Apr 06, 2013 12:38 pm Reply with quote

Lucifix, its a known issue of the current news module inside the core package of RN25+. But the correct query should be:

Code:
$result2 = $db->sql_query('SELECT `aid` FROM `' . $prefix . '_autonews` WHERE `anid` = \'' . $anid . '\'');


I have written a news-mod for RN25 and i have it changed what spasticdonkey means. I have put the autonews inside the stories table with a lot of other new features.
[ Only registered users can see links on this board! Get registered or login! ]

_________________
Github: RavenNuke 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©