Commit 53eb8a74de4fcb24364fef47aaa6c362c5a95440
1 parent
f8dd743e
Type: Non-functional change.
Description: Removed unused error message reference. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2847 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
7 additions
and
30 deletions
lib/authentication/Authenticator.inc
| @@ -35,7 +35,7 @@ class Authenticator { | @@ -35,7 +35,7 @@ class Authenticator { | ||
| 35 | * @return array containing userID and authentication status code | 35 | * @return array containing userID and authentication status code |
| 36 | */ | 36 | */ |
| 37 | function login($sUserName, $sPassword) { | 37 | function login($sUserName, $sPassword) { |
| 38 | - global $default, $lang_err_database; | 38 | + global $default; |
| 39 | // initialise return array | 39 | // initialise return array |
| 40 | $aUserDetails = array(); | 40 | $aUserDetails = array(); |
| 41 | 41 |
lib/authentication/DBAuthenticator.inc
| @@ -45,7 +45,6 @@ class DBAuthenticator extends Authenticator { | @@ -45,7 +45,6 @@ class DBAuthenticator extends Authenticator { | ||
| 45 | return false; | 45 | return false; |
| 46 | } | 46 | } |
| 47 | } else { | 47 | } else { |
| 48 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 49 | return false; | 48 | return false; |
| 50 | } | 49 | } |
| 51 | } | 50 | } |
| @@ -58,7 +57,7 @@ class DBAuthenticator extends Authenticator { | @@ -58,7 +57,7 @@ class DBAuthenticator extends Authenticator { | ||
| 58 | * @return array containing the users found | 57 | * @return array containing the users found |
| 59 | */ | 58 | */ |
| 60 | function getUser($sUserName, $aAttributes) { | 59 | function getUser($sUserName, $aAttributes) { |
| 61 | - global $default, $lang_err_database; | 60 | + global $default; |
| 62 | 61 | ||
| 63 | $sql = $default->db; | 62 | $sql = $default->db; |
| 64 | $sQuery = "SELECT "; | 63 | $sQuery = "SELECT "; |
| @@ -77,7 +76,6 @@ class DBAuthenticator extends Authenticator { | @@ -77,7 +76,6 @@ class DBAuthenticator extends Authenticator { | ||
| 77 | } | 76 | } |
| 78 | return $aUserResults; | 77 | return $aUserResults; |
| 79 | } else { | 78 | } else { |
| 80 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 81 | return false; | 79 | return false; |
| 82 | } | 80 | } |
| 83 | } | 81 | } |
| @@ -90,7 +88,7 @@ class DBAuthenticator extends Authenticator { | @@ -90,7 +88,7 @@ class DBAuthenticator extends Authenticator { | ||
| 90 | * @return array containing the users found | 88 | * @return array containing the users found |
| 91 | */ | 89 | */ |
| 92 | function searchUsers($sUserNameSearch, $aAttributes) { | 90 | function searchUsers($sUserNameSearch, $aAttributes) { |
| 93 | - global $default, $lang_err_database; | 91 | + global $default; |
| 94 | 92 | ||
| 95 | $sql = $default->db; | 93 | $sql = $default->db; |
| 96 | $sQuery = "SELECT "; | 94 | $sQuery = "SELECT "; |
| @@ -110,7 +108,6 @@ class DBAuthenticator extends Authenticator { | @@ -110,7 +108,6 @@ class DBAuthenticator extends Authenticator { | ||
| 110 | } | 108 | } |
| 111 | return $aUserResults; | 109 | return $aUserResults; |
| 112 | } else { | 110 | } else { |
| 113 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 114 | return false; | 111 | return false; |
| 115 | } | 112 | } |
| 116 | } | 113 | } |
lib/discussions/DiscussionComment.inc
| @@ -163,10 +163,8 @@ class DiscussionComment { | @@ -163,10 +163,8 @@ class DiscussionComment { | ||
| 163 | $oDiscussionComment->dDate = $sql->f("date"); | 163 | $oDiscussionComment->dDate = $sql->f("date"); |
| 164 | return $oDiscussionComment; | 164 | return $oDiscussionComment; |
| 165 | } | 165 | } |
| 166 | - $_SESSION["errorMessage"] = $lang_err_object_not_exist . "id = " . $iNewCommentID . " table = $default->discussion_comments_table"; | ||
| 167 | return false; | 166 | return false; |
| 168 | } | 167 | } |
| 169 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 170 | return false; | 168 | return false; |
| 171 | } | 169 | } |
| 172 | 170 | ||
| @@ -204,16 +202,14 @@ class DiscussionComment { | @@ -204,16 +202,14 @@ class DiscussionComment { | ||
| 204 | $this->iId = $sql->insert_id(); | 202 | $this->iId = $sql->insert_id(); |
| 205 | return true; | 203 | return true; |
| 206 | } | 204 | } |
| 207 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 208 | return false; | 205 | return false; |
| 209 | 206 | ||
| 210 | } | 207 | } |
| 211 | - $_SESSION["errorMessage"] = $lang_err_object_exists . "id = " . $this->iId . " table = $default->units_table"; | ||
| 212 | return false; | 208 | return false; |
| 213 | } | 209 | } |
| 214 | 210 | ||
| 215 | function update(){ | 211 | function update(){ |
| 216 | - global $default, $lang_err_database, $lang_err_object_key; | 212 | + global $default; |
| 217 | //only update if the object has been stored | 213 | //only update if the object has been stored |
| 218 | if ($this->iId > 0) { | 214 | if ($this->iId > 0) { |
| 219 | $sql = $default->db; | 215 | $sql = $default->db; |
| @@ -230,15 +226,13 @@ class DiscussionComment { | @@ -230,15 +226,13 @@ class DiscussionComment { | ||
| 230 | if ($result) { | 226 | if ($result) { |
| 231 | return true; | 227 | return true; |
| 232 | } | 228 | } |
| 233 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 234 | return false; | 229 | return false; |
| 235 | } | 230 | } |
| 236 | - $_SESSION["errorMessage"] = $lang_err_object_key; | ||
| 237 | return false; | 231 | return false; |
| 238 | } | 232 | } |
| 239 | 233 | ||
| 240 | function delete(){ | 234 | function delete(){ |
| 241 | - global $default, $lang_err_database, $lang_err_object_key; | 235 | + global $default; |
| 242 | 236 | ||
| 243 | // only delete the object if it exists in the database | 237 | // only delete the object if it exists in the database |
| 244 | if ($this->iId > 0) { | 238 | if ($this->iId > 0) { |
| @@ -250,7 +244,6 @@ class DiscussionComment { | @@ -250,7 +244,6 @@ class DiscussionComment { | ||
| 250 | 244 | ||
| 251 | if ($rows > 1) { | 245 | if ($rows > 1) { |
| 252 | // duplicate Thread exists | 246 | // duplicate Thread exists |
| 253 | - $_SESSION["errorMessage"] = "Thread::The Thread id " . $this->iId . " has duplicates!"; | ||
| 254 | return false; | 247 | return false; |
| 255 | } else { | 248 | } else { |
| 256 | $sql = $default->db; | 249 | $sql = $default->db; |
| @@ -258,11 +251,9 @@ class DiscussionComment { | @@ -258,11 +251,9 @@ class DiscussionComment { | ||
| 258 | if ($result) { | 251 | if ($result) { |
| 259 | return true; | 252 | return true; |
| 260 | } | 253 | } |
| 261 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 262 | return false; | 254 | return false; |
| 263 | } | 255 | } |
| 264 | } | 256 | } |
| 265 | - $_SESSION["errorMessage"] = $lang_err_object_key; | ||
| 266 | return false; | 257 | return false; |
| 267 | } | 258 | } |
| 268 | } | 259 | } |
lib/discussions/DiscussionThread.inc
| @@ -159,7 +159,6 @@ class DiscussionThread { | @@ -159,7 +159,6 @@ class DiscussionThread { | ||
| 159 | } | 159 | } |
| 160 | return $sAllCommentID ; | 160 | return $sAllCommentID ; |
| 161 | } | 161 | } |
| 162 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 163 | return false; | 162 | return false; |
| 164 | } else { | 163 | } else { |
| 165 | // No Thread for document | 164 | // No Thread for document |
| @@ -201,10 +200,8 @@ class DiscussionThread { | @@ -201,10 +200,8 @@ class DiscussionThread { | ||
| 201 | return "false"; | 200 | return "false"; |
| 202 | } | 201 | } |
| 203 | } | 202 | } |
| 204 | - $_SESSION["errorMessage"] = $lang_err_object_not_exist . "Document_id = " . $iDocumentID . " table = $default->discussion_threads_table"; | ||
| 205 | return false; | 203 | return false; |
| 206 | } | 204 | } |
| 207 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 208 | return false; | 205 | return false; |
| 209 | } | 206 | } |
| 210 | 207 | ||
| @@ -234,10 +231,8 @@ class DiscussionThread { | @@ -234,10 +231,8 @@ class DiscussionThread { | ||
| 234 | $oDiscussionThread->iNumberOfReplies = $sql->f("replies"); | 231 | $oDiscussionThread->iNumberOfReplies = $sql->f("replies"); |
| 235 | return $oDiscussionThread; | 232 | return $oDiscussionThread; |
| 236 | } | 233 | } |
| 237 | - $_SESSION["errorMessage"] = $lang_err_object_not_exist . "id = " . $iNewThreadID . " table = $default->discussion_threads_table"; | ||
| 238 | return false; | 234 | return false; |
| 239 | } | 235 | } |
| 240 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 241 | return false; | 236 | return false; |
| 242 | } | 237 | } |
| 243 | 238 | ||
| @@ -247,7 +242,6 @@ class DiscussionThread { | @@ -247,7 +242,6 @@ class DiscussionThread { | ||
| 247 | function create(){ | 242 | function create(){ |
| 248 | global $default, $lang_err_database, $lang_err_object_exists; | 243 | global $default, $lang_err_database, $lang_err_object_exists; |
| 249 | //if the object hasn't been created | 244 | //if the object hasn't been created |
| 250 | - $sQuery = "what the hell"; | ||
| 251 | if ($this->iId < 0) { //check to see if entry exists | 245 | if ($this->iId < 0) { //check to see if entry exists |
| 252 | $sql = $default->db; | 246 | $sql = $default->db; |
| 253 | $sQuery = "INSERT INTO " . $default->discussion_threads_table . | 247 | $sQuery = "INSERT INTO " . $default->discussion_threads_table . |
| @@ -259,10 +253,9 @@ class DiscussionThread { | @@ -259,10 +253,9 @@ class DiscussionThread { | ||
| 259 | $this->iId = $sql->insert_id(); | 253 | $this->iId = $sql->insert_id(); |
| 260 | return true; | 254 | return true; |
| 261 | } | 255 | } |
| 262 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 263 | return false; | 256 | return false; |
| 264 | } | 257 | } |
| 265 | - $_SESSION["errorMessage"] = $lang_err_object_exists . "id = " . $this->iId . " table = $default->discussion_threads_table"; | 258 | + |
| 266 | return false; | 259 | return false; |
| 267 | } | 260 | } |
| 268 | 261 | ||
| @@ -288,10 +281,8 @@ class DiscussionThread { | @@ -288,10 +281,8 @@ class DiscussionThread { | ||
| 288 | if ($result) { | 281 | if ($result) { |
| 289 | return true; | 282 | return true; |
| 290 | } | 283 | } |
| 291 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 292 | return false; | 284 | return false; |
| 293 | } | 285 | } |
| 294 | - $_SESSION["errorMessage"] = $lang_err_object_key; | ||
| 295 | return false; | 286 | return false; |
| 296 | } | 287 | } |
| 297 | 288 | ||
| @@ -300,7 +291,7 @@ class DiscussionThread { | @@ -300,7 +291,7 @@ class DiscussionThread { | ||
| 300 | * Delete a thread in the table | 291 | * Delete a thread in the table |
| 301 | */ | 292 | */ |
| 302 | function delete(){ | 293 | function delete(){ |
| 303 | - global $default, $lang_err_database, $lang_err_object_key; | 294 | + global $default; |
| 304 | 295 | ||
| 305 | //only delete the object if it exists in the database | 296 | //only delete the object if it exists in the database |
| 306 | if ($this->iId > 0) { | 297 | if ($this->iId > 0) { |
| @@ -321,11 +312,9 @@ class DiscussionThread { | @@ -321,11 +312,9 @@ class DiscussionThread { | ||
| 321 | if ($result) { | 312 | if ($result) { |
| 322 | return true; | 313 | return true; |
| 323 | } | 314 | } |
| 324 | - $_SESSION["errorMessage"] = $lang_err_database; | ||
| 325 | return false; | 315 | return false; |
| 326 | } | 316 | } |
| 327 | } | 317 | } |
| 328 | - $_SESSION["errorMessage"] = $lang_err_object_key; | ||
| 329 | return false; | 318 | return false; |
| 330 | } | 319 | } |
| 331 | } | 320 | } |