Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SMF2] Possible Merge System Typo Error? #205

Open
dresch86 opened this issue May 8, 2017 · 0 comments
Open

[SMF2] Possible Merge System Typo Error? #205

dresch86 opened this issue May 8, 2017 · 0 comments

Comments

@dresch86
Copy link

dresch86 commented May 8, 2017

I have a question about this section of the forum permission merger for SMF:

				$tquery = $db->simple_select('forumpermissions', 'pid', "fid={$fid} AND gid={$mgid}");
				if($db->num_rows($tquery) == 0)
				{
					// We hadn't any permissions for this forum so simply insert one and leave everything to default
					$db->insert_query('forumpermissions', array('fid' => $fid, 'gid' => $mgid, 'canview' => 0));
				}
				else
				{
					// We had permissions so simply update them
					$db->update_query('forumpermissions', array('canview' => 0), "fid={$fid} AND gid={$mgid}");
				}

Shouldn't the bottom else block set canview to 1? I don't see anywhere where canview gets set to 1 and the value defaults to 0 so an update shouldn't be required unless you need to allow view access.

The main reason I ask is I'm working on developing a Java merge system designed to handle the conversion of large forums without timeouts, pauses, or slowing up the web service. I have not run the current PHP variant.

@dresch86 dresch86 changed the title Possible Merge System Type? Possible Merge System Typo? May 8, 2017
@dresch86 dresch86 changed the title Possible Merge System Typo? Possible Merge System Typo Error? May 8, 2017
@dresch86 dresch86 changed the title Possible Merge System Typo Error? [SMF2] Possible Merge System Typo Error? May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant