0.7.5
This commit is contained in:
@@ -9,7 +9,7 @@ class ProgressBar {
|
||||
protected static $total = 0;
|
||||
|
||||
public static function display($message = null) {
|
||||
$string = "PROGRESS:".round((self::$done/self::$total)*100,2);
|
||||
$string = "PROGRESS:".floor((self::$done/self::$total)*100);
|
||||
if ($message) {
|
||||
return "\n".$string."\n".$message;
|
||||
} elseif (!strpos(__FILE__,".app")) {
|
||||
@@ -50,6 +50,10 @@ function getParents($zpath, $pathname) {
|
||||
}
|
||||
*/
|
||||
|
||||
function stringPrint($string) {
|
||||
echo $string.@str_repeat(" ", (10-strlen($string)));
|
||||
}
|
||||
|
||||
function shortlabel($pathname, $max = 99, $pad = false) {
|
||||
$basename = basename($pathname);
|
||||
$suffix = "(...).".pathinfo($basename,PATHINFO_EXTENSION);
|
||||
@@ -58,6 +62,9 @@ function shortlabel($pathname, $max = 99, $pad = false) {
|
||||
} else {
|
||||
$return = $basename;
|
||||
}
|
||||
if ($pad) {
|
||||
$return = $return.@str_repeat(" ", ($max-strlen($return)));
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user