Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
b9ea84516f
|
@ -13,6 +13,7 @@ class UsersettingsController extends Zend_Controller_Action
|
||||||
->addActionContext('get-timeline-datatable', 'json')
|
->addActionContext('get-timeline-datatable', 'json')
|
||||||
->addActionContext('set-timeline-datatable', 'json')
|
->addActionContext('set-timeline-datatable', 'json')
|
||||||
->addActionContext('remindme', 'json')
|
->addActionContext('remindme', 'json')
|
||||||
|
->addActionContext('remindme-never', 'json')
|
||||||
->addActionContext('donotshowregistrationpopup', 'json')
|
->addActionContext('donotshowregistrationpopup', 'json')
|
||||||
->initContext();
|
->initContext();
|
||||||
}
|
}
|
||||||
|
@ -88,6 +89,13 @@ class UsersettingsController extends Zend_Controller_Action
|
||||||
Zend_Session::namespaceUnset('referrer');
|
Zend_Session::namespaceUnset('referrer');
|
||||||
Application_Model_Preference::SetRemindMeDate();
|
Application_Model_Preference::SetRemindMeDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function remindmeNeverAction()
|
||||||
|
{
|
||||||
|
Zend_Session::namespaceUnset('referrer');
|
||||||
|
//pass in true to indicate 'Remind me never' was clicked
|
||||||
|
Application_Model_Preference::SetRemindMeDate(true);
|
||||||
|
}
|
||||||
|
|
||||||
public function donotshowregistrationpopupAction()
|
public function donotshowregistrationpopupAction()
|
||||||
{
|
{
|
||||||
|
|
|
@ -587,10 +587,14 @@ class Application_Model_Preference
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetRemindMeDate()
|
public static function SetRemindMeDate($p_never = false)
|
||||||
{
|
{
|
||||||
$weekAfter = mktime(0, 0, 0, gmdate("m"), gmdate("d")+7, gmdate("Y"));
|
if ($p_never) {
|
||||||
self::setValue("remindme", $weekAfter);
|
self::setValue("remindme", -1);
|
||||||
|
} else {
|
||||||
|
$weekAfter = mktime(0, 0, 0, gmdate("m"), gmdate("d")+7, gmdate("Y"));
|
||||||
|
self::setValue("remindme", $weekAfter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetRemindMeDate()
|
public static function GetRemindMeDate()
|
||||||
|
@ -1105,9 +1109,13 @@ class Application_Model_Preference
|
||||||
{
|
{
|
||||||
$today = mktime(0, 0, 0, gmdate("m"), gmdate("d"), gmdate("Y"));
|
$today = mktime(0, 0, 0, gmdate("m"), gmdate("d"), gmdate("Y"));
|
||||||
$remindDate = Application_Model_Preference::GetRemindMeDate();
|
$remindDate = Application_Model_Preference::GetRemindMeDate();
|
||||||
if ($remindDate == NULL || $today >= $remindDate) {
|
$retVal = false;
|
||||||
return true;
|
|
||||||
|
if ($remindDate == NULL || ($remindDate != -1 && $today >= $remindDate)) {
|
||||||
|
$retVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCurrentLibraryTableSetting(){
|
public static function getCurrentLibraryTableSetting(){
|
||||||
|
|
|
@ -26,6 +26,18 @@ $(document).ready(function(){
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "remind_never",
|
||||||
|
text: "Remind me never",
|
||||||
|
click: function() {
|
||||||
|
var url ='/Usersettings/remindme-never';
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
data: {format:"json"}
|
||||||
|
});
|
||||||
|
$(this).dialog("close");
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "help_airtime",
|
id: "help_airtime",
|
||||||
text: "Yes, help Airtime",
|
text: "Yes, help Airtime",
|
||||||
|
|
Loading…
Reference in New Issue