-
Notifications
You must be signed in to change notification settings - Fork 7
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
Some fixes #88
Some fixes #88
Conversation
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
the previous change broke being able to name categories.
Fixes some fatal errors relating to the bindparams function. And Also keeps the naming of categories working properly.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
error reduction mode.
Has this stuff been broken for a long time, or do you think it was a PHP version thing? What PHP version are you using? |
Usually when you submit a pull request, you will want to create a new branch in git rather than using the master branch. This gives you the ability to submit multiple PRs at the same time just by changing branches. If you use the master branch for all of them, things get messy. No need to change anything for this PR, but a good tip for future PRs. |
In the future, will probably want to split into one PR per feature you worked on. For example, one for private messages, one for world clocks, one for polls. This makes it easier for the reviewer to load it up and test it and reason about it :) |
I haven't had any luck getting a ton of this stuff working in the past. Still want to figure out all the issues relating to the download system.. It really doesn't seem to function properly. Only recently found time to work on rebuilding my site. Some of the depreciated stuff is probably due to PHP version. The server its on is currently using PHP 8.1.20 |
I will work on doing that in the future, sorry about that. |
@@ -58,8 +58,6 @@ public function parse($strText) { | |||
} | |||
else { | |||
$strText = preg_replace( | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to remove this brace? Looks like a syntax error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, looking at more commits, the brace is still there, but is indented too much. And also preg_replace( is missing a );
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a syntax error from before you started this patch, I would just comment out $strText by adding //
to the front of it.
src/_functions.php
Outdated
$strText = preg_replace("/\[\youtube\](http|https)(\:\/\/youtu\.be\/)(.*)\[\/youtube\]/i", "<iframe class='youtubeEmbed' src='http://www.youtube.com/embed/$3?wmode=opaque' frameborder='0' allowfullscreen></iframe>", $strText); | ||
|
||
$strText = str_replace("[/twitch]", "[/twitch]\n", $strText); | ||
$strText = preg_replace("/\[youtube\](http|https)(\\:\\/\\/www\\.youtube\\.com\\/watch\\?v\\=)(.*)\[\/youtube\]/i", "<iframe class='youtubeEmbed' src='http://www.youtube.com/embed/$3?wmode=opaque' frameborder='0' allowfullscreen></iframe>", $strText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put the old indentation on these lines back. And in the rest of the files please.
On a lot of the lines, you unindented so that the indentation doesn't match the rest of the file. It also makes the git diffs harder to read.
Please use tabs instead of 4 spaces, to match the rest of this repo.
In a good code editor such as VS Code, you can select all the lines you want to indent, then hit tab as many times as needed, and it will scoot them all over to the right.
You can change from 4 spaces to tabs by clicking at the bottom right of VS Code where it says "Tab Size", and click on "Convert Indentation to Tabs"
src/classes/basic.php
Outdated
$sqlValues = rtrim(str_repeat("?, ", count($arrColumns)),", "); | ||
|
||
} | ||
public function addNew($arrColumns, $arrValues) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
src/classes/basicorder.php
Outdated
|
||
if($intOrderNumID == "first") { | ||
// "(no other categories)" selected, check to see if there are actually no other categories | ||
function validateOrder($intOrderNumID, $strBeforeAfter, $blnEdit = false, $intEditOrderNum = "") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
@@ -58,8 +58,6 @@ public function parse($strText) { | |||
} | |||
else { | |||
$strText = preg_replace( | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a syntax error from before you started this patch, I would just comment out $strText by adding //
to the front of it.
src/classes/btmysql.php
Outdated
|
||
} | ||
|
||
public function bindParams($objMySQLiStmt, $arrValues) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
<textarea name='".$componentName."' ".$dispAttributes.">".($componentInfo['value'] ?? '')."</textarea> | ||
</div> | ||
"; | ||
// Output input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
$arrPostSelected['multivote'] = ($_POST['multivote'] == 1) ? " checked" : ""; | ||
$arrPostSelected['displayvoters'] = ($_POST['displayvoters'] == 1) ? " checked" : ""; | ||
|
||
if ($countErrors > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
@@ -178,7 +177,7 @@ | |||
|
|||
"; | |||
|
|||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a typo? If not, then the indentation of the code below it should be reduced.
echo " | ||
</table> | ||
"; | ||
if (count($_SESSION['btPollOptionCache'][$pollObj->cacheID]) > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
echo " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
"sortorder" => $i++, | ||
"value" => $_POST['subject'] | ||
), | ||
"subject" => array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indenting.
Not sure why its moving the { to the next line. I assume its supposed to be this way not with the { on the line below the function line.
managemenu/_functions: fix globals
.idea/.gitignore
Outdated
@@ -0,0 +1,8 @@ | |||
# Default ignored files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably shouldn't have code editor settings files committed to the git repo. The proper way to fix this is...
- cut these files into a file outside the repo (to temporarily get them out of the repo, we'll put them back later)
- commit the file deletions in git (
git commit
) - create a global .gitignore file with the contents
/.idea/
(how to create a global .gitignore: https://stackoverflow.com/a/7335487) - cut and paste the files back to their original spot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sorry.. never used this program before.. Didn't know it'd do that. Thanks for your patience with me and the help with great explanations. I usually use a text editor like nano instead. But figure I should probably try something more capable.
* License: http://www.bluethrust.com/license.php | ||
* | ||
*/ | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is wrong. Needs un-indenting.
* License: http://www.bluethrust.com/license.php | ||
* | ||
*/ | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is wrong. Needs un-indenting.
if(!$numericIDOnly) { | ||
$intIDNum = $this->MySQL->real_escape_string($intIDNum); | ||
$checkID = true; | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is wrong. Needs un-indenting.
* - selectByOrder Method - | ||
* | ||
* Way to select a rank by ordernum. Essentially the same as the normal select method from basic except using the ordernum. | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is wrong. Needs un-indenting.
This PR is getting too big. Please don't add any more files to it. Please instead start using git branches as mentioned above, then submit new PRs for groups of files/changes that make sense to group together. Some examples of reasonable groupings:
To create a new git branch...
Rinse and repeat. Each branch is a snapshot of the file contents at a certain point in time. So if you type |
I can definitely do that. If you like we can just close this PR and I'll resubmit once I've sorted all this out? |
Sure. That will be a lot of work, but if you're willing, that is definitely the most organized way to do it. |
I can try my best. |
I know I'm not the best at handling git stuff.. I've been just going page by page trying to reduce errors and issues.. Restored some functionality that wasn't working like private messages, managing and editing world clocks without error, Some fixes to reduce issues with creating polls.(poll stuff not completely working yet) More to come soon. If you like I will request a pull request for future changes as well. I'm not going to pretend to be an expert but I really want this application to function fully and then can always take it further after that if you like.