本文整理汇总了PHP中has_single_author函数的典型用法代码示例。如果您正苦于以下问题:PHP has_single_author函数的具体用法?PHP has_single_author怎么用?PHP has_single_author使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了has_single_author函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: link_multiedit_form
function link_multiedit_form($page, $sort, $dir, $crit, $search_method)
{
global $all_link_cats, $all_link_authors;
$categories = $all_link_cats ? treeSelectInput('category', $all_link_cats, '') : '';
$authors = $all_link_authors ? selectInput('author', $all_link_authors, '', true) : '';
$methods = array('changecategory' => array('label' => gTxt('changecategory'), 'html' => $categories), 'changeauthor' => array('label' => gTxt('changeauthor'), 'html' => $authors), 'delete' => gTxt('delete'));
if (!$categories) {
unset($methods['changecategory']);
}
if (has_single_author('txp_link')) {
unset($methods['changeauthor']);
}
if (!has_privs('link.delete.own') && !has_privs('link.delete')) {
unset($methods['delete']);
}
return multi_edit($methods, 'link', 'link_multi_edit', $page, $sort, $dir, $crit, $search_method);
}
示例2: file_multiedit_form
function file_multiedit_form($page, $sort, $dir, $crit, $search_method)
{
$methods = array('changecategory' => gTxt('changecategory'), 'changeauthor' => gTxt('changeauthor'), 'delete' => gTxt('delete'));
if (has_single_author('txp_file')) {
unset($methods['changeauthor']);
}
if (!has_privs('file.delete.own') && !has_privs('file.delete')) {
unset($methods['delete']);
}
return event_multiedit_form('file', $methods, $page, $sort, $dir, $crit, $search_method);
}
示例3: file_multiedit_form
function file_multiedit_form($page, $sort, $dir, $crit, $search_method)
{
global $file_statuses, $all_file_cats, $all_file_authors;
$categories = $all_file_cats ? treeSelectInput('category', $all_file_cats, '') : '';
$authors = $all_file_authors ? selectInput('author', $all_file_authors, '', true) : '';
$status = selectInput('status', $file_statuses, '', true);
$methods = array('changecategory' => array('label' => gTxt('changecategory'), 'html' => $categories), 'changeauthor' => array('label' => gTxt('changeauthor'), 'html' => $authors), 'changestatus' => array('label' => gTxt('changestatus'), 'html' => $status), 'changecount' => array('label' => gTxt('reset_download_count')), 'delete' => gTxt('delete'));
if (!$categories) {
unset($methods['changecategory']);
}
if (has_single_author('txp_file')) {
unset($methods['changeauthor']);
}
if (!has_privs('file.delete.own') && !has_privs('file.delete')) {
unset($methods['delete']);
}
return multi_edit($methods, 'file', 'file_multi_edit', $page, $sort, $dir, $crit, $search_method);
}
示例4: list_multiedit_form
/**
* Renders a multi-edit form widget for articles.
*
* @param int $page The page number
* @param string $sort The current sort value
* @param string $dir The current sort direction
* @param string $crit The current search criteria
* @param string $search_method The current search method
* @return string HTML
*/
function list_multiedit_form($page, $sort, $dir, $crit, $search_method)
{
global $statuses, $all_cats, $all_authors, $all_sections;
if ($all_cats) {
$category1 = treeSelectInput('Category1', $all_cats, '');
$category2 = treeSelectInput('Category2', $all_cats, '');
} else {
$category1 = $category2 = '';
}
$sections = $all_sections ? selectInput('Section', $all_sections, '', true) : '';
$comments = onoffRadio('Annotate', get_pref('comments_on_default'));
$status = selectInput('Status', $statuses, '', true);
$authors = $all_authors ? selectInput('AuthorID', $all_authors, '', true) : '';
$methods = array('changesection' => array('label' => gTxt('changesection'), 'html' => $sections), 'changecategory1' => array('label' => gTxt('changecategory1'), 'html' => $category1), 'changecategory2' => array('label' => gTxt('changecategory2'), 'html' => $category2), 'changestatus' => array('label' => gTxt('changestatus'), 'html' => $status), 'changecomments' => array('label' => gTxt('changecomments'), 'html' => $comments), 'changeauthor' => array('label' => gTxt('changeauthor'), 'html' => $authors), 'duplicate' => gTxt('duplicate'), 'delete' => gTxt('delete'));
if (!$all_cats) {
unset($methods['changecategory1'], $methods['changecategory2']);
}
if (has_single_author('textpattern', 'AuthorID')) {
unset($methods['changeauthor']);
}
if (!has_privs('article.delete.own') && !has_privs('article.delete')) {
unset($methods['delete']);
}
return multi_edit($methods, 'list', 'list_multi_edit', $page, $sort, $dir, $crit, $search_method);
}
示例5: list_multiedit_form
function list_multiedit_form($page, $sort, $dir, $crit, $search_method)
{
$methods = array('changesection' => gTxt('changesection'), 'changecategory1' => gTxt('changecategory1'), 'changecategory2' => gTxt('changecategory2'), 'changestatus' => gTxt('changestatus'), 'changecomments' => gTxt('changecomments'), 'changeauthor' => gTxt('changeauthor'), 'delete' => gTxt('delete'));
if (has_single_author('textpattern', 'AuthorID')) {
unset($methods['changeauthor']);
}
if (!has_privs('article.delete.own') && !has_privs('article.delete')) {
unset($methods['delete']);
}
return event_multiedit_form('list', $methods, $page, $sort, $dir, $crit, $search_method);
}