remove multi-author option, broken
Probably broken since many many s9y versions, but certainly not working in 2.0
This commit is contained in:
parent
c8b4faf93a
commit
55ae435c89
@ -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 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
} 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 @@ class serendipity_plugin_authors extends serendipity_plugin {
|
||||
$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 @@ class serendipity_plugin_authors extends serendipity_plugin {
|
||||
$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 @@ class serendipity_plugin_authors extends serendipity_plugin {
|
||||
} 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 @@ class serendipity_plugin_authors extends serendipity_plugin {
|
||||
|
||||
$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,10 +98,6 @@ class serendipity_plugin_authors extends serendipity_plugin {
|
||||
|
||||
$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>',
|
||||
|
||||
@ -125,10 +105,6 @@ class serendipity_plugin_authors extends serendipity_plugin {
|
||||
ALL_AUTHORS,
|
||||
ALL_AUTHORS
|
||||
);
|
||||
|
||||
if ($is_form) {
|
||||
$html .= '</form>';
|
||||
}
|
||||
print $html;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user