PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wp-google-maps
/
includes
<?php class IntegrityChecker { public function __construct() { } /** * Recursive glob. This function is used to match files given the specified pattern, recursively. * @todo Put this somewhere standardised, this is copied (WET) from the ScriptLoader * @param string $pattern The pattern to match * @param int $flags Flags to pass to glob * @return string[] An array of matching files. * @see http://php.net/manual/en/function.glob.php */ protected function rglob($pattern, $flags = 0) { $files = glob($pattern, $flags); foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) { $files = array_merge($files, $this->rglob($dir.'/'.basename($pattern), $flags)); } return $files; } public function record($dir, $pattern="*.php") { $dst = "$dir/integrity.json"; $files = $this->rglob("$dir/$pattern"); $json = (object)array('files' => array()); foreach($files as $filename) { $src = file_get_contents($filename); $crc = crc32($src); $json->records []= array( 'file' => preg_replace('#.+includes#', '', $filename), 'crc32' => $crc ); } file_put_contents($dst, json_encode($json)); } public function check($dir) { $src = "$dir/integrity.json"; if(!file_exists($src)) { trigger_error("Integrity records missing", E_USER_WARNING); return false; } $json = json_decode( file_get_contents($src) ); foreach($json->records as $record) { $filename = "$dir/{$record->file}"; if(!file_exists($filename)) { trigger_error("File in integrity record missing ({$record->file})", E_USER_WARNING); return false; } $src = file_get_contents($filename); $crc = crc32($src); if($crc != $record->crc32) { trigger_error("File integrity check failed ({$record->file})", E_USER_WARNING); return false; } } return true; } }
[-] class.admin-ui.php
[edit]
[+]
3rd-party-integration
[-] class.latlng.php
[edit]
[-] class.map.php
[edit]
[-] class.admin-notices.php
[edit]
[-] class.dom-query-results.php
[edit]
[-] class.pointlabel.php
[edit]
[-] class.upgrader.php
[edit]
[-] class.map-list-page.php
[edit]
[-] class.integrity-checker.php
[edit]
[-] class.dom-document.php
[edit]
[-] class.crud.php
[edit]
[+]
styling
[-] class.dynamic-translations.php
[edit]
[-] class.strings.php
[edit]
[-] class.library-script-panel.php
[edit]
[+]
open-layers
[-] class.maps-engine-dialog.php
[edit]
[+]
compat
[-] class.plugin.php
[edit]
[-] class.theme-panel.php
[edit]
[-] class.global-settings.php
[edit]
[+]
google-maps
[-] class.query.php
[edit]
[-] class.modal-dialog.php
[edit]
[-] class.script-loader.php
[edit]
[-] class.internal-engine.php
[edit]
[-] class.selector-to-xpath.php
[edit]
[-] class.polygon.php
[edit]
[-] class.rectangle.php
[edit]
[-] class.system-info.php
[edit]
[-] class.shortcodes.php
[edit]
[-] class.gdpr-compliance.php
[edit]
[+]
php8
[-] build.log
[edit]
[+]
tables
[-] class.polyline.php
[edit]
[-] class.settings.php
[edit]
[-] class.store-locator.php
[edit]
[-] class.country-select.php
[edit]
[-] class.settings-page.php
[edit]
[-] class.dom-element.php
[edit]
[+]
..
[-] class.elias-fano.php
[edit]
[-] class.distance.php
[edit]
[-] class.auto-loader.php
[edit]
[-] class.circle.php
[edit]
[-] class.page.php
[edit]
[-] class.component-anchor-control.php
[edit]
[+]
map-edit-page
[-] class.feature.php
[edit]
[-] class.marker.php
[edit]
[-] class.database.php
[edit]
[-] class.marker-filter.php
[edit]
[-] class.google-maps-api-loader.php
[edit]
[-] class.factory.php
[edit]
[+]
legacy
[-] class.installer-page.php
[edit]
[-] class.query-fragment.php
[edit]