Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:07:55 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155534 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Question regarding NEWS 3.5 code  (Read 564 times)
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« on: June 28, 2010, 01:55:41 PM »

Am working on a new module based on News 3.5

In news 3.5 there are 2 ways used to fetch submitted data
in save_comment.php, save_group.php and save_post.php the following syntax is used:
$fieldvariable = $admin->get_post_escaped('field');

in save_settings the following syntax is used:
$fieldvariable = $admin->add_slashes(str_replace($friendly, $raw, $_POST['field']));

It seems to me that save_settings.php still has the old way of fetching posted variables.
Am I correct in that assumption?

And if so, would dev be interested in a updated save_settings.php,
I'll need to update it anyway for my new mod.

John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #1 on: July 06, 2010, 07:43:33 AM »

*BUMPING*
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #2 on: July 06, 2010, 08:12:26 AM »

Hi John,

from my understanding Dietmar tried to directly contact you because of you request. But he might have slightly misunderstood the intentions. Did you get in contact with him?

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #3 on: July 06, 2010, 10:40:02 AM »

Yups I did, he told me devel prefered an action-handler to add more security

But he didn't answer above question.

I am allso not good enough a programmer to write action_handlers, I looked in some of the code in latest svn but since I am a very old school programmer I am not getting it yet. I need a good working example to understand the code and altering it to my benefits.

Will try to rephrase the original question,
I am copying news 3.5 module to a new module, currently work name is 'articles' wich should have many more features then the news 3.5 module.

Since I am trying to clean up the code, merging simular files like move_up and move_down, modify_group and modify_post etc and save_post and save_group etc I stumble upon a difference in handling input within the same module, wich seem to me like a leftover from older versions.

To make sure I understand this correct  I asked the question:

In news 3.5 there are 2 ways used to fetch submitted data
in save_comment.php, save_group.php and save_post.php the following syntax is used:
$fieldvariable = $admin->get_post_escaped('field');

in save_settings the following syntax is used:
$fieldvariable = $admin->add_slashes(str_replace($friendly, $raw, $_POST['field']));

It seems to me that save_settings.php still has the old way of fetching posted variables.

Surely since the security issues I wan't to create a save-as-possible-module.


That's basicly it Wink

John

Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3147



WWW
« Reply #4 on: July 06, 2010, 11:37:37 AM »

Hi

i just send a PM

Dietmar
Logged

We are human beings - and nobody is perfect at all.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!