✅ Some more work on unit tests.
Some small improvements for coverage report. Add more functions from include/text.php Update composer dev libraries for phpunit.
This commit is contained in:
@@ -1662,8 +1662,6 @@ function handle_feed($uid, $abook_id, $url) {
|
||||
/**
|
||||
* @brief Return a XML tag with author information.
|
||||
*
|
||||
* @hooks \b atom_author Possibility to add further tags to returned XML string
|
||||
* * \e string The created XML tag as a string without closing tag
|
||||
* @param string $tag The XML tag to create
|
||||
* @param string $nick preferred username
|
||||
* @param string $name displayed name of the author
|
||||
@@ -1672,7 +1670,7 @@ function handle_feed($uid, $abook_id, $url) {
|
||||
* @param int $w image width
|
||||
* @param string $type profile photo mime type
|
||||
* @param string $photo Fully qualified URL to a profile/avator photo
|
||||
* @return string
|
||||
* @return string XML tag
|
||||
*/
|
||||
function atom_author($tag, $nick, $name, $uri, $h, $w, $type, $photo) {
|
||||
$o = '';
|
||||
@@ -1695,6 +1693,11 @@ function atom_author($tag, $nick, $name, $uri, $h, $w, $type, $photo) {
|
||||
$o .= ' <poco:preferredUsername>' . $nick . '</poco:preferredUsername>' . "\r\n";
|
||||
$o .= ' <poco:displayName>' . $name . '</poco:displayName>' . "\r\n";
|
||||
|
||||
/**
|
||||
* @hooks atom_author
|
||||
* Possibility to add further tags to returned XML string.
|
||||
* * \e string The created XML tag as a string without closing tag
|
||||
*/
|
||||
call_hooks('atom_author', $o);
|
||||
|
||||
$o .= "</$tag>\r\n";
|
||||
@@ -1703,17 +1706,23 @@ function atom_author($tag, $nick, $name, $uri, $h, $w, $type, $photo) {
|
||||
}
|
||||
|
||||
|
||||
function atom_render_author($tag,$xchan) {
|
||||
/**
|
||||
* @brief Return an atom tag with author information from an xchan.
|
||||
*
|
||||
* @param string $tag
|
||||
* @param array $xchan
|
||||
* @return string
|
||||
*/
|
||||
function atom_render_author($tag, $xchan) {
|
||||
|
||||
|
||||
$nick = xmlify(substr($xchan['xchan_addr'],0,strpos($xchan['xchan_addr'],'@')));
|
||||
$nick = xmlify(substr($xchan['xchan_addr'], 0, strpos($xchan['xchan_addr'], '@')));
|
||||
$id = xmlify($xchan['xchan_url']);
|
||||
$name = xmlify($xchan['xchan_name']);
|
||||
$photo = xmlify($xchan['xchan_photo_l']);
|
||||
$type = xmlify($xchan['xchan_photo_mimetype']);
|
||||
$w = $h = 300;
|
||||
|
||||
$o .= "<$tag>\r\n";
|
||||
$o = "<$tag>\r\n";
|
||||
$o .= " <as:object-type>http://activitystrea.ms/schema/1.0/person</as:object-type>\r\n";
|
||||
$o .= " <id>$id</id>\r\n";
|
||||
$o .= " <name>$nick</name>\r\n";
|
||||
@@ -1724,13 +1733,16 @@ function atom_render_author($tag,$xchan) {
|
||||
$o .= ' <poco:preferredUsername>' . $nick . '</poco:preferredUsername>' . "\r\n";
|
||||
$o .= ' <poco:displayName>' . $name . '</poco:displayName>' . "\r\n";
|
||||
|
||||
/**
|
||||
* @hooks atom_render_author
|
||||
* Possibility to add further tags to returned XML string.
|
||||
* * \e string The created XML tag as a string without closing tag
|
||||
*/
|
||||
call_hooks('atom_render_author', $o);
|
||||
|
||||
$o .= "</$tag>\r\n";
|
||||
|
||||
return $o;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function compat_photos_list($s) {
|
||||
|
||||
Reference in New Issue
Block a user