Ejemplo n.º 1
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->RouteTypes = array('Internal' => 'Internal', 'Temporary' => 'Temporary (302)', 'Permanent' => 'Permanent (301)', 'NotAuthorized' => 'Not Authorized (401)', 'NotFound' => 'Not Found (404)', 'Test' => 'Test');
     $this->ReservedRoutes = array('DefaultController', 'DefaultForumRoot', 'Default404', 'DefaultPermission', 'UpdateMode');
     $this->_loadRoutes();
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     // Prepare Identity storage container
     $this->Identity();
     $this->_AllowHandshake = FALSE;
     parent::__construct();
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  */
 function __construct()
 {
     $this->PhpMailer = new PHPMailer();
     $this->PhpMailer->CharSet = Gdn::Config('Garden.Charset', 'utf-8');
     $this->Clear();
     parent::__construct();
 }
Ejemplo n.º 4
0
 public function __construct($Host, $Options, $Login, $Password)
 {
     LoadExtension('imap', True);
     $MailBox = '{' . $Host . ':' . $Options . '}INBOX';
     $this->Connection = imap_open($MailBox, $Login, $Password, OP_SILENT);
     $this->IMAP2 = new Mail_IMAPv2($this->Connection);
     parent::__construct();
 }
Ejemplo n.º 5
0
 /**
  * Constructor
  */
 function __construct() {
    $this->PhpMailer = new PHPMailer();
    $this->PhpMailer->CharSet = Gdn::Config('Garden.Charset', 'utf-8');
    $this->PhpMailer->SingleTo = Gdn::Config('Garden.Email.SingleTo', FALSE);
    $this->PhpMailer->PluginDir = PATH_LIBRARY.DS.'vendors'.DS.'phpmailer'.DS;
    $this->Clear();
    parent::__construct();
 }
Ejemplo n.º 6
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $AnalyticsServer = c('Garden.Analytics.Remote', 'analytics.vanillaforums.com');
     $AnalyticsServer = str_replace(array('http://', 'https://'), '', $AnalyticsServer);
     $this->AnalyticsServer = $AnalyticsServer;
     $this->TickExtra = array();
 }
Ejemplo n.º 7
0
 /**
  * Setup the default locale.
  *
  * @param $LocaleName
  * @param $ApplicationWhiteList
  * @param $PluginWhiteList
  * @param bool $ForceRemapping
  */
 public function __construct($LocaleName, $addonManager = null)
 {
     parent::__construct();
     $this->ClassName = __CLASS__;
     if ($addonManager instanceof AddonManager) {
         $this->addonManager = $addonManager;
     }
     $this->set($LocaleName);
 }
Ejemplo n.º 8
0
 /**
  * Constructor
  *
  * @param string $TableName
  */
 public function __construct($TableName = '')
 {
     if ($TableName != '') {
         $TableModel = new Gdn_Model($TableName);
         $this->setModel($TableModel);
     }
     // Get custom error class
     $this->ErrorClass = C('Garden.Forms.InlineErrorClass', 'Error');
     parent::__construct();
 }
Ejemplo n.º 9
0
 /**
  * The constructor for this class. Automatically fills $this->ClassName.
  *
  * @param string $Database
  * @todo $Database needs a description.
  */
 public function __construct($Database = NULL)
 {
     parent::__construct();
     if (is_null($Database)) {
         $this->Database = Gdn::Database();
     } else {
         $this->Database = $Database;
     }
     $this->DatabasePrefix($this->Database->DatabasePrefix);
     $this->Reset();
 }
Ejemplo n.º 10
0
 /**
  * Constructor
  */
 function __construct()
 {
     $this->PhpMailer = new PHPMailer();
     $this->PhpMailer->CharSet = C('Garden.Charset', 'utf-8');
     $this->PhpMailer->SingleTo = C('Garden.Email.SingleTo', FALSE);
     $this->PhpMailer->PluginDir = CombinePaths(array(PATH_LIBRARY, 'vendors/phpmailer/'));
     $this->PhpMailer->Hostname = C('Garden.Email.Hostname', '');
     $this->PhpMailer->Encoding = 'quoted-printable';
     $this->Clear();
     parent::__construct();
 }
Ejemplo n.º 11
0
 /**
  * The constructor for this class. Automatically fills $this->ClassName.
  *
  * @param string $Database
  * @todo $Database needs a description.
  */
 public function __construct($Database = null)
 {
     parent::__construct();
     if (is_null($Database)) {
         $this->Database = Gdn::database();
     } else {
         $this->Database = $Database;
     }
     $this->databasePrefix($this->Database->DatabasePrefix);
     $this->setAlterTableThreshold(c('Database.AlterTableThreshold', 0));
     $this->reset();
 }
Ejemplo n.º 12
0
 /**
  * Class constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->_EnabledApplicationFolders = array();
     $this->Request = '';
     $this->_ApplicationFolder = '';
     $this->_AssetCollection = array();
     $this->ControllerName = '';
     $this->ControllerMethod = '';
     $this->_ControllerMethodArgs = array();
     $this->_PropertyCollection = array();
     $this->_Data = array();
 }
Ejemplo n.º 13
0
 /**
  * Constructor.
  */
 function __construct()
 {
     $this->PhpMailer = new PHPMailer();
     $this->PhpMailer->CharSet = 'utf-8';
     $this->PhpMailer->SingleTo = c('Garden.Email.SingleTo', false);
     $this->PhpMailer->PluginDir = combinePaths(array(PATH_LIBRARY, 'vendors/phpmailer/'));
     $this->PhpMailer->Hostname = c('Garden.Email.Hostname', '');
     $this->PhpMailer->Encoding = 'quoted-printable';
     $this->clear();
     $this->addHeader('Precedence', 'list');
     $this->addHeader('X-Auto-Response-Suppress', 'All');
     parent::__construct();
 }
Ejemplo n.º 14
0
 /**
  * Constructor.
  */
 function __construct()
 {
     $this->PhpMailer = new \Vanilla\VanillaMailer();
     $this->PhpMailer->CharSet = 'utf-8';
     $this->PhpMailer->SingleTo = c('Garden.Email.SingleTo', false);
     $this->PhpMailer->Hostname = c('Garden.Email.Hostname', '');
     $this->PhpMailer->Encoding = 'quoted-printable';
     $this->clear();
     $this->addHeader('Precedence', 'list');
     $this->addHeader('X-Auto-Response-Suppress', 'All');
     $this->setEmailTemplate(new EmailTemplate());
     $this->resolveFormat();
     parent::__construct();
 }
Ejemplo n.º 15
0
 /**
  * Class constructor
  *
  * @param object $Sender
  */
 public function __construct(&$Sender = '')
 {
     if (is_object($Sender)) {
         $this->_ApplicationFolder = $Sender->Application;
         $this->_ThemeFolder = $Sender->Theme;
     } else {
         $this->_ApplicationFolder = 'garden';
         $this->_ThemeFolder = Gdn::Config('Garden.Theme');
     }
     if (is_object($Sender)) {
         $this->_Sender =& $Sender;
     }
     parent::__construct();
 }
Ejemplo n.º 16
0
 public function __construct($Config)
 {
     if (is_string($Config)) {
         $Config = Gdn::Config($Config);
     }
     $this->AuthenticateUrl = ArrayValue('AuthenticateUrl', $Config);
     $this->_RegisterUrl = ArrayValue('RegisterUrl', $Config);
     $this->_SignInUrl = ArrayValue('SignInUrl', $Config);
     $this->_SignOutUrl = ArrayValue('SignOutUrl', $Config);
     $this->Encoding = ArrayValue('Encoding', $Config, 'ini');
     $this->_Identity = Gdn::Factory('Identity');
     $this->_Identity->Init();
     parent::__construct();
 }
Ejemplo n.º 17
0
 /**
  * Class constructor
  *
  * @param object $Sender
  */
 public function __construct($Sender = '', $ApplicationFolder = FALSE)
 {
     if (is_object($Sender)) {
         $this->_ApplicationFolder = $Sender->ApplicationFolder;
         $this->_ThemeFolder = $Sender->Theme;
     } else {
         $this->_ApplicationFolder = 'dashboard';
         $this->_ThemeFolder = Gdn::Config('Garden.Theme');
     }
     if ($ApplicationFolder !== FALSE) {
         $this->_ApplicationFolder = $ApplicationFolder;
     }
     if (is_object($Sender)) {
         $this->_Sender = $Sender;
     }
     parent::__construct();
 }
Ejemplo n.º 18
0
 /**
  * Constructor.
  */
 function __construct()
 {
     $this->PhpMailer = new PHPMailer();
     $this->PhpMailer->CharSet = c('Garden.Charset', 'utf-8');
     $this->PhpMailer->SingleTo = c('Garden.Email.SingleTo', false);
     $this->PhpMailer->PluginDir = combinePaths(array(PATH_LIBRARY, 'vendors/phpmailer/'));
     $this->PhpMailer->Hostname = c('Garden.Email.Hostname', '');
     $this->PhpMailer->Encoding = 'quoted-printable';
     $this->clear();
     $this->addHeader('Precedence', 'list');
     $this->addHeader('X-Auto-Response-Suppress', 'All');
     $this->emailTemplate = new EmailTemplate();
     $this->resolveFormat();
     if ($this->format === 'html') {
         $this->setDefaultEmailColors();
         $this->setDefaultEmailImage();
     }
     parent::__construct();
 }
Ejemplo n.º 19
0
 public function __construct()
 {
     // Figure out what the authenticator alias is
     $this->_AuthenticationSchemeAlias = $this->GetAuthenticationSchemeAlias();
     // Initialize gdn_pluggable
     parent::__construct();
 }
Ejemplo n.º 20
0
 /**
  * Undocumented method.
  *
  * @todo Method __construct() needs a description.
  */
 public function __construct()
 {
     $this->Application = '';
     $this->ApplicationFolder = '';
     $this->Assets = array();
     $this->ControllerFolder = '';
     $this->CssClass = '';
     $this->Head = Gdn::Factory('Dummy');
     $this->MasterView = '';
     $this->ModuleSortContainer = '';
     $this->OriginalRequestMethod = '';
     $this->RedirectUrl = '';
     $this->RequestMethod = '';
     $this->RequestArgs = FALSE;
     $this->Request = FALSE;
     $this->SelfUrl = '';
     $this->SyndicationMethod = SYNDICATION_NONE;
     $this->Theme = Theme();
     $this->ThemeOptions = Gdn::Config('Garden.ThemeOptions', array());
     $this->View = '';
     $this->_CssFiles = array();
     $this->_JsFiles = array();
     $this->_Definitions = array();
     $this->_DeliveryMethod = DELIVERY_METHOD_XHTML;
     $this->_DeliveryType = DELIVERY_TYPE_ALL;
     $this->_FormSaved = '';
     $this->_Json = array();
     $this->_Headers = array('Cache-Control' => '	private, no-cache, no-store, must-revalidate', 'Expires' => 'Sat, 01 Jan 2000 00:00:00 GMT', 'Pragma' => 'no-cache', 'X-Garden-Version' => APPLICATION . ' ' . APPLICATION_VERSION, 'Content-Type' => Gdn::Config('Garden.ContentType', '') . '; charset=' . Gdn::Config('Garden.Charset', ''));
     $this->_ErrorMessages = '';
     $this->_InformMessages = array();
     $this->StatusMessage = '';
     parent::__construct();
     $this->ControllerName = strtolower($this->ClassName);
 }
Ejemplo n.º 21
0
 /**
  * Undocumented method.
  *
  * @todo Method __construct() needs a description.
  */
 public function __construct() {
    $this->Application = '';
    $this->ApplicationFolder = '';
    $this->Assets = array();
    $this->ControllerFolder = '';
    $this->CssClass = '';
    $this->Head = Gdn::Factory('Dummy');
    $this->MasterView = '';
    $this->ModuleSortContainer = '';
    $this->OriginalRequestMethod = '';
    $this->RedirectUrl = '';
    $this->RequestMethod = '';
    $this->RequestArgs = FALSE;
    $this->Request = FALSE;
    $this->SelfUrl = '';
    $this->SyndicationMethod = SYNDICATION_NONE;
    $this->Theme = Theme();
    $this->ThemeOptions = Gdn::Config('Garden.ThemeOptions', array());
    $this->View = '';
    $this->_CssFiles = array();
    $this->_JsFiles = array();
    $this->_Definitions = array();
    $this->_DeliveryMethod = DELIVERY_METHOD_XHTML;
    $this->_DeliveryType = DELIVERY_TYPE_ALL;
    $this->_FormSaved = '';
    $this->_Json = array();
    $this->_Headers = array(
       'Expires' =>  'Mon, 26 Jul 1997 05:00:00 GMT', // Make sure the client always checks at the server before using it's cached copy.
       'X-Garden-Version' => APPLICATION.' '.APPLICATION_VERSION,
       'Content-Type' => Gdn::Config('Garden.ContentType', '').'; charset='.Gdn::Config('Garden.Charset', ''), // PROPERLY ENCODE THE CONTENT
       'Last-Modified' => gmdate('D, d M Y H:i:s') . ' GMT' // PREVENT PAGE CACHING: always modified (this can be overridden by specific controllers)
       // $Dispatcher->Header('Cache-Control', 'no-cache, must-revalidate'); // PREVENT PAGE CACHING: HTTP/1.1
       // $Dispatcher->Header('Pragma', 'no-cache'); // PREVENT PAGE CACHING: HTTP/1.0
    );
    $this->_ErrorMessages = '';
    $this->_InformMessages = array();
    $this->StatusMessage = '';
    
    parent::__construct();
    $this->ControllerName = strtolower($this->ClassName);
 }
Ejemplo n.º 22
0
 /**
  * Undocumented method.
  *
  * @todo Method __construct() needs a description.
  */
 public function __construct()
 {
     $this->Application = '';
     $this->ApplicationFolder = '';
     $this->Assets = array();
     $this->ControllerFolder = '';
     $this->CssClass = '';
     $this->Head = Gdn::Factory('Dummy');
     $this->MasterView = '';
     $this->ModuleSortContainer = '';
     $this->OriginalRequestMethod = '';
     $this->RedirectUrl = '';
     $this->RequestMethod = '';
     $this->RequestArgs = FALSE;
     $this->Request = FALSE;
     $this->SelfUrl = '';
     $this->StatusMessage = '';
     $this->SyndicationMethod = SYNDICATION_NONE;
     $this->Theme = Gdn::Config('Garden.Theme');
     $this->ThemeOptions = Gdn::Config('Garden.ThemeOptions', array());
     $this->View = '';
     $this->_CssFiles = array();
     $this->_JsFiles = array();
     $this->_Definitions = array();
     $this->_DeliveryMethod = DELIVERY_METHOD_XHTML;
     $this->_DeliveryType = DELIVERY_TYPE_ALL;
     $this->_Json = array();
     $this->_Headers = array('Expires' => 'Mon, 26 Jul 1997 05:00:00 GMT', 'X-Garden-Version' => APPLICATION . ' ' . APPLICATION_VERSION, 'Content-Type' => Gdn::Config('Garden.ContentType', '') . '; charset=' . Gdn::Config('Garden.Charset', ''), 'Last-Modified' => gmdate('D, d M Y H:i:s') . ' GMT');
     parent::__construct();
     $this->ControllerName = strtolower($this->ClassName);
 }
Ejemplo n.º 23
0
 /**
  * @param string $message HTML formatted email message (the body of the email).
  * @param string $title HTML formatted email title.
  * @param string $lead HTML formatted email lead (sub-title, appears under title).
  * @param string $view
  * @throws Exception
  */
 function __construct($message = '', $title = '', $lead = '', $view = 'email-basic')
 {
     parent::__construct();
     $this->setMessage($message);
     $this->setTitle($title);
     $this->setLead($lead);
     // Set templating defaults
     $this->setTextColor(c('Garden.EmailTemplate.TextColor', self::DEFAULT_TEXT_COLOR));
     $this->setBackgroundColor(c('Garden.EmailTemplate.BackgroundColor', self::DEFAULT_BACKGROUND_COLOR));
     $this->setContainerBackgroundColor(c('Garden.EmailTemplate.ContainerBackgroundColor', self::DEFAULT_CONTAINER_BACKGROUND_COLOR));
     $this->setDefaultButtonBackgroundColor(c('Garden.EmailTemplate.ButtonBackgroundColor', self::DEFAULT_BUTTON_BACKGROUND_COLOR));
     $this->setDefaultButtonTextColor(c('Garden.EmailTemplate.ButtonTextColor', self::DEFAULT_BUTTON_TEXT_COLOR));
     $this->setDefaultEmailImage();
     // Set default view
     $this->view = AssetModel::viewLocation($view, 'email', 'dashboard');
 }
Ejemplo n.º 24
0
 /**
  *
  */
 public function __construct()
 {
     $this->Application = '';
     $this->ApplicationFolder = '';
     $this->Assets = array();
     $this->CssClass = '';
     $this->Data = array();
     $this->Head = Gdn::factory('Dummy');
     $this->internalMethods = array('addasset', 'addbreadcrumb', 'addcssfile', 'adddefinition', 'addinternalmethod', 'addjsfile', 'addmodule', 'allowjsonp', 'canonicalurl', 'clearcssfiles', 'clearjsfiles', 'contenttype', 'cssfiles', 'data', 'definitionlist', 'deliverymethod', 'deliverytype', 'description', 'errormessages', 'fetchview', 'fetchviewlocation', 'finalize', 'getasset', 'getimports', 'getjson', 'getstatusmessage', 'image', 'informmessage', 'intitialize', 'isinternal', 'jsfiles', 'json', 'jsontarget', 'masterview', 'pagename', 'permission', 'removecssfile', 'render', 'xrender', 'renderasset', 'renderdata', 'renderexception', 'rendermaster', 'sendheaders', 'setdata', 'setformsaved', 'setheader', 'setjson', 'setlastmodified', 'statuscode', 'title');
     $this->MasterView = '';
     $this->ModuleSortContainer = '';
     $this->OriginalRequestMethod = '';
     $this->RedirectUrl = '';
     $this->RequestMethod = '';
     $this->RequestArgs = false;
     $this->Request = false;
     $this->SelfUrl = '';
     $this->SyndicationMethod = SYNDICATION_NONE;
     $this->Theme = Theme();
     $this->ThemeOptions = Gdn::config('Garden.ThemeOptions', array());
     $this->View = '';
     $this->_CssFiles = array();
     $this->_JsFiles = array();
     $this->_Definitions = array();
     $this->_DeliveryMethod = DELIVERY_METHOD_XHTML;
     $this->_DeliveryType = DELIVERY_TYPE_ALL;
     $this->_FormSaved = '';
     $this->_Json = array();
     $this->_Headers = array('X-Garden-Version' => APPLICATION . ' ' . APPLICATION_VERSION, 'Content-Type' => Gdn::config('Garden.ContentType', '') . '; charset=' . C('Garden.Charset', 'utf-8'));
     if (Gdn::session()->isValid()) {
         $this->_Headers = array_merge($this->_Headers, array('Cache-Control' => 'private, no-cache, max-age=0, must-revalidate', 'Expires' => 'Sat, 01 Jan 2000 00:00:00 GMT', 'Pragma' => 'no-cache'));
     }
     $this->_ErrorMessages = '';
     $this->_InformMessages = array();
     $this->StatusMessage = '';
     parent::__construct();
     $this->ControllerName = strtolower($this->ClassName);
 }
Ejemplo n.º 25
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     $this->Clear();
     parent::__construct();
     $this->ClassName = 'Gdn_Upload';
 }
Ejemplo n.º 26
0
 public function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 27
0
 /**
  * Setup the default locale.
  *
  * @param $LocaleName
  * @param $ApplicationWhiteList
  * @param $PluginWhiteList
  * @param bool $ForceRemapping
  */
 public function __construct($LocaleName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping = false)
 {
     parent::__construct();
     $this->ClassName = 'Gdn_Locale';
     $this->set($LocaleName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping);
 }
Ejemplo n.º 28
0
 public function __construct($LocaleName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping = FALSE)
 {
     $this->Set($LocaleName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping);
     parent::__construct();
 }
Ejemplo n.º 29
0
 /**
  * Class constructor. Defines the related database table name.
  *
  * @param string $Name An optional parameter that allows you to explicitly define the name of
  * the table that this model represents. You can also explicitly set this
  * value with $this->Name.
  */
 public function __construct($Name = '')
 {
     if ($Name == '') {
         $Name = get_class($this);
     }
     $this->Database = Gdn::Database();
     $this->SQL = $this->Database->SQL();
     $this->Validation = new Gdn_Validation();
     $this->Name = $Name;
     parent::__construct();
 }
Ejemplo n.º 30
0
 /**
  *
  *
  * @param $Configuration
  * @param $Type
  * @param $Source
  * @param $Group
  * @param $Settings
  */
 public function __construct($Configuration, $Type, $Source, $Group, $Settings)
 {
     parent::__construct();
     $this->Configuration = $Configuration;
     $this->Type = $Type;
     $this->Source = $Source;
     $this->Group = $Group;
     $this->Initial = $Settings;
     $this->Settings = $Settings;
     $this->Dirty = false;
     $this->Splitting = true;
     $this->Callback = false;
     $this->CallbackOptions = null;
 }