superfluous whitespace cleanup
This commit is contained in:
parent
f4aca35a88
commit
4f99d641c5
@ -112,7 +112,7 @@ class Import extends \Zotlabs\Web\Controller {
|
||||
// print_r($data);
|
||||
|
||||
|
||||
if(! array_key_exists('compatibility,$data)) {
|
||||
if(! array_key_exists('compatibility',$data)) {
|
||||
call_hooks('import_foreign_channel_data',$data);
|
||||
if($data['handled'])
|
||||
return;
|
||||
|
@ -846,7 +846,7 @@ function channel_export_items($channel_id, $start, $finish) {
|
||||
$ret['relocate'] = [ 'channel_address' => $ch['channel_address'], 'url' => z_root()];
|
||||
}
|
||||
|
||||
$r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created",
|
||||
$r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and created >= '%s' and created <= '%s' and resource_type = '' order by created",
|
||||
intval(ITEM_TYPE_POST),
|
||||
intval($channel_id),
|
||||
dbesc($start),
|
||||
|
@ -1220,7 +1220,8 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
if(is_dir($folder)) {
|
||||
if($cloud) {
|
||||
$jsonfilepath = $folder . '/' . get_filename_by_cloudname($json_filename, $channel, $folder);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$jsonfilepath = $folder . '/' . $json_filename;
|
||||
}
|
||||
if(is_file($jsonfilepath)) {
|
||||
@ -1228,7 +1229,8 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
if($cloud) {
|
||||
$contentfilename = get_filename_by_cloudname($metadata['contentfile'], $channel, $folder);
|
||||
$metadata['path'] = $folder . '/' . $contentfilename;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$contentfilename = $metadata['contentfile'];
|
||||
$metadata['path'] = $folder . '/' . $contentfilename;
|
||||
}
|
||||
@ -1240,7 +1242,8 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
if(!$content) {
|
||||
if(is_readable($folder . '/' . $contentfilename)) {
|
||||
$content = '';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
logger('Failed to get file content for ' . $metadata['contentfile']);
|
||||
return false;
|
||||
}
|
||||
@ -1325,7 +1328,8 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
);
|
||||
$arr['mid'] = $arr['parent_mid'] = $iteminfo[0]['mid'];
|
||||
$arr['created'] = $iteminfo[0]['created'];
|
||||
} else { // otherwise, generate the creation times and unique id
|
||||
}
|
||||
else { // otherwise, generate the creation times and unique id
|
||||
$arr['created'] = datetime_convert('UTC', 'UTC');
|
||||
$arr['mid'] = $arr['parent_mid'] = item_message_id();
|
||||
}
|
||||
@ -1348,7 +1352,8 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
// Blocks and pages can have any of the valid mimetypes, but layouts must be text/bbcode
|
||||
if((in_array($element['mimetype'], $mimetypes)) && ($type === 'page' || $type === 'block') ) {
|
||||
$arr['mimetype'] = $element['mimetype'];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$arr['mimetype'] = 'text/bbcode';
|
||||
}
|
||||
|
||||
@ -1362,7 +1367,8 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
|
||||
if($z && (($z[0]['account_roles'] & ACCOUNT_ROLE_ALLOWCODE) || ($z[0]['channel_pageflags'] & PAGE_ALLOWCODE))) {
|
||||
$execflag = true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
logger('Unable to import element "' . $name .'" because AllowCode permission is denied.');
|
||||
notice( t('Unable to import element "' . $name .'" because AllowCode permission is denied.') . EOL);
|
||||
$element['import_success'] = 0;
|
||||
@ -1386,7 +1392,8 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
// don't update if it has the same timestamp as the original
|
||||
if($arr['edited'] > $i[0]['edited'])
|
||||
$x = item_store_update($arr, $execflag);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if(($i) && (intval($i[0]['item_deleted']))) {
|
||||
// was partially deleted already, finish it off
|
||||
q("delete from item where mid = '%s' and uid = %d",
|
||||
@ -1400,12 +1407,12 @@ function scan_webpage_elements($path, $type, $cloud = false) {
|
||||
$item_id = $x['item_id'];
|
||||
update_remote_id($channel, $item_id, $arr['item_type'], $name, $namespace, $remote_id, $arr['mid']);
|
||||
$element['import_success'] = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$element['import_success'] = 0;
|
||||
}
|
||||
|
||||
return $element;
|
||||
|
||||
}
|
||||
|
||||
function get_webpage_elements($channel, $type = 'all') {
|
||||
@ -1501,7 +1508,6 @@ function get_webpage_elements($channel, $type = 'all') {
|
||||
'mid' => $rr['mid'],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($type !== 'all') {
|
||||
@ -1593,7 +1599,8 @@ function create_zip_file($files = array(), $destination = '', $overwrite = false
|
||||
|
||||
// check to make sure the file exists
|
||||
return file_exists($destination);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user