Changeset 163 for Dev/trunk/createsurvey.php
- Timestamp:
- 11/18/11 15:28:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/createsurvey.php
r156 r163 8 8 9 9 $dbi = new DatabaseInterface(); 10 $creator_results = $dbi->get("user", array("name" => $_SESSION['username'])); 10 $creator_results = $dbi->get("user", array("name" => $_SESSION['username'])); // Determine if user exists, so we can add him/her as creator of the new survey 11 11 if (count($creator_results) > 0) { 12 12 $creator = $creator_results[0]; … … 18 18 19 19 // Optional part, for when the session needs to be set in pipelineEditor 20 $session_results = $dbi->get("session", array("uid" => $_SESSION['currentSession'])); 21 if ( count($session_results) > 0) {22 $session = $ session_results[0];20 // For now, store in local copy, only upload local copy to db when needed (page change, etc...) 21 if (isset($_SESSION['localSessionCopy']) && !empty($_SESSION['localSessionCopy'])) { 22 $session = $_SESSION['localSessionCopy']; 23 23 $session->pipeline[] = $newSurvey; 24 $ dbi->set($session);24 $_SESSION['localSessionCopy'] = $session; 25 25 } 26 26
Note: See TracChangeset
for help on using the changeset viewer.