projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added quota column on the users page.
[timetracker.git]
/
WEB-INF
/
lib
/
common.lib.php
diff --git
a/WEB-INF/lib/common.lib.php
b/WEB-INF/lib/common.lib.php
index
0e9ff9e
..
f483b3d
100644
(file)
--- a/
WEB-INF/lib/common.lib.php
+++ b/
WEB-INF/lib/common.lib.php
@@
-391,6
+391,14
@@
function ttStartsWith($string, $startString)
return (substr($string, 0, $len) === $startString);
}
return (substr($string, 0, $len) === $startString);
}
+// ttEndsWith functions checks if a string ends with a given substring.
+function ttEndsWith($string, $endString)
+{
+ $len = strlen($endString);
+ if ($len == 0) return true;
+ return (substr($string, -$len) === $endString);
+}
+
// ttDateToUserFormat converts a date from database format to user format.
function ttDateToUserFormat($date)
{
// ttDateToUserFormat converts a date from database format to user format.
function ttDateToUserFormat($date)
{