Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts: include/identity.php
This commit is contained in:
commit
d93e1c84ac
@ -594,14 +594,17 @@ function identity_basic_export($channel_id, $items = false) {
|
|||||||
|
|
||||||
/** @warning this may run into memory limits on smaller systems */
|
/** @warning this may run into memory limits on smaller systems */
|
||||||
|
|
||||||
/** export one year of posts. If you want to export and import all posts you have to start with
|
|
||||||
|
/** export three months of posts. If you want to export and import all posts you have to start with
|
||||||
* the first year and export/import them in ascending order.
|
* the first year and export/import them in ascending order.
|
||||||
|
*
|
||||||
|
* Don't export linked resource items. we'll have to pull those out separately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created > %s - INTERVAL %s",
|
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created > %s - INTERVAL %s and resource_type = '' order by created",
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
db_utcnow(),
|
db_utcnow(),
|
||||||
db_quoteinterval('1 YEAR')
|
db_quoteinterval('3 MONTH')
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
$ret['item'] = array();
|
$ret['item'] = array();
|
||||||
@ -635,7 +638,7 @@ function identity_export_year($channel_id,$year,$month = 0) {
|
|||||||
else
|
else
|
||||||
$maxdate = datetime_convert('UTC','UTC',$year+1 . '-01-01 00:00:00');
|
$maxdate = datetime_convert('UTC','UTC',$year+1 . '-01-01 00:00:00');
|
||||||
|
|
||||||
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' order by created",
|
$r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created",
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
dbesc($mindate),
|
dbesc($mindate),
|
||||||
dbesc($maxdate)
|
dbesc($maxdate)
|
||||||
@ -649,7 +652,6 @@ function identity_export_year($channel_id,$year,$month = 0) {
|
|||||||
$ret['item'][] = encode_item($rr,true);
|
$ret['item'][] = encode_item($rr,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d
|
$r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d
|
||||||
and item.created >= '%s' and item.created < '%s' order by created ",
|
and item.created >= '%s' and item.created < '%s' order by created ",
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
|
Reference in New Issue
Block a user