aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/ping.php2
-rw-r--r--mod/zentity.php94
2 files changed, 1 insertions, 95 deletions
diff --git a/mod/ping.php b/mod/ping.php
index 1bf0a8840..eb7c9b946 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -158,7 +158,7 @@ function ping_init(&$a) {
$t5 = dba_timer();
$events = q("SELECT count(`event`.`id`) as total, type, start, adjust FROM `event`
- WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and ignore = 0
+ WHERE `event`.`uid` = %d AND `start` < '%s' AND `finish` > '%s' and `ignore` = 0
ORDER BY `start` ASC ",
intval(local_user()),
dbesc(datetime_convert('UTC','UTC','now + 7 days')),
diff --git a/mod/zentity.php b/mod/zentity.php
index 969d731dd..274c5f28c 100644
--- a/mod/zentity.php
+++ b/mod/zentity.php
@@ -73,100 +73,6 @@ function zentity_post(&$a) {
return;
}
-
-
-
-
- $user = $result['user'];
-
- $using_invites = get_config('system','invitation_only');
- $num_invites = get_config('system','number_invites');
- $invite_id = ((x($_POST,'invite_id')) ? notags(trim($_POST['invite_id'])) : '');
-
-
- if( $a->config['register_policy'] == REGISTER_OPEN ) {
-
- if($using_invites && $invite_id) {
- q("delete * from register where hash = '%s' limit 1", dbesc($invite_id));
- set_pconfig($user['uid'],'system','invites_remaining',$num_invites);
- }
-
- $email_tpl = get_intltext_template("register_open_eml.tpl");
- $email_tpl = replace_macros($email_tpl, array(
- '$sitename' => $a->config['sitename'],
- '$siteurl' => $a->get_baseurl(),
- '$username' => $user['username'],
- '$email' => $user['email'],
- '$password' => $result['password'],
- '$uid' => $user['uid'] ));
-
- $res = mail($user['email'], sprintf(t('Registration details for %s'), $a->config['sitename']),
- $email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
- . 'Content-type: text/plain; charset=UTF-8' . "\n"
- . 'Content-transfer-encoding: 8bit' );
-
-
- if($res) {
- info( t('Registration successful. Please check your email for further instructions.') . EOL ) ;
- goaway(z_root());
- }
- }
- elseif($a->config['register_policy'] == REGISTER_APPROVE) {
-
- if(! strlen($a->config['admin_email'])) {
- notice( t('Your registration can not be processed.') . EOL);
- goaway(z_root());
- }
-
- $hash = random_string();
- $r = q("INSERT INTO `register` ( `hash`, `created`, `uid`, `password`, `language` ) VALUES ( '%s', '%s', %d, '%s', '%s' ) ",
- dbesc($hash),
- dbesc(datetime_convert()),
- intval($user['uid']),
- dbesc($result['password']),
- dbesc($a->language)
- );
-
- $r = q("SELECT `language` FROM `user` WHERE `email` = '%s' LIMIT 1",
- dbesc($a->config['admin_email'])
- );
- if(count($r))
- push_lang($r[0]['language']);
- else
- push_lang('en');
-
- if($using_invites && $invite_id) {
- q("delete * from register where hash = '%s' limit 1", dbesc($invite_id));
- set_pconfig($user['uid'],'system','invites_remaining',$num_invites);
- }
-
- $email_tpl = get_intltext_template("register_verify_eml.tpl");
- $email_tpl = replace_macros($email_tpl, array(
- '$sitename' => $a->config['sitename'],
- '$siteurl' => $a->get_baseurl(),
- '$username' => $user['username'],
- '$email' => $user['email'],
- '$password' => $result['password'],
- '$uid' => $user['uid'],
- '$hash' => $hash
- ));
-
- $res = mail($a->config['admin_email'], sprintf(t('Registration request at %s'), $a->config['sitename']),
- $email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
- . 'Content-type: text/plain; charset=UTF-8' . "\n"
- . 'Content-transfer-encoding: 8bit' );
-
- pop_lang();
-
- if($res) {
- info( t('Your registration is pending approval by the site owner.') . EOL ) ;
- goaway(z_root());
- }
-
- }
-
return;
}