Skip to content
Permalink
Browse files

remove multi-author option, broken

Probably broken since many many s9y versions, but certainly not working in 2.0
  • Loading branch information...
onli committed Jul 26, 2015
1 parent c8b4faf commit 55ae435c898bfcff1a4722a34e25116188a1079c
Showing with 7 additions and 50 deletions.
  1. +5 −23 include/functions_routing.inc.php
  2. +1 −2 index.php
  3. +1 −25 plugins/serendipity_plugin_authors/serendipity_plugin_authors.php
@@ -49,11 +49,6 @@ function locateHiddenVariables($_args) {
$serendipity['GET']['viewAuthor'] = $_GET['viewAuthor'] = (int)$url_author;
unset($_args[$k]);
}
} elseif ($v[0] == 'W') { /* Week */
$week = substr($v, 1);
if (is_numeric($week)) {
unset($_args[$k]);
}
} elseif ($v == 'summary') { /* Summary */
$serendipity['short_archives'] = true;
$serendipity['head_subtitle'] .= SUMMARY . ' - ';
@@ -144,29 +139,16 @@ function serveSearch() {
function serveAuthorPage($matches) {
global $serendipity;
$serendipity['view'] = 'authors';
$is_multiauth = (isset($serendipity['POST']['isMultiAuth']) && is_array($serendipity['POST']['multiAuth']));
if ($is_multiauth) {
$serendipity['GET']['viewAuthor'] = implode(';', $serendipity['POST']['multiAuth']);
$serendipity['uriArguments'][] = PATH_AUTHORS;
$serendipity['uriArguments'][] = serendipity_db_escape_string($serendipity['GET']['viewAuthor']) . '-multi';
} elseif (empty($matches[1]) && preg_match('@/([0-9;]+)@', $uri, $multimatch)) {
$is_multiauth = true;
$serendipity['GET']['viewAuthor'] = $multimatch[1];
} else {
$serendipity['GET']['viewAuthor'] = $matches[1];
}
$serendipity['GET']['viewAuthor'] = $matches[1];
$serendipity['GET']['action'] = 'read';
locateHiddenVariables($serendipity['uriArguments']);
if (!$is_multiauth) {
$matches[1] = serendipity_searchPermalink($serendipity['permalinkAuthorStructure'], implode('/', $serendipity['uriArguments']), $matches[1], 'author');
$serendipity['GET']['viewAuthor'] = $matches[1];
$serendipity['GET']['action'] = 'read';
}
$matches[1] = serendipity_searchPermalink($serendipity['permalinkAuthorStructure'], implode('/', $serendipity['uriArguments']), $matches[1], 'author');
$serendipity['GET']['viewAuthor'] = $matches[1];
$serendipity['GET']['action'] = 'read';
$uInfo = serendipity_fetchUsers($serendipity['GET']['viewAuthor']);
@@ -85,8 +85,7 @@
} else if ((isset($serendipity['POST']['isMultiCat']) && is_array($serendipity['POST']['multiCat'])) ||
preg_match(PAT_PERMALINK_CATEGORIES, $uri, $matches)) {
serveCategory($matches);
} else if ((isset($serendipity['POST']['isMultiAuth']) && is_array($serendipity['POST']['multiAuth'])) ||
preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) {
} else if (preg_match(PAT_PERMALINK_AUTHORS, $uri, $matches)) {
serveAuthorPage($matches);
} else if (preg_match(PAT_SEARCH, $uri, $matches)) {
serveSearch();
@@ -10,7 +10,7 @@ function introspect(&$propbag) {
$propbag->add('description', AUTHOR_PLUGIN_DESC);
$propbag->add('stackable', true);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '2.01');
$propbag->add('version', '2.1');
$propbag->add('configuration', array('image', 'allow_select', 'title', 'showartcount', 'mincount'));
$propbag->add('groups', array('FRONTEND_VIEWS'));
}
@@ -26,13 +26,6 @@ function introspect_config_item($name, &$propbag)
$propbag->add('default', AUTHORS);
break;
case 'allow_select':
$propbag->add('type', 'boolean');
$propbag->add('name', AUTHORS_ALLOW_SELECT);
$propbag->add('description', AUTHORS_ALLOW_SELECT_DESC);
$propbag->add('default', true);
break;
case 'image':
$propbag->add('type', 'string');
$propbag->add('name', XML_IMAGE_TO_DISPLAY);
@@ -71,16 +64,11 @@ function generate_content(&$title) {
} else {
$sort .= ' ' . $this->get_config('sort_method');
}
$is_form = serendipity_db_bool($this->get_config('allow_select'));
$is_count = serendipity_db_bool($this->get_config('showartcount'));
$mincount = (int)$this->get_config('mincount');
$authors = serendipity_fetchUsers(null, 'hidden', $is_count);
$html = '';
if ($is_form) {
$html .= '<form action="' . $serendipity['baseURL'] . $serendipity['indexFile'] . '?frontpage" method="post">';
}
$image = $this->get_config('image', serendipity_getTemplateFile('img/xml.gif'));
$image = (($image == "'none'" || $image == 'none') ? '' : $image);
@@ -100,10 +88,6 @@ function generate_content(&$title) {
$html .= '<li>';
if ($is_form) {
$html .= '<input style="width: 15px" type="checkbox" name="serendipity[multiAuth][]" value="' . $auth['authorid'] . '" />';
}
if ( !empty($image) ) {
$html .= '<a class="serendipity_xml_icon" href="'. serendipity_feedAuthorURL($auth, 'serendipityHTTPPath') .'"><img src="'. $image .'" alt="XML" style="border: 0px" /></a> ';
}
@@ -114,21 +98,13 @@ function generate_content(&$title) {
$html .= '</ul>' . "\n";
if ($is_form) {
$html .= '<div><input type="submit" name="serendipity[isMultiAuth]" value="' . GO . '" /></div>';
}
$html .= sprintf(
'<div><a href="%s" title="%s">%s</a></div>',
$serendipity['serendipityHTTPPath'] . $serendipity['indexFile'],
ALL_AUTHORS,
ALL_AUTHORS
);
if ($is_form) {
$html .= '</form>';
}
print $html;
}
}

0 comments on commit 55ae435

Please sign in to comment.
You can’t perform that action at this time.