summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php')
-rw-r--r--admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php b/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php
index 77e3a2c..07fe361 100644
--- a/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php
+++ b/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php
@@ -38,8 +38,6 @@ class SurveyInvitationsSqualo {
private function checkSqualoEnabled(){
global $mysql_database_name;
global $admin_type;
- global $squalo_user;
- global $squalo_key;
// Zaenkrat imajo squalo samo admini
if($admin_type != 0)
@@ -50,7 +48,7 @@ class SurveyInvitationsSqualo {
return false;
// Zaenkrat imajo squalo samo admini
- if(!isset($squalo_user) || $squalo_user == '' || !isset($squalo_key) || $squalo_key == '')
+ if(AppSettings::getInstance()->getSetting('squalo-user') === false || AppSettings::getInstance()->getSetting('squalo-key') === false)
return false;
return true;
@@ -59,7 +57,7 @@ class SurveyInvitationsSqualo {
// Preverimo ce je squalo vklopljen na anketi
private function checkSqualoActive(){
- $vabila_type = SurveyInfo::getSurveyModules('email');
+ $vabila_type = SurveyInfo::checkSurveyModule('email');
// Vklopljen squalo
if($vabila_type === '2'){
@@ -146,13 +144,14 @@ class SurveyInvitationsSqualo {
//'email' => $sql_row['email'],
'code' => $sql_row['password'],
'password' => $sql_row['password'],
- 'phone' => $sql_row['phone'],
+ //'phone' => $sql_row['phone'],
'custom' => $sql_row['custom'],
'unsubscribe' => $unsubscribe,
);
$recipients[] = array(
'email' => $sql_row['email'],
+ 'phone' => $sql_row['phone'],
'name' => $sql_row['firstname'],
'surname' => $sql_row['lastname'],
'custom_attributes' => $custom_attributes
@@ -254,8 +253,7 @@ class SurveyInvitationsSqualo {
// če mamo personalizirana email vabila, userje dodamo v bazo
if ($individual == 1) {
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
- $db_table = '_active';
+ $db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
$inv_variables_link = array('email'=>'email','geslo'=>'password','ime'=>'firstname','priimek'=>'lastname','naziv'=>'salutation','telefon'=>'phone','drugo'=>'custom','odnos'=>'relation','last_status'=>'last_status','sent'=>'sent','responded'=>'responded','unsubscribed'=>'unsubscribed');
@@ -359,10 +357,11 @@ class SurveyInvitationsSqualo {
foreach($recipients as $recipient){
$email = $recipient['email'];
+ $phone = $recipient['phone'];
$custom_attributes = $recipient['custom_attributes'];
- $recipient_id = $squalo_api->addRecipient($email, $list_id, $custom_attributes);
+ $recipient_id = $squalo_api->addRecipient($email, $phone, $list_id, $custom_attributes);
// Napaka pri ustvarjanju seznama
if($recipient_id == '0'){