Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\nexus\Support\Author;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -56,10 +56,6 @@ class _Email
|
||||
*/
|
||||
public function photo()
|
||||
{
|
||||
if ( \IPS\Settings::i()->allow_gravatars )
|
||||
{
|
||||
return \IPS\Http\Url::external( "https://secure.gravatar.com/avatar/" . md5( trim( mb_strtolower( $this->email ) ) ) )->setQueryString( 'd', (string) \IPS\Theme::i()->resource( 'default_photo.png', 'core', 'global' ) )->makeSafeForAcp( TRUE );
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -96,9 +92,11 @@ class _Email
|
||||
/**
|
||||
* Get latest invoices
|
||||
*
|
||||
* @return \IPS\Patterns\ActiveRecordIterator|NULL
|
||||
* @param int $limit Number of invoices
|
||||
* @param bool $count Return the total count
|
||||
* @return \IPS\Patterns\ActiveRecordIterator|NULL|int
|
||||
*/
|
||||
public function invoices( $limit=10 )
|
||||
public function invoices( $limit = 10, $count = FALSE )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -107,18 +105,24 @@ class _Email
|
||||
* Support Requests
|
||||
*
|
||||
* @param int $limit Number to get
|
||||
* @para, \IPS\nexus\Support\Request $exclude A request to exclude
|
||||
* @param \IPS\nexus\Support\Request $exclude A request to exclude
|
||||
* @param string $order Order clause
|
||||
* @return \IPS\Patterns\ActiveRecordIterator
|
||||
* @param bool $count Return the total count
|
||||
* @return \IPS\Patterns\ActiveRecordIterator|int
|
||||
*/
|
||||
public function supportRequests( $limit, \IPS\nexus\Support\Request $exclude = NULL, $order='r_started DESC' )
|
||||
public function supportRequests( $limit, \IPS\nexus\Support\Request $exclude = NULL, $order='r_started DESC', $count = FALSE )
|
||||
{
|
||||
$where = array( array( 'r_email=?', $this->email ) );
|
||||
if ( $exclude )
|
||||
{
|
||||
$where[] = array( 'r_id<>?', $exclude->id );
|
||||
}
|
||||
|
||||
return \IPS\nexus\Support\Request::getItemsWithPermission( $where, $order, $limit, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS );
|
||||
|
||||
if( $count === TRUE )
|
||||
{
|
||||
return \IPS\nexus\Support\Request::getItemsWithPermission( $where, $order, NULL, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, NULL, FALSE, FALSE, FALSE, TRUE );
|
||||
}
|
||||
|
||||
return \IPS\nexus\Support\Request::getItemsWithPermission( $where, $order, $limit, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user