mirror of
https://github.com/e107inc/e107.git
synced 2025-08-25 23:36:29 +02:00
PHPDoc fixes and code optimization.
This commit is contained in:
@@ -38,10 +38,10 @@ if(!class_exists("_blank_setup"))
|
||||
'blank_folder' =>'Folder Value',
|
||||
'blank_version' =>'1',
|
||||
'blank_author' =>'1',
|
||||
'blank_authorURL' =>'http://e107.org',
|
||||
'blank_authorURL' =>'https://e107.org',
|
||||
'blank_date' =>'1352871240',
|
||||
'blank_compatibility' =>'2',
|
||||
'blank_url' =>'http://e107.org',
|
||||
'blank_url' =>'https://e107.org',
|
||||
'blank_class' => 0
|
||||
);
|
||||
|
||||
|
@@ -28,7 +28,7 @@ class _blank_admin implements e_admin_addon_interface
|
||||
|
||||
|
||||
return array(
|
||||
3 => array('url'=>'http://myurl.com'),
|
||||
3 => array('url'=>'https://myurl.com'),
|
||||
);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class _blank_admin implements e_admin_addon_interface
|
||||
$id = $ui->getId();
|
||||
|
||||
$config = array();
|
||||
$defaultValue = 'http://';
|
||||
$defaultValue = 'https://';
|
||||
|
||||
switch($type)
|
||||
{
|
||||
|
@@ -95,7 +95,7 @@ class _blank_dashboard // include plugin-folder in the name.
|
||||
{
|
||||
list($yearNumber,$monthNumber,$day) = explode('-',$k);
|
||||
$diz = date('D jS', mktime(1,1,1,$monthNumber,$day, $yearNumber));
|
||||
$data[] = array($diz, $amt[$k]['other'], $amt[$k]['friend'], $amt[$k]['bing'], $amt[$k]['google'], $amt[$k]['facebook']); // $dateName[$i]
|
||||
$data[] = array($diz, $v['other'], $v['friend'], $v['bing'], $v['google'], $v['facebook']); // $dateName[$i]
|
||||
$ticks[] = $k;
|
||||
// $c++;
|
||||
}
|
||||
|
@@ -120,8 +120,8 @@ class _blank_library
|
||||
$libraries['example'] = array(
|
||||
// Only used in administrative UI of Libraries API.
|
||||
'name' => 'Example library',
|
||||
'vendor_url' => 'http://example.com',
|
||||
'download_url' => 'http://example.com/download',
|
||||
'vendor_url' => 'https://example.com',
|
||||
'download_url' => 'https://example.com/download',
|
||||
// Override default library location ({e_WEB}/lib).
|
||||
'library_path' => e_PLUGIN . 'example',
|
||||
// Optional: If, after extraction, the actual library files are contained in 'e107_web/lib/example/lib',
|
||||
@@ -229,8 +229,8 @@ class _blank_library
|
||||
// 'e107_web/lib/simple'.
|
||||
$libraries['simple'] = array(
|
||||
'name' => 'Simple library',
|
||||
'vendor_url' => 'http://example.com/simple',
|
||||
'download_url' => 'http://example.com/simple',
|
||||
'vendor_url' => 'https://example.com/simple',
|
||||
'download_url' => 'https://example.com/simple',
|
||||
'version_arguments' => array(
|
||||
'file' => 'readme.txt',
|
||||
// Best practice: Document the actual version strings for later reference.
|
||||
@@ -251,8 +251,8 @@ class _blank_library
|
||||
// A library that (naturally) evolves over time with API changes.
|
||||
$libraries['tinymce'] = array(
|
||||
'name' => 'TinyMCE',
|
||||
'vendor_url' => 'http://tinymce.moxiecode.com',
|
||||
'download_url' => 'http://tinymce.moxiecode.com/download.php',
|
||||
'vendor_url' => 'https://www.tiny.cloud/',
|
||||
'download_url' => 'https://www.tiny.cloud/get-tiny/downloads/',
|
||||
'path' => 'jscripts/tiny_mce',
|
||||
// The regular expression catches two parts (the major and the minor version), which libraryGetVersion()
|
||||
// doesn't allow.
|
||||
|
@@ -43,7 +43,7 @@ class _blank_user // plugin-folder + '_user'
|
||||
|
||||
/**
|
||||
* Experimental and subject to change without notice.
|
||||
* @return mixed
|
||||
* @return array
|
||||
*/
|
||||
function delete()
|
||||
{
|
||||
|
@@ -41,7 +41,7 @@ class auth_login extends alt_auth_base
|
||||
/**
|
||||
* Read configuration, initialise connection to remote e107 database
|
||||
*
|
||||
* @return AUTH_xxxx result code
|
||||
* @return void result code
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -271,7 +271,7 @@ class ExtendedPasswordHandler extends UserHandler
|
||||
* @param string $stored_hash - required value for password to match
|
||||
* @param integer $password_type - constant specifying the type of password to check against
|
||||
*
|
||||
* @return PASSWORD_INVALID|PASSWORD_VALID|string
|
||||
* @return string PASSWORD_INVALID|PASSWORD_VALID|string
|
||||
* PASSWORD_INVALID if no match
|
||||
* PASSWORD_VALID if valid password
|
||||
* Return a new hash to store if valid password but non-preferred encoding
|
||||
@@ -327,7 +327,7 @@ class ExtendedPasswordHandler extends UserHandler
|
||||
case self::PASSWORD_E107_SALT :
|
||||
//return e107::getUserSession()->CheckPassword($password, $login_name, $stored_hash);
|
||||
return parent::CheckPassword($password, $login_name, $stored_hash);
|
||||
break;
|
||||
// break;
|
||||
|
||||
case self::PASSWORD_PHPBB_SALT :
|
||||
case self::PASSWORD_WORDPRESS_SALT :
|
||||
|
@@ -41,7 +41,7 @@ class auth_login extends alt_auth_base
|
||||
/**
|
||||
* Read configuration
|
||||
*
|
||||
* @return AUTH_xxxx result code
|
||||
* @return void result code
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -42,7 +42,7 @@ class auth_login extends alt_auth_base
|
||||
/**
|
||||
* Read configuration
|
||||
*
|
||||
* @return AUTH_xxxx result code
|
||||
* @return void result code
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<author name="e107 Inc." url="e107.org" email="security@e107.org" />
|
||||
<description lan="LAN_ALT_66">This plugin allows for alternate authentication methods.</description>
|
||||
<category>users</category>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (https://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<adminLinks>
|
||||
<link url='alt_auth_conf.php' description='LAN_ALT_67' icon='images/alt_auth_32.png' iconSmall='images/alt_auth_16.png' primary='true' />
|
||||
</adminLinks>
|
||||
|
@@ -445,7 +445,7 @@ class banner_form_ui extends e_admin_form_ui
|
||||
{
|
||||
case 'read': // List Page
|
||||
return e107::getParser()->toImage($curVal, array('h'=>100, 'legacy'=>'{e_IMAGE}banners'));
|
||||
break;
|
||||
// break;
|
||||
|
||||
case 'write': // Edit Page
|
||||
|
||||
@@ -479,12 +479,12 @@ class banner_form_ui extends e_admin_form_ui
|
||||
|
||||
return "<div class='banner-image'>".$this->tabs($tabText)."</div>";
|
||||
// return $frm->text('banner_clientname',$curVal);
|
||||
break;
|
||||
// break;
|
||||
|
||||
case 'filter':
|
||||
case 'batch':
|
||||
return $this->clients;
|
||||
break;
|
||||
//break;
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -500,7 +500,7 @@ class banner_form_ui extends e_admin_form_ui
|
||||
{
|
||||
case 'read': // List Page
|
||||
return $curVal;
|
||||
break;
|
||||
// break;
|
||||
|
||||
case 'write': // Edit Page
|
||||
$text = '';
|
||||
@@ -518,12 +518,12 @@ class banner_form_ui extends e_admin_form_ui
|
||||
|
||||
return $text;
|
||||
// return $frm->text('banner_clientname',$curVal);
|
||||
break;
|
||||
//break;
|
||||
|
||||
case 'filter':
|
||||
case 'batch':
|
||||
return $this->clients;
|
||||
break;
|
||||
//break;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@@ -120,7 +120,7 @@ if(false === $cached)
|
||||
{
|
||||
$xmonth = date("n", $news['news_datestamp']);
|
||||
$xyear = date("Y", $news['news_datestamp']);
|
||||
if (!isset($month_links[$xmonth]) || empty($month_links[$xmonth]))
|
||||
if (empty($month_links[$xmonth]))
|
||||
{
|
||||
$month_links[$xmonth] = e107::getUrl()->create('news/list/month', 'id='.formatDate($xyear, $xmonth));//e_BASE."news.php?month.".formatDate($req_year, $xmonth);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ class chatbox_menu_shortcodes extends e_shortcode
|
||||
/**
|
||||
* Returns user_id from cb_nick
|
||||
*
|
||||
* @return mixed
|
||||
* @return string
|
||||
*/
|
||||
protected function getUserIdFromNick()
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class chatbox_menu_shortcodes extends e_shortcode
|
||||
/**
|
||||
* Returns user_name from cb_nick
|
||||
*
|
||||
* @return mixed
|
||||
* @return string
|
||||
*/
|
||||
protected function getUserNameFromNick()
|
||||
{
|
||||
@@ -104,7 +104,7 @@ class chatbox_menu_shortcodes extends e_shortcode
|
||||
*
|
||||
* @param null $parm
|
||||
*
|
||||
* @return mixed|string
|
||||
* @return string
|
||||
*/
|
||||
public function sc_cb_username($parm = null)
|
||||
{
|
||||
|
@@ -971,7 +971,8 @@ class e107forum
|
||||
/**
|
||||
* Remove threadID from the 'viewed list' list of other users.
|
||||
* @param $threadId
|
||||
*/
|
||||
* @return false|void
|
||||
*/
|
||||
private function clearReadThreads($threadId)
|
||||
{
|
||||
if(empty($threadId))
|
||||
@@ -2015,6 +2016,7 @@ class e107forum
|
||||
* @param $forumId
|
||||
* @param $from
|
||||
* @param $view
|
||||
* @param null $filter
|
||||
* @return array
|
||||
*/
|
||||
function forumGetThreads($forumId, $from, $view, $filter = null)
|
||||
|
@@ -1006,10 +1006,9 @@ class forum_post_handler
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param $text
|
||||
* @param $text
|
||||
* @param bool $caption
|
||||
*/
|
||||
function render($text, $caption = false)
|
||||
{
|
||||
|
@@ -68,6 +68,8 @@ class news_gsitemap
|
||||
|
||||
/**
|
||||
* Used above and by gsitemap/e_event.php to update the URL when changed in news, pages etc.
|
||||
*
|
||||
* @param $table
|
||||
* @param $row
|
||||
* @return string
|
||||
*/
|
||||
|
@@ -784,10 +784,11 @@ class news_front
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $cache_tag
|
||||
* @param string $type 'title' or 'diz' or 'rows' or empty for html.
|
||||
*/
|
||||
/**
|
||||
* @param $cachetag
|
||||
* @param string $type 'title' or 'diz' or 'rows' or empty for html.
|
||||
* @return array|false|string
|
||||
*/
|
||||
private function getNewsCache($cachetag, $type=null)
|
||||
{
|
||||
if(!empty($type))
|
||||
|
@@ -25,7 +25,6 @@ class plugin_signin_signin_shortcodes extends e_shortcode
|
||||
{
|
||||
|
||||
private $use_imagecode = 0;
|
||||
private $sec;
|
||||
private $usernamePlaceholder = LAN_LOGINMENU_1;
|
||||
private $allowEmailLogin;
|
||||
private $authMethod;
|
||||
@@ -37,7 +36,6 @@ class plugin_signin_signin_shortcodes extends e_shortcode
|
||||
$pref = e107::getPref();
|
||||
|
||||
$this->use_imagecode = e107::getConfig()->get('logcode');
|
||||
$this->sec = e107::getSecureImg();
|
||||
$this->usernamePlaceholder = '';
|
||||
$this->allowEmailLogin = $pref['allowEmailLogin'];
|
||||
|
||||
|
@@ -5,8 +5,8 @@ if (!defined('e107_INIT')) { exit; }
|
||||
e107::plugLan('siteinfo', null);
|
||||
|
||||
$text = "<div style='text-align:center'>
|
||||
<a href='http://validator.w3.org/check?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo/images/valid-xhtml11.png' alt='Valid XHTML 1.1!' height='31' width='88' /></a><br />
|
||||
<a href='http://jigsaw.w3.org/css-validator/validator?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo/images/vcss.png' alt='Valid CSS!' height='31' width='88' /></a>
|
||||
<a href='https://validator.w3.org/check?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo/images/valid-xhtml11.png' alt='Valid XHTML 1.1!' height='31' width='88' /></a><br />
|
||||
<a href='https://jigsaw.w3.org/css-validator/validator?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo/images/vcss.png' alt='Valid CSS!' height='31' width='88' /></a>
|
||||
</div>";
|
||||
$caption = (file_exists(THEME."images/compliance_menu.png") ? "<img src='".THEME_ABS."images/compliance_menu.png' alt='' /> ".COMPLIANCE_L1 : COMPLIANCE_L1);
|
||||
$ns->tablerender($caption, $text, 'compliance');
|
||||
|
@@ -399,12 +399,12 @@ class social_ui extends e_admin_ui
|
||||
'facebook' => array('label'=>"Facebook", "placeholder"=>"eg. https://www.facebook.com/e107CMS"),
|
||||
'twitter' => array('label'=>"Twitter", "placeholder"=>"eg. https://twitter.com/e107"),
|
||||
'youtube' => array('label'=>"Youtube", "placeholder"=>"eg.https://youtube.com/e107Inc"),
|
||||
'linkedin' => array('label'=>"LinkedIn", "placeholder"=>"eg. http://www.linkedin.com/groups?home=&gid=1782682"),
|
||||
'linkedin' => array('label'=>"LinkedIn", "placeholder"=>"eg. https://www.linkedin.com/groups?home=&gid=1782682"),
|
||||
'github' => array('label'=>"GitHub", "placeholder"=>"eg. https://github.com/e107inc"),
|
||||
'flickr' => array('label'=>"Flickr", "placeholder"=>""),
|
||||
'instagram' => array('label'=>"Instagram", "placeholder"=>""),
|
||||
'pinterest' => array('label'=>"Pinterest", "placeholder"=>""),
|
||||
'steam' => array('label'=>"Steam", "placeholder"=>"eg. http://steamcommunity.com"),
|
||||
'steam' => array('label'=>"Steam", "placeholder"=>"eg. https://steamcommunity.com"),
|
||||
'vimeo' => array('label'=>"Vimeo", "placeholder"=>""),
|
||||
'twitch' => array('label'=>"Twitch", "placeholder"=>""),
|
||||
'vk' => array('label'=>"VK (Vkontakte)", "placeholder"=>""),
|
||||
@@ -689,6 +689,7 @@ class social_ui extends e_admin_ui
|
||||
|
||||
/**
|
||||
* @param $provider_name
|
||||
* @param bool $readonly
|
||||
* @return string Text to append
|
||||
*/
|
||||
private function generateSocialLoginRow($provider_name, $readonly = false)
|
||||
|
@@ -3,5 +3,5 @@
|
||||
<author name="e107 Inc." url="https://e107.org" />
|
||||
<description lan="LAN_PLUGIN_TAGCLOUD_DESCRIPTION">Add a Tag Cloud to your site.</description>
|
||||
<category>misc</category>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (https://www.gnu.org/licenses/gpl.txt)</copyright>
|
||||
</e107Plugin>
|
Reference in New Issue
Block a user