$comp = null; } elseif($core){ $dir = ROOT_PDIR . 'core/'; $configKey = 'core'; $comp = Core::GetComponent('core'); } else{ $dir = null; $configKey = null; $comp = null; } if(!is_dir($dir)){ $arguments->printError('Requested directory does not exist, ' . $dir); $arguments->printUsage(); exit; } // I need to get the list of only PHP, TPL, and XML files. exec("find " . escapeshellarg($dir) . " -type f -regex '.*\\.\\(php\\|tpl\\|xml\\)' -exec egrep -R 'STRING_|MESSAGE_|FORMAT_' {} \\;", $output); $matches = []; foreach($output as $line){ preg_match_all('/([\'"]|t:)((STRING|MESSAGE|FORMAT)_[A-Za-z0-9_ -]*)/', $line, $match); foreach($match[2] as $m){ $m = trim($m); // If the last character of this string is NOT an underscore, then add it to the list. // This is to skip instances where message checks are caught, such as in this exact script! // As above, the exec line will trigger this catch if this check is not in place, giving false positives in the results. if(strrpos($m, '_') + 1 != strlen($m)){
require_once(ROOT_PDIR . 'core/bootstrap.php'); $args = new \Core\CLI\Arguments( [ 'help' => [ 'description' => 'Display help and exit.', 'value' => false, 'shorthand' => ['?', 'h'], ], ] ); $args->processArguments(); if($args->getArgumentValue('help')){ $args->printUsage(); exit; } $dir = BASE_DIR . 'exports/bundles'; $bundles = []; // Build a list of all update sources to begin with. // This is because a bundle can include files from other repositories! CLI::PrintHeader('Loading Remote Repositories'); $sitecount = 0; $remoteThemes = []; $remoteComponents = []; $updatesites = UpdateSiteModel::Find(); if(!sizeof($updatesites)){