Move NULL_DATE from boot.php to DBA::NULL_DATETIME
- Add DBA::NULL_DATE constant
This commit is contained in:
parent
ca9cad3491
commit
e511790d62
19 changed files with 70 additions and 73 deletions
|
@ -15,9 +15,9 @@ use Friendica\Database\DBA;
|
|||
use Friendica\Model\Event;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Module\Login;
|
||||
|
||||
require_once 'include/items.php';
|
||||
|
||||
|
@ -66,8 +66,8 @@ function events_post(App $a)
|
|||
// The default setting for the `private` field in event_store() is false, so mirror that
|
||||
$private_event = false;
|
||||
|
||||
$start = NULL_DATE;
|
||||
$finish = NULL_DATE;
|
||||
$start = DBA::NULL_DATETIME;
|
||||
$finish = DBA::NULL_DATETIME;
|
||||
|
||||
if ($start_text) {
|
||||
$start = $start_text;
|
||||
|
@ -111,7 +111,7 @@ function events_post(App $a)
|
|||
$a->internalRedirect($onerror_path);
|
||||
}
|
||||
|
||||
if (!$summary || ($start === NULL_DATE)) {
|
||||
if (!$summary || ($start === DBA::NULL_DATETIME)) {
|
||||
notice(L10n::t('Event title and start time are required.') . EOL);
|
||||
if (intval($_REQUEST['preview'])) {
|
||||
echo L10n::t('Event title and start time are required.');
|
||||
|
|
|
@ -18,10 +18,10 @@ use Friendica\Database\DBA;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Module\Login;
|
||||
|
||||
function profiles_init(App $a) {
|
||||
|
||||
|
@ -252,7 +252,7 @@ function profiles_post(App $a) {
|
|||
$with = ((x($_POST,'with')) ? notags(trim($_POST['with'])) : '');
|
||||
|
||||
if (! strlen($howlong)) {
|
||||
$howlong = NULL_DATE;
|
||||
$howlong = DBA::NULL_DATETIME;
|
||||
} else {
|
||||
$howlong = DateTimeFormat::convert($howlong, 'UTC', date_default_timezone_get());
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ function profiles_content(App $a) {
|
|||
'$gender' => ContactSelector::gender($r[0]['gender']),
|
||||
'$marital' => ['selector' => ContactSelector::maritalStatus($r[0]['marital']), 'value' => $r[0]['marital']],
|
||||
'$with' => ['with', L10n::t("Who: \x28if applicable\x29"), strip_tags($r[0]['with']), L10n::t('Examples: cathy123, Cathy Williams, cathy@example.com')],
|
||||
'$howlong' => ['howlong', L10n::t('Since [date]:'), ($r[0]['howlong'] <= NULL_DATE ? '' : DateTimeFormat::local($r[0]['howlong']))],
|
||||
'$howlong' => ['howlong', L10n::t('Since [date]:'), ($r[0]['howlong'] <= DBA::NULL_DATETIME ? '' : DateTimeFormat::local($r[0]['howlong']))],
|
||||
'$sexual' => ['selector' => ContactSelector::sexualPreference($r[0]['sexual']), 'value' => $r[0]['sexual']],
|
||||
'$about' => ['about', L10n::t('Tell us about yourself...'), $r[0]['about']],
|
||||
'$xmpp' => ['xmpp', L10n::t("XMPP \x28Jabber\x29 address:"), $r[0]['xmpp'], L10n::t("The XMPP address will be propagated to your contacts so that they can follow you.")],
|
||||
|
|
|
@ -20,11 +20,10 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Util\Security;
|
||||
use Friendica\Module\Login;
|
||||
|
||||
function get_theme_config_file($theme)
|
||||
{
|
||||
|
@ -830,7 +829,7 @@ function settings_content(App $a)
|
|||
$mail_pubmail = ((DBA::isResult($r)) ? $r[0]['pubmail'] : 0);
|
||||
$mail_action = ((DBA::isResult($r)) ? $r[0]['action'] : 0);
|
||||
$mail_movetofolder = ((DBA::isResult($r)) ? $r[0]['movetofolder'] : '');
|
||||
$mail_chk = ((DBA::isResult($r)) ? $r[0]['last_check'] : NULL_DATE);
|
||||
$mail_chk = ((DBA::isResult($r)) ? $r[0]['last_check'] : DBA::NULL_DATETIME);
|
||||
|
||||
|
||||
$tpl = get_markup_template('settings/connectors.tpl');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue