@@ 513-530 (lines=18) @@ | ||
510 | } |
|
511 | break; |
|
512 | ||
513 | case ($srcClass == 'Tag'): |
|
514 | if ($navigationPropName == 'Posts') { |
|
515 | $query = "SELECT p . *" |
|
516 | ." FROM wp_posts AS p" |
|
517 | ." INNER JOIN wp_term_relationships AS tr" |
|
518 | ." ON p.ID = tr.object_id" |
|
519 | ." INNER JOIN wp_term_taxonomy AS tt" |
|
520 | ." ON tr.term_taxonomy_id = tt.term_taxonomy_id" |
|
521 | ." WHERE tt.term_id = $sourceEntityInstance->TagID" |
|
522 | ." AND p.post_type = 'post'" |
|
523 | ." AND p.post_status = 'publish'" |
|
524 | ." AND p.ID = ".$namedKeyValues['PostID'][0]; |
|
525 | $stmt = mysql_query($query); |
|
526 | $result = $this->_serializePosts($stmt); |
|
527 | } else { |
|
528 | die('Tag does not have navigation porperty with name: ' . $navigationPropName); |
|
529 | } |
|
530 | break; |
|
531 | ||
532 | case ($srcClass == 'Category'): |
|
533 | if ($navigationPropName == 'Posts') { |
|
@@ 532-549 (lines=18) @@ | ||
529 | } |
|
530 | break; |
|
531 | ||
532 | case ($srcClass == 'Category'): |
|
533 | if ($navigationPropName == 'Posts') { |
|
534 | $query = "SELECT p . *" |
|
535 | ." FROM wp_posts AS p" |
|
536 | ." INNER JOIN wp_term_relationships AS tr" |
|
537 | ." ON p.ID = tr.object_id" |
|
538 | ." INNER JOIN wp_term_taxonomy AS tt" |
|
539 | ." ON tr.term_taxonomy_id = tt.term_taxonomy_id" |
|
540 | ." WHERE tt.term_id = $sourceEntityInstance->CategoryID" |
|
541 | ." AND p.post_type = 'post'" |
|
542 | ." AND p.post_status = 'publish'" |
|
543 | ." AND p.ID = ".$namedKeyValues['PostID'][0]; |
|
544 | $stmt = mysql_query($query); |
|
545 | $result = $this->_serializePosts($stmt); |
|
546 | } else { |
|
547 | die('Category does not have navigation porperty with name: ' . $navigationPropName); |
|
548 | } |
|
549 | break; |
|
550 | ||
551 | case ($srcClass == 'Comment'): |
|
552 | die('Comment does not have navigation porperty with name: ' . $navigationPropName); |