Stud.IP  trunk Revision
studip-compat.php File Reference

Variables

 $opts = getopt('fhnoc', ['filenames', 'help', 'non-recursive', 'verbose', 'no-color'])
 
if(isset($opts['h'])||isset($opts['help'])) $args = $_SERVER['argv']
 
 $arg_stop = array_search('--', $args)
 
if($arg_stop !==false) elseif(count($opts)) else
 
 $verbose = isset($opts['v']) || isset($opts['verbose'])
 
 $only_filenames = isset($opts['f']) || isset($opts['filenames'])
 
 $recursive = !(isset($opts['n']) || isset($opts['non-recursive']))
 
 $no_colors = isset($opts['c']) || isset($opts['no-color'])
 
 $version = null
 
 $folders = array_values($args) ?: []
 
if(count($folders) > 0 &&preg_match('/^\d+\.\d+$/', $folders $log [0]))
 
 $log_if
 
 $reduce
 
 $check
 

Variable Documentation

◆ $arg_stop

$arg_stop = array_search('--', $args)

◆ $args

if (isset( $opts[ 'h'])||isset( $opts[ 'help'])) $args = $_SERVER['argv']

◆ $check

$check
Initial value:
= function ($filename) use ($rules) {
$errors = [];
$contents = strtolower(file_get_contents($filename));
foreach ($rules as $needle => $suggestion) {
if (strpos($contents, strtolower($needle)) > 0) {
$errors[$needle] = $suggestion;
}
}
return $errors;
}
if(count($ret)) $filename
Definition: migrate_help_content.php:49

◆ $folders

if (count( $folders)===0) $folders = array_values($args) ?: []

◆ $log

if (count( $folders) > 0 &&preg_match('/^\d+\.\d+$/', $folders $log[0]))

◆ $log_if

$log_if
Initial value:
= function ($condition, $message) use ($log) {
if ($condition) {
call_user_func_array($log, array_slice(func_get_args(), 1));
}
}
if(count($folders) > 0 &&preg_match('/^\d+\.\d+$/', $folders $log[0]))
Definition: studip-compat.php:49
$message
Definition: email_validation.php:89
$condition
Definition: info.php:20

◆ $no_colors

$no_colors = isset($opts['c']) || isset($opts['no-color'])

◆ $only_filenames

$only_filenames = isset($opts['f']) || isset($opts['filenames'])

◆ $opts

$opts = getopt('fhnoc', ['filenames', 'help', 'non-recursive', 'verbose', 'no-color'])

◆ $recursive

$recursive = !(isset($opts['n']) || isset($opts['non-recursive']))

◆ $reduce

$reduce
Initial value:
= function ($folder) {
$folder = str_replace($GLOBALS['STUDIP_BASE_PATH'] . '/', '', $folder);
$folder = str_replace('public/plugins_packages/', '', $folder);
return $folder;
}
$GLOBALS['MVV_STGTEILVERSION']['FASSUNG_TYP']
Definition: mvv_config.php:3
$folder
Definition: index.php:19

◆ $verbose

$verbose = isset($opts['v']) || isset($opts['verbose'])

◆ $version

$version = null

◆ else

if (! $version) elseif (!file_exists(__DIR__ . "/compatibility-rules/studip-{$version}.php")) else
Initial value:
{
$args = array_slice($args, 1)
if(isset($opts['h'])||isset($opts['help'])) $args
Definition: studip-compat.php:27