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

View File

@@ -341,6 +341,8 @@ function dbesc_array_cb(&$item, $key) {
if(is_string($item)) {
if($item == '0000-00-00 00:00:00' && ACTIVE_DBTYPE == DBTYPE_POSTGRES)
$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);
}
}

View File

@@ -1094,7 +1094,8 @@ function encode_item($item,$mirror = false) {
$x['message_parent'] = $item['thr_parent'];
$x['created'] = $item['created'];
$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['mimetype'] = $item['mimetype'];
$x['title'] = $item['title'];

View File

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