Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Option to return titles or not in discover. Also fixes the reference …

…database for the relmes
  • Loading branch information...
commit 4ce71d853f8a84ea5f8fc2f29af98bc6c20de004 1 parent f460037
@themattharris authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/anyauth.php
View
10 lib/anyauth.php
@@ -24,7 +24,7 @@ function printError() {
function process_rels() {
foreach ( $this->source_rels as $url => $text ) {
- $othermes = $this->discover( $url );
+ $othermes = $this->discover( $url, false );
if ( in_array( $this->user_url, $othermes ) ) {
$this->matched_rel = $url;
return true;
@@ -40,7 +40,7 @@ function process_rels() {
* @return array of rel="me" urls for the given source URL
* @author Matt Harris
*/
- function discover($source_url) {
+ function discover($source_url, $titles=true) {
self::curl($source_url, $response);
$simple_xml_element = self::toXML($response);
@@ -75,7 +75,11 @@ function discover($source_url) {
if (empty($url))
continue;
$title = empty($title) ? $url : $title;
- $urls[ $url ] = $title;
+ if ( $titles ) {
+ $urls[ $url ] = $title;
+ } else {
+ $urls[] = $url;
+ }
}
return $urls;
}
Please sign in to comment.
Something went wrong with that request. Please try again.