Skip to content

Commit

Permalink
Merge branch 'master' into 192_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TMSWhite committed Jun 3, 2012
2 parents 170874d + a9dadf6 commit b32b38c
Show file tree
Hide file tree
Showing 12 changed files with 3,858 additions and 3,718 deletions.
23 changes: 12 additions & 11 deletions admin/install/create-postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ CREATE TABLE prefix_survey_permissions (
CONSTRAINT prefix_survey_permissions_pkey PRIMARY KEY (sid,uid,permission)
);


--
-- Table structure for table user_groups
--
Expand All @@ -382,7 +382,8 @@ CREATE TABLE prefix_user_groups (
--
CREATE TABLE prefix_user_in_groups (
ugid integer NOT NULL,
uid integer NOT NULL
uid integer NOT NULL,
CONSTRAINT prefix_user_in_groups_pkey PRIMARY KEY (ugid,uid)
);


Expand Down Expand Up @@ -433,7 +434,7 @@ CREATE TABLE prefix_participants (
"lastname" character varying( 40 ) DEFAULT NULL,
"email" character varying( 80 ) DEFAULT NULL,
"language" character varying( 2 ) DEFAULT NULL,
"blacklisted" character( 1 ) DEFAULT NULL,
"blacklisted" character( 1 ) NOT NULL,
"owner_uid" integer NOT NULL
);

Expand All @@ -444,7 +445,7 @@ CREATE TABLE prefix_participants (
CREATE TABLE prefix_participant_attribute (
"participant_id" character varying( 50 ) NOT NULL,
"attribute_id" integer NOT NULL,
"value" integer NOT NULL,
"value" value character varying(50) NOT NULL,
CONSTRAINT prefix_participant_attribut_pkey PRIMARY KEY (participant_id,attribute_id)
);

Expand All @@ -454,18 +455,19 @@ CREATE TABLE prefix_participant_attribute (
--
CREATE TABLE prefix_participant_attribute_names (
"attribute_id" serial NOT NULL,
"attribute_type" character varying( 30 ) NOT NULL,
"attribute_type" character varying( 4 ) NOT NULL,
"visible" character varying( 5 ) NOT NULL,
CONSTRAINT prefix_participant_attribute_names_pkey PRIMARY KEY (attribute_id, attribute_type)
);
--
-- Table structure for table participant_attribute_lang
--
CREATE TABLE prefix_participant_attribute_names_lang (
"id" serial PRIMARY KEY NOT NULL,
"id" integer NOT NULL,
"attribute_id" integer NOT NULL,
"attribute_name" character varying( 30 ) NOT NULL,
"lang" character varying( 20 ) NOT NULL
"lang" character varying( 20 ) NOT NULL,
CONSTRAINT prefix_participant_attribute_names_lang_pkey PRIMARY KEY (attribute_id, lang)
);
--
-- Table structure for table participant_attribute_values
Expand All @@ -480,10 +482,10 @@ CREATE TABLE prefix_participant_attribute_values (
--
CREATE TABLE prefix_participant_shares (
"participant_id" character varying( 50 ) NOT NULL,
"shared_uid" integer NOT NULL,
"date_added" date NOT NULL,
"share_uid" integer NOT NULL,
"date_added" timestamp NOT NULL,
"can_edit" character varying( 5 ) NOT NULL,
CONSTRAINT prefix_participant_shares_pkey PRIMARY KEY (participant_id,shared_uid)
CONSTRAINT prefix_participant_shares_pkey PRIMARY KEY (participant_id,share_uid)
);


Expand Down Expand Up @@ -533,7 +535,6 @@ create index questions_idx2 on prefix_questions (sid);
create index questions_idx3 on prefix_questions (gid);
create index quota_idx2 on prefix_quota (sid);
create index saved_control_idx2 on prefix_saved_control (sid);
create index user_in_groups_idx1 on prefix_user_in_groups (ugid, uid);
create index parent_qid_idx on prefix_questions (parent_qid);


Expand Down
2 changes: 1 addition & 1 deletion admin/update/upgrade-mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ function upgrade_token_tables134()
{
global $modifyoutput,$dbprefix;
$surveyidquery = "SHOW TABLES LIKE '".$dbprefix."tokens%'";
$surveyidresult = db_execute_assoc($surveyidquery);
$surveyidresult = db_execute_num($surveyidquery);
if (!$surveyidresult) {return "Database Error";}
else
{
Expand Down
24 changes: 20 additions & 4 deletions classes/expressions/LimeExpressionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1025,23 +1025,39 @@ public function _CreateSubQLevelRelevanceAndValidationEqns($onlyThisQseq=NULL)
foreach ($cascadedAF as $_caf)
{
$sgq = ((isset($this->qcode2sgq[$_caf])) ? $this->qcode2sgq[$_caf] : $_caf);
$af_names[] = $sgq . substr($sq['sqsuffix'],1);;
$sgq .= substr($sq['sqsuffix'],1);
if (isset($this->knownVars[$sgq]))
{
$af_names[] = $sgq . '.NAOK';
}
}
foreach ($cascadedAFE as $_cafe)
{
$sgq = ((isset($this->qcode2sgq[$_cafe])) ? $this->qcode2sgq[$_cafe] : $_cafe);
$afe_names[] = $sgq . substr($sq['sqsuffix'],1);;
$sgq .= substr($sq['sqsuffix'],1);
if (isset($this->knownVars[$sgq]))
{
$afe_names[] = $sgq . '.NAOK';
}
}
}
else
{
foreach ($cascadedAF as $_caf)
{
$af_names[] = $_caf . $sq['sqsuffix'];
$sgq = $_caf . $sq['sqsuffix'];
if (isset($this->knownVars[$sgq]))
{
$af_names[] = $sgq . '.NAOK';
}
}
foreach ($cascadedAFE as $_cafe)
{
$afe_names[] = $_cafe . $sq['sqsuffix'];
$sgq = $_cafe . $sq['sqsuffix'];
if (isset($this->knownVars[$sgq]))
{
$afe_names[] = $sgq . '.NAOK';
}
}
}
break;
Expand Down

0 comments on commit b32b38c

Please sign in to comment.