This commit is contained in:
friendica 2014-11-22 12:26:33 -08:00
commit 86b6861aae
5 changed files with 13 additions and 3 deletions

View File

@ -100,6 +100,8 @@ This document assumes you're an administrator.
the main logs as well. the main logs as well.
[b]system > hide_in_statistics[/b] [b]system > hide_in_statistics[/b]
Tell the red statistics servers to completely hide this hub in hub lists. Tell the red statistics servers to completely hide this hub in hub lists.
[b]system > reserved_channels[/b]
Don't allow members to register channels with this comma separated list of names (no spaces)
#include doc/macros/main_footer.bb; #include doc/macros/main_footer.bb;

View File

@ -341,6 +341,8 @@ function dbesc_array_cb(&$item, $key) {
if(is_string($item)) { if(is_string($item)) {
if($item == '0000-00-00 00:00:00' && ACTIVE_DBTYPE == DBTYPE_POSTGRES) if($item == '0000-00-00 00:00:00' && ACTIVE_DBTYPE == DBTYPE_POSTGRES)
$item = '0001-01-01 00:00:00'; $item = '0001-01-01 00:00:00';
else if($item == '0001-01-01 00:00:00' && ACTIVE_DBTYPE == DBTYPE_MYSQL)
$item = '0000-00-00 00:00:00';
$item = dbesc($item); $item = dbesc($item);
} }
} }

View File

@ -1094,7 +1094,8 @@ function encode_item($item,$mirror = false) {
$x['message_parent'] = $item['thr_parent']; $x['message_parent'] = $item['thr_parent'];
$x['created'] = $item['created']; $x['created'] = $item['created'];
$x['edited'] = $item['edited']; $x['edited'] = $item['edited'];
$x['expires'] = $item['expires']; // always send 0's over the wire
$x['expires'] = (($item['expires'] == '0001-01-01 00:00:00') ? '0000-00-00 00:00:00' : $item['expires']);
$x['commented'] = $item['commented']; $x['commented'] = $item['commented'];
$x['mimetype'] = $item['mimetype']; $x['mimetype'] = $item['mimetype'];
$x['title'] = $item['title']; $x['title'] = $item['title'];

View File

@ -1815,8 +1815,13 @@ function legal_webbie($s) {
function check_webbie($arr) { function check_webbie($arr) {
$str = ''; $reservechan = get_config('system','reserved_channels');
if(strlen($reservechan))
$taken = explode(',', $reservechan);
else
$taken = array(); $taken = array();
$str = '';
if(count($arr)) { if(count($arr)) {
foreach($arr as $x) { foreach($arr as $x) {
$y = legal_webbie($x); $y = legal_webbie($x);

View File

@ -33,7 +33,7 @@ function profile_photo_set_profile_perms($profileid = '') {
if (intval($profile['is_default']) != 1) { if (intval($profile['is_default']) != 1) {
$r0 = q("SELECT channel_hash FROM channel WHERE channel_id = %d LIMIT 1", intval(local_user()) ); $r0 = q("SELECT channel_hash FROM channel WHERE channel_id = %d LIMIT 1", intval(local_user()) );
$r1 = q("SELECT abook.abook_xchan FROM abook WHERE abook_profile = %d ", intval($profile['id'])); //Should not be needed in future. Catches old int-profile-ids. $r1 = q("SELECT abook.abook_xchan FROM abook WHERE abook_profile = '%d' ", intval($profile['id'])); //Should not be needed in future. Catches old int-profile-ids.
$r2 = q("SELECT abook.abook_xchan FROM abook WHERE abook_profile = '%s'", dbesc($profile['profile_guid'])); $r2 = q("SELECT abook.abook_xchan FROM abook WHERE abook_profile = '%s'", dbesc($profile['profile_guid']));
$allowcid = "<" . $r0[0]['channel_hash'] . ">"; $allowcid = "<" . $r0[0]['channel_hash'] . ">";
foreach ($r1 as $entry) { foreach ($r1 as $entry) {