diff options
author | redmatrix <git@macgirvin.com> | 2016-06-13 19:58:24 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-13 19:58:24 -0700 |
commit | 1e68d4fb75b9831ed763328b7982e44d1d4cdc5b (patch) | |
tree | 5379f5803f4aa3ec8b5bced6b3151cd08cf89d0f /include/items.php | |
parent | 6d4188f05e2a8e92508b1d38e4b7ef5156ba6c42 (diff) | |
download | volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.tar.gz volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.tar.bz2 volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.zip |
deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication.
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php index 93385c6e6..913ff1573 100755 --- a/include/items.php +++ b/include/items.php @@ -3537,9 +3537,8 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) { intval($item['id']) ); - q("delete from item_id where iid = %d and uid = %d", - intval($item['id']), - intval($item['uid']) + q("delete from iconfig where iid = %d", + intval($item['id']) ); q("delete from term where oid = %d and otype = %d", @@ -4105,6 +4104,23 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C return $items; } +function webpage_to_namespace($webpage) { + + if($webpage == ITEM_TYPE_WEBPAGE) + $page_type = 'WEBPAGE'; + elseif($webpage == ITEM_TYPE_BLOCK) + $page_type = 'BUILDBLOCK'; + elseif($webpage == ITEM_TYPE_PDL) + $page_type = 'PDL'; + elseif($webpage == ITEM_TYPE_DOC) + $page_type = 'docfile'; + else + $page_type = 'unknown'; + return $page_type; + +} + + function update_remote_id($channel,$post_id,$webpage,$pagetitle,$namespace,$remote_id,$mid) { |