FWS-V2

 view release on metacpan or  search on metacpan

lib/FWS/V2.pm  view on Meta::CPAN

    use base "FWS::V2::Database";
    use base "FWS::V2::Check";
    use base "FWS::V2::File";
    use base "FWS::V2::Format";
    use base "FWS::V2::Net";
    use base "FWS::V2::Legacy";
    use base "FWS::V2::Session";
    use base "FWS::V2::Cache";
    use base "FWS::V2::Geo";
    use base "FWS::V2::Admin";
    use base "FWS::V2::Display";
    use base "FWS::V2::Safety";

}

############ END HIDE ############

sub new {
    my ($class, %params) = @_;
    my $self = bless \%params, $class;

    #
    # set the FWS version we are using
    #
    $self->{FWSVersion} = '2.1';

    #
    # Major version parse
    #
    my @loadVerSplit = split /\./msx, $self->{FWSVersion};
    $self->{FWSMajorVersion} = $loadVerSplit[0] . '.' . $loadVerSplit[1];

    #
    # fake common ENV vars if we don't have them
    #
    $ENV{REMOTE_ADDR} ||= 'localhost';
    $ENV{SERVER_NAME} ||= 'localhost';
    $ENV{REQUEST_URI} ||= '';

    #
    # set the default security hash
    #
    $self->{securityHash}->{isAdmin}{title}           = 'Super User Account';
    $self->{securityHash}->{isAdmin}{note}            = 'This user has access to all FWS features, and has the ability to add and remove admin users.  All installations should have one user of this type for security reasons.  Having a user of this ty...

    $self->{securityHash}->{showContent}{title}       = 'Full Edit Mode Access';
    $self->{securityHash}->{showContent}{note}        = 'Access to view and change the content in edit mode.';

    $self->{securityHash}->{showDesign}{title}        = 'Designer Access';
    $self->{securityHash}->{showDesign}{note}         = 'Add and delete pages, layouts, design css, javascript, and files.';

    $self->{securityHash}->{showDeveloper}{title}     = 'Developer Access';
    $self->{securityHash}->{showDeveloper}{note}      = 'Access to developer controls, element custom element creation and site creation and deletion.';

    $self->{securityHash}->{showQueue}{title}         = 'Email Queue Access';
    $self->{securityHash}->{showQueue}{note}          = 'Access to view email sending queue, and message history.';

    $self->{securityHash}->{showSEO}{title}           = 'SEO Controls';
    $self->{securityHash}->{showSEO}{note}            = 'Access to change SEO Defaults, content and page properties.';

    $self->{securityHash}->{showSiteSettings}{title}  = 'Site Settings Menu';
    $self->{securityHash}->{showSiteSettings}{note}   = 'Generic site settings and 3rd party connector configurations.';

    $self->{securityHash}->{showSiteUsers}{title}     = 'User Account Access';
    $self->{securityHash}->{showSiteUsers}{note}      = 'Access to create, delete and modify high level information for site accounts and groups.';


    # if the admin ID is blank, set it to admin so users can access it via /admin
    $self->{adminURL}                     ||= 'admin';

    # set the secure domain to a non https because it probably does not have a cert if it was not set
    $self->{secureDomain}                 ||= 'http://'.$ENV{SERVER_NAME};

    # Change the theme of the ace IDE for developer mode
    $self->{aceTheme}                     ||= 'idle_fingers';

    # The subdirectory of where tinyMCE is placed to make upgrading  and testing new versions easier
    $self->{tinyMCEPath}                  ||= 'tinymce-3.5.4';

    # Sometimes sites need bigger thatn text blob, 'mediumtext' might be needed
    $self->{scriptTextSize}               ||= 'text';

    # set the domains to the environment version if it was not set
    $self->{sessionCookieName}            ||= 'fws_session';

    # set mysql to default
    $self->{DBType}                       ||= 'mysql';

    # set mysql default port
    $self->{DBPort}                       ||= '3306';

    # set the domains to the environment version if it was not set
    $self->{domain}                       ||= 'http://' . $ENV{SERVER_NAME};

    # if the admin ID is blank, set it to admin so users can access it via /admin
    $self->{FWSPluginServer}              ||= 'https://www.frameworksites.com';

    # the FWS auto update server
    $self->{FWSServer}                    ||= 'http://www.frameworksites.com/downloads';

    # set the default seconds to how long a affiliate code will last once it is recieved
    $self->{affiliateExpMax}              ||= '295200';

    # set the default FWS log level
    $self->{FWSLogLevel}                  ||= 1;

    # set the adminSafeMode for shared mode ( Not yet implemented fully ) 
    $self->{adminSafeMode}                ||= 0;

    # set the default SQL log level
    $self->{SQLLogLevel}                  ||= 0;

    # set the default location for sendmail
    $self->{sendmailBin}                  ||= '/usr/sbin/sendmail';

    # set the default send method to sendmail
    $self->{sendMethod}                   ||= 'sendmail';

    # set the default email so we have sometihng to try if we need to
    # this will get overwritten when siteValues is ran but here for
    # completeness



( run in 1.496 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )