/trunk/main/subprograms/bd |
---|
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/maintenance/qa-monitor/config.inc.php |
---|
13,7 → 13,7 |
parse_config(__DIR__.'/../config/qa-monitor.conf'); |
parse_config(__DIR__.'/../config/urls.conf'); |
$anormale_whois=explode(' ', EXCLUDE_WHOIS); |
$anormale_whois = defined('EXCLUDE_WHOIS') ? explode(' ', EXCLUDE_WHOIS) : array(); |
define('WHOISPING_DB', __DIR__ . '/../.cache/whois-server-ping/whoisping.db'); |
define('DEAD_SERVER_LIST', __DIR__ . '/../config/dead-servers.list'); |
/trunk/maintenance/qa-monitor/whois-ping/showerrors |
---|
20,7 → 20,7 |
if (!is_dir(dirname(WHOISPING_DB))) mkdir(dirname(WHOISPING_DB), 0755, true); |
$db = new SQLite3(WHOISPING_DB); # TODO: in config auslagern |
if (!$db) die ($error); |
if (!$db) die("Cannot open SQLite DB '" . WHOISPING_DB . "'"); |
gwitc_initdb($db); |
/trunk/maintenance/qa-monitor/whois-ping/whoisping |
---|
20,7 → 20,7 |
if (!is_dir(dirname(WHOISPING_DB))) mkdir(dirname(WHOISPING_DB), 0755, true); |
$db = new SQLite3(WHOISPING_DB); # TODO: in config auslagern |
if (!$db) die ($error); |
if (!$db) die("Cannot open SQLite DB '" . WHOISPING_DB . "'"); |
gwitc_initdb($db); |
/trunk/phpstan.neon.dist |
---|
0,0 → 1,22 |
parameters: |
level: 5 |
fileExtensions: |
- gu |
- php |
- phps |
paths: |
- . |
excludePaths: |
analyse: |
- shared/php_includes/idna_convert.class.php |
analyseAndScan: |
- .phpstan.tmp |
tmpDir: .phpstan.tmp |
bootstrapFiles: |
- ./maintenance/qa-monitor/config.inc.php |
ignoreErrors: |
- '#is always (true|false)\.#' |
#- '#Call to function assert\(\) with false will always evaluate to false\.#' |
#- '#with no typehint specified\.#' |
# Bug in PHPstan: If you have function() definitions after exit(), this error comes |
- '#Unreachable statement - code above always terminates.#' |
/trunk/phpstan.sh |
---|
0,0 → 1,25 |
#!/bin/bash |
DIR=$( dirname "$0" ) |
cd "$DIR" |
# There are several PHP scripts which run in CLI and don't have file extensions |
# To check them with PHPstan, we need to temporarily rename them using this script |
array=( $( grep -r "#!" . | grep php | grep -v ".svn" | cut -d ':' -f 1 | sort | uniq ) ) |
for ix in ${!array[*]} |
do |
file="${array[$ix]}" |
mv "$file" "$file.php" |
done |
# TODO: Adjust to your path |
php7 /root/phpstan.phar |
for ix in ${!array[*]} |
do |
file="${array[$ix]}" |
mv "$file.php" "$file" |
done |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/shared/php_includes/common_functions.inc.php |
---|
45,7 → 45,8 |
# http://www.phpeasycode.com/whois/ |
# TODO: code duplicate in maintenance/pattern-generator/generate_newgtld |
function QueryWhoisServer($whoisserver, $domain, $port=43, $timeout=10) { |
$fp = @fsockopen($whoisserver, $port, $errno, $errstr, $timeout) or die("Socket Error " . $errno . " - " . $errstr); |
$fp = @fsockopen($whoisserver, $port, $errno, $errstr, $timeout); |
if (!$fp) die("Socket Error " . $errno . " - " . $errstr); |
// if ($whoisserver == "whois.verisign-grs.com") $domain = "=$domain"; // whois.verisign-grs.com requires the equals sign ("=") or it returns any result containing the searched string. |
fputs($fp, $domain . "\r\n"); |
$out = ""; |
/trunk/shared/php_includes/gwi_functions.inc.php |
---|
45,7 → 45,7 |
$cachefile = $cache_dir . '/' . sha1($url) . '.cache'; |
if (!is_dir($cache_dir)) mkdir($cache_dir, 0755, true); |
if (file_age($cachefile) > $max_age) { |
$cont = file_get_contents($url, 0, $context); |
$cont = file_get_contents($url, false, $context); |
file_put_contents($cachefile, $cont); |
} else { |
$cont = file_get_contents($cachefile); |
/trunk/. |
---|
Property changes: |
Added: svn:ignore |
+.phpstan.tmp |
+phpstan.neon |
+ |