0.8.0.2
This commit is contained in:
@@ -76,6 +76,33 @@ class ProgressBar {
|
||||
// Functions
|
||||
//////////////////////////////////////////
|
||||
|
||||
function globext($array) {
|
||||
$globparts = array();
|
||||
foreach ($array as $ext) {
|
||||
$globstring = "";
|
||||
$parts = str_split($ext);
|
||||
foreach ($parts as $char) {
|
||||
$globstring .= "[".$char.strtoupper($char)."]";
|
||||
}
|
||||
$globparts[] = $globstring;
|
||||
}
|
||||
return "{".implode(",",$globparts)."}";
|
||||
}
|
||||
|
||||
function globstring($array,$base = "*") {
|
||||
if (!is_array($base)) {
|
||||
return $base.".".globext($array);
|
||||
} else {
|
||||
$globparts = array();
|
||||
foreach ($base as $file) {
|
||||
$globparts[] = $file;
|
||||
$globparts[] = strtoupper($file);
|
||||
$globparts[] = ucfirst($file);
|
||||
}
|
||||
return "{".implode(",",$globparts)."}".".".globext($array);
|
||||
}
|
||||
}
|
||||
|
||||
function revise_prefs($array) { // bad practice
|
||||
$prefs_file = "/Users/".get_current_user()."/Library/Preferences/org.profiteroles.Yuba.php";
|
||||
$p = unserialize(file_get_contents($prefs_file));
|
||||
@@ -182,7 +209,7 @@ function shortlabel($pathname, $max = 99) {
|
||||
} else {
|
||||
$return = $basename;
|
||||
}
|
||||
return $return;
|
||||
return str_replace("\r","",$return); // filter out weird carriage returns in Icon filenames
|
||||
}
|
||||
|
||||
function human_filesize($bytes, $decimals = 2) {
|
||||
|
||||
Reference in New Issue
Block a user