mirror of
https://github.com/e107inc/e107.git
synced 2025-08-29 01:00:20 +02:00
Code optimization and cleanup.
This commit is contained in:
@@ -454,7 +454,7 @@ class alt_auth_admin extends alt_auth_base
|
||||
break;
|
||||
default :
|
||||
$err = "Coding error";
|
||||
var_dump($log_result);
|
||||
e107::getDebug()->log($log_result);
|
||||
}
|
||||
|
||||
if(!empty($err))
|
||||
|
@@ -45,7 +45,7 @@ class auth_login extends alt_auth_base
|
||||
*
|
||||
* @return AUTH_xxxx result code
|
||||
*/
|
||||
public function auth_login()
|
||||
public function __construct()
|
||||
{
|
||||
$this->copyAttribs = array();
|
||||
$this->copyMethods = array();
|
||||
@@ -128,7 +128,7 @@ class auth_login extends alt_auth_base
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
if (!@ldap_close($this->connection))
|
||||
if (!@ldap_unbind($this->connection))
|
||||
{
|
||||
$this->makeErrorText(); // Read the error code and explanatory string
|
||||
return false;
|
||||
|
@@ -4,7 +4,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class e_tagwords_download
|
||||
{
|
||||
function e_tagwords_download()
|
||||
function __construct()
|
||||
{
|
||||
$this->e107 = e107::getInstance();
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class adminDownload extends download
|
||||
var $advancedSearchFields;
|
||||
var $userclassOptions;
|
||||
|
||||
function adminDownload()
|
||||
function __construct()
|
||||
{
|
||||
global $pref;
|
||||
parent::download();
|
||||
|
@@ -186,7 +186,7 @@ if (isset($_POST['commentsubmit']))
|
||||
$ftmp = $faq->view_faq($idx) ;
|
||||
if(!defined("e_PAGETITLE"))
|
||||
{
|
||||
define("e_PAGETITLE", LAN_FAQS_011." - ". $ftmp['title']);
|
||||
e107::title( LAN_FAQS_011." - ". $ftmp['title']);
|
||||
}
|
||||
require_once(HEADERF);
|
||||
e107::getRender()->tablerender($ftmp['caption'], $ftmp['text']);
|
||||
@@ -196,7 +196,7 @@ if (isset($_POST['commentsubmit']))
|
||||
{
|
||||
$ftmp = $faq->view_cat_list($action, $id);
|
||||
|
||||
define("e_PAGETITLE", strip_tags($ftmp['title'].$ftmp['caption']));
|
||||
e107::title( strip_tags($ftmp['title'].$ftmp['caption']));
|
||||
require_once (HEADERF);
|
||||
e107::getRender()->tablerender($ftmp['caption'], $ftmp['text']);
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ class plugin_gallery_index_controller extends eControllerFront
|
||||
|
||||
private function getTemplate()
|
||||
{
|
||||
$template = e107::getTemplate('gallery');
|
||||
$template = (array) e107::getTemplate('gallery');
|
||||
|
||||
$oldKeys = array(
|
||||
'list_start', 'list_item', 'list_caption', 'list_end',
|
||||
|
@@ -80,7 +80,7 @@ class user_import
|
||||
|
||||
|
||||
// Constructor
|
||||
function user_import()
|
||||
function __construct()
|
||||
{
|
||||
$this->userDB = new db; // Have our own database object to write to the user table
|
||||
$this->actualExtended = e107::getUserExt()->getFieldNames(); // Create list of predefined extended user fields which are present
|
||||
|
@@ -13,7 +13,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class e_linkwords
|
||||
{
|
||||
function e_linkwords()
|
||||
function __construct()
|
||||
{
|
||||
global $pref, $admin_log;
|
||||
/* constructor */
|
||||
|
@@ -28,7 +28,7 @@ class list_admin
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
function list_admin($parent)
|
||||
function __construct($parent)
|
||||
{
|
||||
$this->e107 = e107::getInstance();
|
||||
$this->parent = $parent;
|
||||
|
@@ -33,7 +33,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
|
||||
$realPath = e107::getParser()->replaceConstants($path);
|
||||
|
||||
if(defined('e_MEDIA') && is_writeable(e_MEDIA."temp/") && ($resized = e107::getMedia()->resizeImage($path, e_MEDIA."temp/".basename($realPath),'h='.$h)))
|
||||
if(defined('e_MEDIA') && is_writable(e_MEDIA."temp/") && ($resized = e107::getMedia()->resizeImage($path, e_MEDIA."temp/".basename($realPath),'h='.$h)))
|
||||
{
|
||||
$path = e107::getParser()->createConstants($resized);
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ class trackbackClass
|
||||
return 'trackbackClass -> sendTrackback: Unable to connect to {$trackback_url[\'host\']}.';
|
||||
}
|
||||
|
||||
fputs($socket, $header);
|
||||
fwrite($socket, $header);
|
||||
|
||||
$response = "";
|
||||
while (!feof($socket)) {
|
||||
|
Reference in New Issue
Block a user