You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/admin/incFunctions.php
+82-14Lines changed: 82 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@
41
41
html_attr_tags_ok($str) -- same as html_attr, but allowing HTML tags
42
42
Notification() -- class for providing a standardized html notifications functionality
43
43
sendmail($mail) -- sends an email using PHPMailer as specified in the assoc array $mail( ['to', 'name', 'subject', 'message', 'debug'] ) and returns true on success or an error message on failure
44
-
safe_html($str) -- sanitize HTML strings, and apply nl2br() to non-HTML ones
44
+
safe_html($str, $noBr = false) -- sanitize HTML strings, and apply nl2br() to non-HTML ones (unless optional 2nd param is passed as true)
45
45
get_tables_info($skip_authentication = false) -- retrieves table properties as a 2D assoc array ['table_name' => ['prop1' => 'val', ..], ..]
46
46
getLoggedMemberID() -- returns memberID of logged member. If no login, returns anonymous memberID
47
47
getLoggedGroupID() -- returns groupID of logged member, or anonymous groupID
@@ -76,6 +76,8 @@
76
76
guessMySQLDateTime($dt) -- if $dt is not already a mysql date/datetime, use mysql_datetime() to convert then return mysql date/datetime. Returns false if $dt invalid or couldn't be detected.
77
77
pkGivenLookupText($val, $tn, $lookupField, $falseIfNotFound) -- returns corresponding PK value for given $val which is the textual lookup value for given $lookupField in given $tn table. If $val has no corresponding PK value, $val is returned as-is, unless $falseIfNotFound is set to true, in which case false is returned.
78
78
userCanImport() -- returns true if user (or his group) can import CSV files (through the permission set in the group page in the admin area).
79
+
bgStyleToClass($html) -- replaces bg color 'style' attr with a class to prevent style loss on xss cleanup.
80
+
assocArrFilter($arr, $func) -- filters provided array using provided callback function. The callback receives 2 params ($key, $value) and should return a boolean.
0 commit comments