diff --git a/db/StoredFunctions.sql b/db/StoredFunctions.sql index 9d0f14d1ff2300780d61672a88d5304027ac9f27..c68a577836eb0552fc262b22c45b4148475797c9 100644 --- a/db/StoredFunctions.sql +++ b/db/StoredFunctions.sql @@ -243,16 +243,6 @@ END // # Label: semesters # ------------------------------------------------------------------------------------------- -# TODO: deprecated -# set current(for user) semester, life time - db session -DROP FUNCTION IF EXISTS SetSemesterID// -CREATE FUNCTION `SetSemesterID` (`pSemesterID` INT) RETURNS int(11) - NO SQL -BEGIN - SET @CurrentSemesterID := pSemesterID; - RETURN 0; -END // - # ------------------------------------------------------------------------------------------- diff --git a/~dev_rating/modules/account/classes/Kohana/User.php b/~dev_rating/modules/account/classes/Kohana/User.php index 399673809fc5d269f8ff75ac95a1a447dfc15d33..9bafaa44f3d60e89370f4ac371f4271a6658b382 100644 --- a/~dev_rating/modules/account/classes/Kohana/User.php +++ b/~dev_rating/modules/account/classes/Kohana/User.php @@ -82,10 +82,7 @@ class Kohana_User implements ArrayAccess } public function SetSemester($semesterID) { - $res = $this->_model->SetSemesterID($semesterID); - if ($res >= 0) { - $this->_session->set("SemesterID", "$semesterID"); - } + $this->_session->set("SemesterID", "$semesterID"); } diff --git a/~dev_rating/modules/account/classes/Model/Kohana/Account.php b/~dev_rating/modules/account/classes/Model/Kohana/Account.php index b6c73ea9340b034aa5f0002058b977998c1b92d0..a76778ca07dd530ce56e9310d00afb8fb18df03e 100644 --- a/~dev_rating/modules/account/classes/Model/Kohana/Account.php +++ b/~dev_rating/modules/account/classes/Model/Kohana/Account.php @@ -242,15 +242,4 @@ class Model_Kohana_Account extends Model return $id; } - public function SetSemesterID($semesterID) - { - $sql = "SELECT `SetSemesterID`('$semesterID') AS `Num`; "; - $res = DB::query(Database::SELECT, $sql)->execute(); - - $id = 0; - foreach ($res as $value) { - $id = $value['Num']; - } - return $id; - } } \ No newline at end of file