1
0
Fork 0

Fix documentation in include/dba

This commit is contained in:
Hypolite Petovan 2018-01-09 22:20:58 -05:00
parent da60893590
commit c7a7658316
4 changed files with 17 additions and 17 deletions

View file

@ -313,7 +313,7 @@ class dba {
* For all regular queries please use dba::select or dba::exists
*
* @param string $sql SQL statement
* @return object statement object
* @return bool|object statement object
*/
public static function p($sql) {
$a = get_app();
@ -586,10 +586,11 @@ class dba {
}
/**
* Fetches the first row
*
* Please use dba::selectOne or dba::exists whenever this is possible.
*
* @brief Fetches the first row
*
* Please use dba::select or dba::exists whenever this is possible.
*
* @param string $sql SQL statement
* @return array first row of query
*/
@ -639,7 +640,7 @@ class dba {
/**
* @brief Returns the number of rows of a statement
*
* @param object Statement object
* @param PDOStatement|mysqli_result|mysqli_stmt Statement object
* @return int Number of rows
*/
public static function num_rows($stmt) {
@ -658,7 +659,7 @@ class dba {
/**
* @brief Fetch a single row
*
* @param object $stmt statement object
* @param PDOStatement|mysqli_result|mysqli_stmt $stmt statement object
* @return array current row
*/
public static function fetch($stmt) {
@ -1111,12 +1112,12 @@ class dba {
/**
* @brief Select rows from a table
*
* @param string $table Table name
* @param array $fields array of selected fields
* @param array $condition array of fields for condition
* @param array $params array of several parameters
* @param string $table Table name
* @param array $fields Array of selected fields, empty for all
* @param array $condition Array of fields for condition
* @param array $params Array of several parameters
*
* @return boolean|object If "limit" is equal "1" only a single row is returned, else a query object is returned
* @return boolean|object
*
* Example:
* $table = "item";
@ -1126,7 +1127,7 @@ class dba {
* or:
* $condition = array("`uid` = ? AND `network` IN (?, ?)", 1, 'dfrn', 'dspr');
*
* $params = array("order" => array("id", "received" => true), "limit" => 1);
* $params = array("order" => array("id", "received" => true), "limit" => 10);
*
* $data = dba::select($table, $fields, $condition, $params);
*/
@ -1280,7 +1281,7 @@ class dba {
* @brief Closes the current statement
*
* @param object $stmt statement object
* @return boolean was the close successfull?
* @return boolean was the close successful?
*/
public static function close($stmt) {
if (!is_object($stmt)) {

View file

@ -1625,8 +1625,6 @@ function admin_page_users(App $a)
ORDER BY $sql_order $sql_order_direction LIMIT %d, %d", intval($a->pager['start']), intval($a->pager['itemspage'])
);
//echo "<pre>$users"; killme();
$adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
$_setup_users = function ($e) use ($adminlist) {
$accounts = array(

View file

@ -6,10 +6,10 @@
* This calendar is for profile visitors and contains only the events
* of the profile owner
*/
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;

View file

@ -29,8 +29,9 @@ function xrd_init(App $a)
$name = ltrim(basename($uri), '~');
} else {
$local = str_replace('acct:', '', $uri);
if (substr($local, 0, 2) == '//')
if (substr($local, 0, 2) == '//') {
$local = substr($local, 2);
}
$name = substr($local, 0, strpos($local, '@'));
}