Database class integration. Modify database class singular() method to support table names ending in 'ses', such as v_databases.

This commit is contained in:
Nate
2019-07-09 20:06:17 -06:00
parent 2cb44c3b7d
commit fca4691ac6
11 changed files with 287 additions and 340 deletions

View File

@@ -1813,6 +1813,9 @@ include "root.php";
private function singular($word) {
//"-es" is used for words that end in "-x", "-s", "-z", "-sh", "-ch" in which case you add
if (substr($word, -2) == "es") {
if (substr($word, -3) == "ses") {
return rtrim($word, "s");
}
if (substr($word, -3) == "ies") {
return substr($word,0,-3)."y";
}