This commit is contained in:
friendica 2013-02-26 17:33:47 -08:00
commit 0433263866
22 changed files with 10955 additions and 10893 deletions

View file

@ -415,6 +415,9 @@ intval($params['uid']), LOGGER_DEBUG);
call_hooks('enotify_mail', $datarray); call_hooks('enotify_mail', $datarray);
// check whether sending post content in email notifications is allowed
$content_allowed = !get_config('system','enotify_no_content');
// load the template for private message notifications // load the template for private message notifications
$tpl = get_markup_template('email_notify_html.tpl'); $tpl = get_markup_template('email_notify_html.tpl');
$email_html_body = replace_macros($tpl,array( $email_html_body = replace_macros($tpl,array(
@ -432,7 +435,8 @@ intval($params['uid']), LOGGER_DEBUG);
'$thanks' => $datarray['thanks'], '$thanks' => $datarray['thanks'],
'$site_admin' => $datarray['site_admin'], '$site_admin' => $datarray['site_admin'],
'$title' => $datarray['title'], '$title' => $datarray['title'],
'$htmlversion' => $datarray['htmlversion'], '$htmlversion' => $datarray['htmlversion'],
'$content_allowed' => $content_allowed,
)); ));
// load the template for private message notifications // load the template for private message notifications
@ -453,6 +457,7 @@ intval($params['uid']), LOGGER_DEBUG);
'$site_admin' => $datarray['site_admin'], '$site_admin' => $datarray['site_admin'],
'$title' => $datarray['title'], '$title' => $datarray['title'],
'$textversion' => $datarray['textversion'], '$textversion' => $datarray['textversion'],
'$content_allowed' => $content_allowed,
)); ));
// logger('text: ' . $email_text_body); // logger('text: ' . $email_text_body);

View file

@ -426,6 +426,7 @@ function onepoll_run(&$argv, &$argc){
continue; continue;
} }
$datarray['body'] = escape_tags($r['body']); $datarray['body'] = escape_tags($r['body']);
$datarray['body'] = limit_body_size($datarray['body']);
logger("Mail: Importing ".$msg_uid." for ".$mailconf[0]['user']); logger("Mail: Importing ".$msg_uid." for ".$mailconf[0]['user']);

View file

@ -75,6 +75,9 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio
$conv_as = json_decode($conv_as); $conv_as = json_decode($conv_as);
$first_id = ""; $first_id = "";
if (!is_array($conv_as->items))
return;
$items = array_reverse($conv_as->items); $items = array_reverse($conv_as->items);
foreach ($items as $single_conv) { foreach ($items as $single_conv) {

View file

@ -255,6 +255,8 @@ function admin_page_site_post(&$a){
$global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : ''); $global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
$thread_allow = ((x($_POST,'thread_allow')) ? True : False); $thread_allow = ((x($_POST,'thread_allow')) ? True : False);
$newuser_private = ((x($_POST,'newuser_private')) ? True : False); $newuser_private = ((x($_POST,'newuser_private')) ? True : False);
$enotify_no_content = ((x($_POST,'enotify_no_content')) ? True : False);
$no_multi_reg = ((x($_POST,'no_multi_reg')) ? True : False); $no_multi_reg = ((x($_POST,'no_multi_reg')) ? True : False);
$no_openid = !((x($_POST,'no_openid')) ? True : False); $no_openid = !((x($_POST,'no_openid')) ? True : False);
$no_regfullname = !((x($_POST,'no_regfullname')) ? True : False); $no_regfullname = !((x($_POST,'no_regfullname')) ? True : False);
@ -371,6 +373,7 @@ function admin_page_site_post(&$a){
} }
set_config('system','thread_allow', $thread_allow); set_config('system','thread_allow', $thread_allow);
set_config('system','newuser_private', $newuser_private); set_config('system','newuser_private', $newuser_private);
set_config('system','enotify_no_content', $enotify_no_content);
set_config('system','block_extended_register', $no_multi_reg); set_config('system','block_extended_register', $no_multi_reg);
set_config('system','no_openid', $no_openid); set_config('system','no_openid', $no_openid);
@ -505,6 +508,7 @@ function admin_page_site(&$a) {
'$global_directory' => array('directory_submit_url', t("Global directory update URL"), get_config('system','directory_submit_url'), t("URL to update the global directory. If this is not set, the global directory is completely unavailable to the application.")), '$global_directory' => array('directory_submit_url', t("Global directory update URL"), get_config('system','directory_submit_url'), t("URL to update the global directory. If this is not set, the global directory is completely unavailable to the application.")),
'$thread_allow' => array('thread_allow', t("Allow threaded items"), get_config('system','thread_allow'), t("Allow infinite level threading for items on this site.")), '$thread_allow' => array('thread_allow', t("Allow threaded items"), get_config('system','thread_allow'), t("Allow infinite level threading for items on this site.")),
'$newuser_private' => array('newuser_private', t("Private posts by default for new users"), get_config('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")), '$newuser_private' => array('newuser_private', t("Private posts by default for new users"), get_config('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")),
'$enotify_no_content' => array('enotify_no_content', t("Don't include post content in email notifications"), get_config('system','enotify_no_content'), t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")),
'$no_multi_reg' => array('no_multi_reg', t("Block multiple registrations"), get_config('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")), '$no_multi_reg' => array('no_multi_reg', t("Block multiple registrations"), get_config('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
'$no_openid' => array('no_openid', t("OpenID support"), !get_config('system','no_openid'), t("OpenID support for registration and logins.")), '$no_openid' => array('no_openid', t("OpenID support"), !get_config('system','no_openid'), t("OpenID support for registration and logins.")),
@ -690,7 +694,7 @@ function admin_page_users(&$a){
} }
$users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date` $users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`, `user`.`account_expired`
FROM FROM
(SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid` (SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid`
FROM `item` FROM `item`
@ -714,7 +718,7 @@ function admin_page_users(&$a){
t('Normal Account'), t('Normal Account'),
t('Soapbox Account'), t('Soapbox Account'),
t('Community/Celebrity Account'), t('Community/Celebrity Account'),
t('Automatic Friend Account') t('Automatic Friend Account')
); );
$e['page-flags'] = $accounts[$e['page-flags']]; $e['page-flags'] = $accounts[$e['page-flags']];
$e['register_date'] = relative_date($e['register_date']); $e['register_date'] = relative_date($e['register_date']);
@ -752,6 +756,7 @@ function admin_page_users(&$a){
'$block' => t('Block'), '$block' => t('Block'),
'$unblock' => t('Unblock'), '$unblock' => t('Unblock'),
'$siteadmin' => t('Site admin'), '$siteadmin' => t('Site admin'),
'$accountexpired' => t('Account expired'),
'$h_users' => t('Users'), '$h_users' => t('Users'),
'$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account') ), '$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account') ),

View file

@ -84,6 +84,7 @@
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }} {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -70,7 +70,7 @@
<td class='register_date'>$u.register_date</td> <td class='register_date'>$u.register_date</td>
<td class='login_date'>$u.login_date</td> <td class='login_date'>$u.login_date</td>
<td class='lastitem_date'>$u.lastitem_date</td> <td class='lastitem_date'>$u.lastitem_date</td>
<td class='login_date'>$u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td> <td class='login_date'>$u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }} {{ if $u.account_expired }}($accountexpired){{ endif }}</td>
<td class="checkbox"> <td class="checkbox">
{{ if $u.is_admin }} {{ if $u.is_admin }}
&nbsp; &nbsp;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -13,10 +13,12 @@
<tr><td style="padding-top:22px;" colspan="2">$preamble</td></tr> <tr><td style="padding-top:22px;" colspan="2">$preamble</td></tr>
{{ if $content_allowed }}
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="$source_link"><img style="border:0px;width:48px;height:48px;" src="$source_photo"></a></td> <tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="$source_link"><img style="border:0px;width:48px;height:48px;" src="$source_photo"></a></td>
<td style="padding-top:22px;"><a href="$source_link">$source_name</a></td></tr> <td style="padding-top:22px;"><a href="$source_link">$source_name</a></td></tr>
<tr><td style="font-weight:bold;padding-bottom:5px;">$title</td></tr> <tr><td style="font-weight:bold;padding-bottom:5px;">$title</td></tr>
<tr><td style="padding-right:22px;">$htmlversion</td></tr> <tr><td style="padding-right:22px;">$htmlversion</td></tr>
{{ endif }}
<tr><td style="padding-top:11px;" colspan="2">$hsitelink</td></tr> <tr><td style="padding-top:11px;" colspan="2">$hsitelink</td></tr>
<tr><td style="padding-bottom:11px;" colspan="2">$hitemlink</td></tr> <tr><td style="padding-bottom:11px;" colspan="2">$hitemlink</td></tr>
<tr><td></td><td>$thanks</td></tr> <tr><td></td><td>$thanks</td></tr>
@ -25,3 +27,4 @@
</table> </table>
</body> </body>
</html> </html>

View file

@ -1,13 +1,16 @@
$preamble $preamble
{{ if $content_allowed }}
$title $title
$textversion $textversion
{{ endif }}
$tsitelink $tsitelink
$titemlink $titemlink
$thanks $thanks
$site_admin $site_admin

View file

@ -52,12 +52,12 @@
{{include file="field_input.tpl" field=$sitename}} {{include file="field_input.tpl" field=$sitename}}
{{include file="field_textarea.tpl" field=$banner}} {{include file="field_textarea.tpl" field=$banner}}
{{include file="field_select.tpl" field=$language}} {{include file="field_select.tpl" field=$language}}
{{include file="field_select.tpl" field=$theme}} {{include file="field_select.tpl" field=$theme}}
{{include file="field_select.tpl" field=$theme_mobile}} {{include file="field_select.tpl" field=$theme_mobile}}
{{include file="field_select.tpl" field=$ssl_policy}} {{include file="field_select.tpl" field=$ssl_policy}}
{{include file="field_checkbox.tpl" field=$new_share}} {{include file="field_checkbox.tpl" field=$new_share}}
{{include file="field_checkbox.tpl" field=$hide_help}} {{include file="field_checkbox.tpl" field=$hide_help}}
{{include file="field_select.tpl" field=$singleuser}} {{include file="field_select.tpl" field=$singleuser}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
@ -89,6 +89,7 @@
{{include file="field_input.tpl" field=$global_directory}} {{include file="field_input.tpl" field=$global_directory}}
{{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$thread_allow}}
{{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$newuser_private}}
{{include file="field_checkbox.tpl" field=$enotify_no_content}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

View file

@ -75,7 +75,7 @@
<td class='register_date'>{{$u.register_date}}</td> <td class='register_date'>{{$u.register_date}}</td>
<td class='login_date'>{{$u.login_date}}</td> <td class='login_date'>{{$u.login_date}}</td>
<td class='lastitem_date'>{{$u.lastitem_date}}</td> <td class='lastitem_date'>{{$u.lastitem_date}}</td>
<td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}}</td> <td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}} {{if $u.accountexpired}}{{$account_expired}}{{/if}}</td>
<td class="checkbox"> <td class="checkbox">
{{if $u.is_admin}} {{if $u.is_admin}}
&nbsp; &nbsp;

View file

@ -18,10 +18,12 @@
<tr><td style="padding-top:22px;" colspan="2">{{$preamble}}</td></tr> <tr><td style="padding-top:22px;" colspan="2">{{$preamble}}</td></tr>
{{if $content_allowed}}
<tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="{{$source_link}}"><img style="border:0px;width:48px;height:48px;" src="{{$source_photo}}"></a></td> <tr><td style="padding-left:22px;padding-top:22px;width:60px;" valign="top" rowspan=3><a href="{{$source_link}}"><img style="border:0px;width:48px;height:48px;" src="{{$source_photo}}"></a></td>
<td style="padding-top:22px;"><a href="{{$source_link}}">{{$source_name}}</a></td></tr> <td style="padding-top:22px;"><a href="{{$source_link}}">{{$source_name}}</a></td></tr>
<tr><td style="font-weight:bold;padding-bottom:5px;">{{$title}}</td></tr> <tr><td style="font-weight:bold;padding-bottom:5px;">{{$title}}</td></tr>
<tr><td style="padding-right:22px;">{{$htmlversion}}</td></tr> <tr><td style="padding-right:22px;">{{$htmlversion}}</td></tr>
{{/if}}
<tr><td style="padding-top:11px;" colspan="2">{{$hsitelink}}</td></tr> <tr><td style="padding-top:11px;" colspan="2">{{$hsitelink}}</td></tr>
<tr><td style="padding-bottom:11px;" colspan="2">{{$hitemlink}}</td></tr> <tr><td style="padding-bottom:11px;" colspan="2">{{$hitemlink}}</td></tr>
<tr><td></td><td>{{$thanks}}</td></tr> <tr><td></td><td>{{$thanks}}</td></tr>
@ -30,3 +32,4 @@
</table> </table>
</body> </body>
</html> </html>

View file

@ -5,14 +5,17 @@
*}} *}}
{{$preamble}} {{$preamble}}
{{if $content_allowed}}
{{$title}} {{$title}}
{{$textversion}} {{$textversion}}
{{/if}}
{{$tsitelink}} {{$tsitelink}}
{{$titemlink}} {{$titemlink}}
{{$thanks}} {{$thanks}}
{{$site_admin}} {{$site_admin}}

View file

@ -41,6 +41,7 @@
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }} {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -46,6 +46,7 @@
{{include file="field_input.tpl" field=$global_directory}} {{include file="field_input.tpl" field=$global_directory}}
{{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$thread_allow}}
{{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$newuser_private}}
{{include file="field_checkbox.tpl" field=$enotify_no_content}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

View file

@ -41,6 +41,7 @@
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }} {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -46,6 +46,7 @@
{{include file="field_input.tpl" field=$global_directory}} {{include file="field_input.tpl" field=$global_directory}}
{{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$thread_allow}}
{{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$newuser_private}}
{{include file="field_checkbox.tpl" field=$enotify_no_content}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

View file

@ -43,6 +43,7 @@
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }} {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$enotify_no_content }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -48,6 +48,7 @@
{{include file="field_input.tpl" field=$global_directory}} {{include file="field_input.tpl" field=$global_directory}}
{{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$thread_allow}}
{{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$newuser_private}}
{{include file="field_checkbox.tpl" field=$enotify_no_content}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

View file

@ -12,7 +12,12 @@
{{$parent}} {{$parent}}
<div id="prvmail-to-label">{{$to}}</div> <div id="prvmail-to-label">{{$to}}</div>
{{if $showinputs}}
<input type="text" id="recip" name="messagerecip" value="{{$prefill}}" maxlength="255" size="64" tabindex="10" />
<input type="hidden" id="recip-complete" name="messageto" value="{{$preid}}">
{{else}}
{{$select}} {{$select}}
{{/if}}
<div id="prvmail-subject-label">{{$subject}}</div> <div id="prvmail-subject-label">{{$subject}}</div>
<input type="text" size="64" maxlength="255" id="prvmail-subject" name="subject" value="{{$subjtxt}}" {{$readonly}} tabindex="11" /> <input type="text" size="64" maxlength="255" id="prvmail-subject" name="subject" value="{{$subjtxt}}" {{$readonly}} tabindex="11" />

View file

@ -23,7 +23,7 @@
</ul> </ul>
</div> </div>
{{else}} {{else}}
<div class="profile-edit-side-div"><a class="profile-edit-side-link icon edit" title="{{$editprofile}}" href="profiles/{{$profid}}" ></a></div> <div class="profile-edit-side-div"><a class="profile-edit-side-link icon edit" title="{{$editprofile}}" href="profiles" ></a></div>
{{/if}} {{/if}}
</div> </div>