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

sh_get_last_modified_info($form_id, $submission_id) #9

Open
sf23103 opened this issue Nov 27, 2018 · 3 comments
Open

sh_get_last_modified_info($form_id, $submission_id) #9

sf23103 opened this issue Nov 27, 2018 · 3 comments
Labels

Comments

@sf23103
Copy link

sf23103 commented Nov 27, 2018

I was previously using ft_include_module("submission_history") and sh_get_last_modified_info($form_id, $submission_id) to get info on who last modified a particular submission. Has support for ft_include_module gone away with 3.0? Or is it something that's changed with the submission_history module?

@benkeen
Copy link
Member

benkeen commented Nov 28, 2018

Hey Alex,

Yeah, any of the old ft_* methods were rewritten with FT3 - same with the module methods. It was a biiig rewrite! All methods were rewritten and converted to object oriented code.

Instead of ft_include_module, try:

FormTools\Modules::includeModule("submission_history");

And instead of sh_get_last_modified_info, use:

FormTools\Modules\SubmissionHistory\General::getLastModifiedInfo($form_id, $submission");

Also, if you use the methods a lot, you can just import the namespace to cut down on typing, e.g.:

use FormTools\Modules;
Modules::includeModule("submission_history");

or:

use FormTools\Modules\SubmissionHistory\General;
General::getLastModifiedInfo($form_id, $submission");

@sf23103
Copy link
Author

sf23103 commented Nov 28, 2018

Perfect, that worked great, thanks! I guess I have some reading to do on the object oriented programming. Loving how organized it is though!

While I was hunting down an error on my end, I found the following in /global/code/Database.class.php (line 77):

$query = str_replace('{PREFIX}', $this->table_prefix, $query);
	if (isset($_GET["ben1111"])) {
		echo $query;
		echo "_____________";
	}
	$this->statement = $this->dbh->prepare($query);

Is the ben1111 supposed to be there, or is that a placeholder for something? :-)

@benkeen
Copy link
Member

benkeen commented Nov 28, 2018

Oof, sorry Alex... that was just debugging code from when I was trying to figure out what was going on your system. I thought I removed it all, but I guess this one slipped by... 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants