diff --git a/doc/html/classRedMatrix_1_1Import_1_1Import.html b/doc/html/classRedMatrix_1_1Import_1_1Import.html new file mode 100644 index 000000000..2119780c3 --- /dev/null +++ b/doc/html/classRedMatrix_1_1Import_1_1Import.html @@ -0,0 +1,447 @@ + + + + + + +The Red Matrix: RedMatrix\Import\Import Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Matrix +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ +
+ All Classes Namespaces Files Functions Variables Pages
+ + +
+ +
+ +
+ +
+
RedMatrix\Import\Import Class Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 get_credentials ()
 
 get_itemlist ()
 
 get_item_ident ($item)
 
 get_item ($item_ident)
 
 get_taxonomy ($item_ident)
 
 get_children ($item_ident)
 
 convert_item ($item_ident)
 
 convert_taxonomy ($item_ident)
 
 convert_child ($child)
 
 store ($item, $update=false)
 
 run ()
 
+ + + + + + + +

+Protected Attributes

 $itemlist = null
 
 $src_items = null
 
 $items = null
 
+ + + +

+Private Attributes

 $credentials = null
 
+

Member Function Documentation

+ +
+
+ + + + + + + + +
RedMatrix\Import\Import::convert_child ( $child)
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + + +
RedMatrix\Import\Import::convert_item ( $item_ident)
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + + +
RedMatrix\Import\Import::convert_taxonomy ( $item_ident)
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + + +
RedMatrix\Import\Import::get_children ( $item_ident)
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + +
RedMatrix\Import\Import::get_credentials ()
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + + +
RedMatrix\Import\Import::get_item ( $item_ident)
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + + +
RedMatrix\Import\Import::get_item_ident ( $item)
+
+ +
+
+ +
+
+ + + + + + + +
RedMatrix\Import\Import::get_itemlist ()
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + + +
RedMatrix\Import\Import::get_taxonomy ( $item_ident)
+
+ +

Referenced by RedMatrix\Import\Import\run().

+ +
+
+ +
+
+ + + + + + + +
RedMatrix\Import\Import::run ()
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
RedMatrix\Import\Import::store ( $item,
 $update = false 
)
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
RedMatrix\Import\Import::$credentials = null
+
+private
+
+
+ +
+
+ + + + + +
+ + + + +
RedMatrix\Import\Import::$itemlist = null
+
+protected
+
+
+ +
+
+ + + + + +
+ + + + +
RedMatrix\Import\Import::$items = null
+
+protected
+
+ +
+
+ +
+
+ + + + + +
+ + + + +
RedMatrix\Import\Import::$src_items = null
+
+protected
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ diff --git a/doc/html/prate_8php.html b/doc/html/prate_8php.html new file mode 100644 index 000000000..926591812 --- /dev/null +++ b/doc/html/prate_8php.html @@ -0,0 +1,137 @@ + + + + + + +The Red Matrix: mod/prate.php File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Matrix +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ +
+ All Classes Namespaces Files Functions Variables Pages
+ + +
+ +
+ +
+ +
+
prate.php File Reference
+
+
+ + + + +

+Functions

 prate_post (&$a)
 
+

Function Documentation

+ +
+
+ + + + + + + + +
prate_post ($a)
+
+ +
+
+
+
+ diff --git a/doc/html/prate_8php.js b/doc/html/prate_8php.js new file mode 100644 index 000000000..60d18fd37 --- /dev/null +++ b/doc/html/prate_8php.js @@ -0,0 +1,4 @@ +var prate_8php = +[ + [ "prate_post", "prate_8php.html#af0e041483d1c6451ef5ce5f295e1dbfd", null ] +]; \ No newline at end of file diff --git a/doc/html/xpoco_8php.html b/doc/html/xpoco_8php.html new file mode 100644 index 000000000..c7c21f6a3 --- /dev/null +++ b/doc/html/xpoco_8php.html @@ -0,0 +1,137 @@ + + + + + + +The Red Matrix: mod/xpoco.php File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Matrix +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ +
+ All Classes Namespaces Files Functions Variables Pages
+ + +
+ +
+ +
+ +
+
xpoco.php File Reference
+
+
+ + + + +

+Functions

 xpoco_init (&$a)
 
+

Function Documentation

+ +
+
+ + + + + + + + +
xpoco_init ($a)
+
+ +
+
+
+
+ diff --git a/doc/html/xpoco_8php.js b/doc/html/xpoco_8php.js new file mode 100644 index 000000000..b46a66f0e --- /dev/null +++ b/doc/html/xpoco_8php.js @@ -0,0 +1,4 @@ +var xpoco_8php = +[ + [ "xpoco_init", "xpoco_8php.html#a715e5b14ad5bd4a6f9c12ddfdcac07c2", null ] +]; \ No newline at end of file diff --git a/include/zot.php b/include/zot.php index 6057bda52..04b6806c2 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1988,13 +1988,23 @@ function sync_locations($sender,$arr,$absolute = false) { } } - if((($r[0]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) && (! $location['primary'])) - || ((! ($r[0]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY)) && ($location['primary']))) { + if(($r[0]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) && (! $location['primary'])) { $m = q("update hubloc set hubloc_flags = (hubloc_flags & ~%d), hubloc_updated = '%s' where hubloc_id = %d", intval(HUBLOC_FLAGS_PRIMARY), dbesc(datetime_convert()), intval($r[0]['hubloc_id']) ); + $r[0]['hubloc_flags'] = $r[0]['hubloc_flags'] ^ HUBLOC_FLAGS_PRIMARY; + hubloc_change_primary($r[0]); + $what .= 'primary_hub '; + $changed = true; + } + elseif((! ($r[0]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY)) && ($location['primary'])) { + $m = q("update hubloc set hubloc_flags = (hubloc_flags | %d), hubloc_updated = '%s' where hubloc_id = %d", + intval(HUBLOC_FLAGS_PRIMARY), + dbesc(datetime_convert()), + intval($r[0]['hubloc_id']) + ); // make sure hubloc_change_primary() has current data $r[0]['hubloc_flags'] = $r[0]['hubloc_flags'] ^ HUBLOC_FLAGS_PRIMARY; hubloc_change_primary($r[0]); @@ -2009,8 +2019,7 @@ function sync_locations($sender,$arr,$absolute = false) { $changed = true; } } - if((($r[0]['hubloc_flags'] & HUBLOC_FLAGS_DELETED) && (! $location['deleted'])) - || ((! ($r[0]['hubloc_flags'] & HUBLOC_FLAGS_DELETED)) && ($location['deleted']))) { + if(($r[0]['hubloc_flags'] & HUBLOC_FLAGS_DELETED) && (! $location['deleted'])) { $n = q("update hubloc set hubloc_flags = (hubloc_flags & ~%d), hubloc_updated = '%s' where hubloc_id = %d", intval(HUBLOC_FLAGS_DELETED), dbesc(datetime_convert()), @@ -2019,6 +2028,15 @@ function sync_locations($sender,$arr,$absolute = false) { $what .= 'delete_hub '; $changed = true; } + elseif((! ($r[0]['hubloc_flags'] & HUBLOC_FLAGS_DELETED)) && ($location['deleted'])) { + $n = q("update hubloc set hubloc_flags = (hubloc_flags | %d), hubloc_updated = '%s' where hubloc_id = %d", + intval(HUBLOC_FLAGS_DELETED), + dbesc(datetime_convert()), + intval($r[0]['hubloc_id']) + ); + $what .= 'delete_hub '; + $changed = true; + } continue; }