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