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

Hi Tommy #1

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Hi Tommy #1

wants to merge 13 commits into from

Conversation

mjdewitt
Copy link

Looks like Gmail doesn't like gzip files and so I created this. I'm not sure if you got my email as it bounced back due to a policy violation.

think it's just about ready for someone else to take a look at it to see what makes sense and what doesn't. There are some things like the DataTables based table browser which is nice to have right in the plugin, but the server side PHP script depends on PHP-PDO extension which everyone may not have.

About skipping columns:

 //   echo '<br>search is '.$search_string;
      // check column definition to see if it is searchable
 foreach ( $row as $k => $v ) {
  if (!preg_match('/^(CHAR|VARCHAR|TINYTEXT|TEXT|MEDIUMTEXT|LONGTEXT)/i',$column_type[$k])) {
   //  if ($_POST['debug']) printf(__('<br>do_change: Skipping column %1$s with column type %2$s','auto-domain-change').'', $k,$column_type[$k]);
   continue;
  }
  // check and see if search is in column data
  if (!preg_match($search_string,$v)) {
   //if ($_POST['debug']) printf(__('<br>do_change: Skipping column %1$s with no match on domain %2$s','auto-domain-change').'', $k,$old);
   continue;
  }

basically, since every column was being sent to processValue, I thought it made sense to do two checks before doing so: make sure the column is text-based, and two, before processValue has to rip through some of the huge serialized data, do a quick check and see if the domain/search string is at least in there.

There is still some slop in there, but I agree with you that it probably makes sense to focus on fixes first. I think that processvalue() and replace() are good to go. do_change() has a bunch of enhancements. All of the upfront "analysis/reporting" features are all fairly modular with individual methods (the JS a bit less so).

So, let me know what you think of this.

Best,

Mike

Mike

fixed hard coded dir path to ssp
Fixed processValue as it wasn't keeping track of serialized objects. If an object is detected, $object is set and used at the end of the iteration to cast data as a std object.
to avoid need to load pluggable and make sure its functions were available.  Also bootstrap itself was loaded.
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

Successfully merging this pull request may close these issues.

1 participant