Adding more PHP Doc comments.
This commit is contained in:
parent
eadf1d9e87
commit
86612bb1ff
2 changed files with 42 additions and 4 deletions
|
@ -1438,6 +1438,9 @@ function _fatal_error(Exception $e) {
|
||||||
*
|
*
|
||||||
* Necessary because various servers and various clients
|
* Necessary because various servers and various clients
|
||||||
* think that / is special...
|
* think that / is special...
|
||||||
|
*
|
||||||
|
* @param string $str
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _decaret($str) {
|
function _decaret($str) {
|
||||||
$out = "";
|
$out = "";
|
||||||
|
@ -1456,6 +1459,9 @@ function _decaret($str) {
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
function _get_user() {
|
function _get_user() {
|
||||||
global $config;
|
global $config;
|
||||||
$user = null;
|
$user = null;
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
class Themelet extends BaseThemelet {
|
class Themelet extends BaseThemelet {
|
||||||
/**
|
/**
|
||||||
* Put something in a rounded rectangle box; specific to the default theme
|
* Put something in a rounded rectangle box; specific to the default theme.
|
||||||
|
*
|
||||||
|
* @param string $html
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function rr($html) {
|
public function rr($html) {
|
||||||
return "
|
return "
|
||||||
|
@ -12,7 +15,13 @@ class Themelet extends BaseThemelet {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a generic paginator
|
* Add a generic paginator.
|
||||||
|
*
|
||||||
|
* @param Page $page
|
||||||
|
* @param string $base
|
||||||
|
* @param string $query
|
||||||
|
* @param int $page_number
|
||||||
|
* @param int $total_pages
|
||||||
*/
|
*/
|
||||||
public function display_paginator(Page $page, $base, $query, $page_number, $total_pages) {
|
public function display_paginator(Page $page, $base, $query, $page_number, $total_pages) {
|
||||||
if($total_pages == 0) $total_pages = 1;
|
if($total_pages == 0) $total_pages = 1;
|
||||||
|
@ -20,11 +29,27 @@ class Themelet extends BaseThemelet {
|
||||||
$page->add_block(new Block(null, $body, "main", 90));
|
$page->add_block(new Block(null, $body, "main", 90));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $base_url
|
||||||
|
* @param string $query
|
||||||
|
* @param string $page
|
||||||
|
* @param string $name
|
||||||
|
* @param null|string $link_class
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function litetheme_gen_page_link($base_url, $query, $page, $name, $link_class=null) {
|
public function litetheme_gen_page_link($base_url, $query, $page, $name, $link_class=null) {
|
||||||
$link = make_link("$base_url/$page", $query);
|
$link = make_link("$base_url/$page", $query);
|
||||||
return "<a class='$link_class' href='$link'>$name</a>";
|
return "<a class='$link_class' href='$link'>$name</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $base_url
|
||||||
|
* @param string $query
|
||||||
|
* @param string $page
|
||||||
|
* @param string $current_page
|
||||||
|
* @param string $name
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function litetheme_gen_page_link_block($base_url, $query, $page, $current_page, $name) {
|
public function litetheme_gen_page_link_block($base_url, $query, $page, $current_page, $name) {
|
||||||
$paginator = "";
|
$paginator = "";
|
||||||
|
|
||||||
|
@ -34,6 +59,13 @@ class Themelet extends BaseThemelet {
|
||||||
return $paginator;
|
return $paginator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $current_page
|
||||||
|
* @param int $total_pages
|
||||||
|
* @param string $base_url
|
||||||
|
* @param string $query
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function litetheme_build_paginator($current_page, $total_pages, $base_url, $query) {
|
public function litetheme_build_paginator($current_page, $total_pages, $base_url, $query) {
|
||||||
$next = $current_page + 1;
|
$next = $current_page + 1;
|
||||||
$prev = $current_page - 1;
|
$prev = $current_page - 1;
|
||||||
|
|
Reference in a new issue