Fix documentation in include/dba
This commit is contained in:
parent
da60893590
commit
c7a7658316
4 changed files with 17 additions and 17 deletions
|
@ -313,7 +313,7 @@ class dba {
|
||||||
* For all regular queries please use dba::select or dba::exists
|
* For all regular queries please use dba::select or dba::exists
|
||||||
*
|
*
|
||||||
* @param string $sql SQL statement
|
* @param string $sql SQL statement
|
||||||
* @return object statement object
|
* @return bool|object statement object
|
||||||
*/
|
*/
|
||||||
public static function p($sql) {
|
public static function p($sql) {
|
||||||
$a = get_app();
|
$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
|
* @brief Fetches the first row
|
||||||
*
|
|
||||||
* Please use dba::select or dba::exists whenever this is possible.
|
|
||||||
*
|
|
||||||
* @param string $sql SQL statement
|
* @param string $sql SQL statement
|
||||||
* @return array first row of query
|
* @return array first row of query
|
||||||
*/
|
*/
|
||||||
|
@ -639,7 +640,7 @@ class dba {
|
||||||
/**
|
/**
|
||||||
* @brief Returns the number of rows of a statement
|
* @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
|
* @return int Number of rows
|
||||||
*/
|
*/
|
||||||
public static function num_rows($stmt) {
|
public static function num_rows($stmt) {
|
||||||
|
@ -658,7 +659,7 @@ class dba {
|
||||||
/**
|
/**
|
||||||
* @brief Fetch a single row
|
* @brief Fetch a single row
|
||||||
*
|
*
|
||||||
* @param object $stmt statement object
|
* @param PDOStatement|mysqli_result|mysqli_stmt $stmt statement object
|
||||||
* @return array current row
|
* @return array current row
|
||||||
*/
|
*/
|
||||||
public static function fetch($stmt) {
|
public static function fetch($stmt) {
|
||||||
|
@ -1111,12 +1112,12 @@ class dba {
|
||||||
/**
|
/**
|
||||||
* @brief Select rows from a table
|
* @brief Select rows from a table
|
||||||
*
|
*
|
||||||
* @param string $table Table name
|
* @param string $table Table name
|
||||||
* @param array $fields array of selected fields
|
* @param array $fields Array of selected fields, empty for all
|
||||||
* @param array $condition array of fields for condition
|
* @param array $condition Array of fields for condition
|
||||||
* @param array $params array of several parameters
|
* @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:
|
* Example:
|
||||||
* $table = "item";
|
* $table = "item";
|
||||||
|
@ -1126,7 +1127,7 @@ class dba {
|
||||||
* or:
|
* or:
|
||||||
* $condition = array("`uid` = ? AND `network` IN (?, ?)", 1, 'dfrn', 'dspr');
|
* $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);
|
* $data = dba::select($table, $fields, $condition, $params);
|
||||||
*/
|
*/
|
||||||
|
@ -1280,7 +1281,7 @@ class dba {
|
||||||
* @brief Closes the current statement
|
* @brief Closes the current statement
|
||||||
*
|
*
|
||||||
* @param object $stmt statement object
|
* @param object $stmt statement object
|
||||||
* @return boolean was the close successfull?
|
* @return boolean was the close successful?
|
||||||
*/
|
*/
|
||||||
public static function close($stmt) {
|
public static function close($stmt) {
|
||||||
if (!is_object($stmt)) {
|
if (!is_object($stmt)) {
|
||||||
|
|
|
@ -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'])
|
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']));
|
$adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
|
||||||
$_setup_users = function ($e) use ($adminlist) {
|
$_setup_users = function ($e) use ($adminlist) {
|
||||||
$accounts = array(
|
$accounts = array(
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
* This calendar is for profile visitors and contains only the events
|
* This calendar is for profile visitors and contains only the events
|
||||||
* of the profile owner
|
* of the profile owner
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Content\Feature;
|
use Friendica\Content\Feature;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
|
|
|
@ -29,8 +29,9 @@ function xrd_init(App $a)
|
||||||
$name = ltrim(basename($uri), '~');
|
$name = ltrim(basename($uri), '~');
|
||||||
} else {
|
} else {
|
||||||
$local = str_replace('acct:', '', $uri);
|
$local = str_replace('acct:', '', $uri);
|
||||||
if (substr($local, 0, 2) == '//')
|
if (substr($local, 0, 2) == '//') {
|
||||||
$local = substr($local, 2);
|
$local = substr($local, 2);
|
||||||
|
}
|
||||||
|
|
||||||
$name = substr($local, 0, strpos($local, '@'));
|
$name = substr($local, 0, strpos($local, '@'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue