diff --git a/application/configs/application.ini b/application/configs/application.ini index c72453cbe..89efae9e5 100644 --- a/application/configs/application.ini +++ b/application/configs/application.ini @@ -1,428 +1,429 @@ [production] version = "v1.94" ;phpSettings.date.timezone = "UTC" phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 resources.frontController.params.displayExceptions = 0 includePaths.library = APPLICATION_PATH "/../library" autoloaderNamespaces[] = "Local_" autoloaderNamespaces[] = "Ppload_" autoloaderNamespaces[] = "Crontab_" autoloaderNamespaces[] = "Cgsmith" bootstrap.path = APPLICATION_PATH "/modules/default/Bootstrap.php" bootstrap.class = "Bootstrap" resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.frontController.defaultModule = "default" resources.frontController.baseurl = "/" resources.modules[] = resources.layout.layout = "flat_ui_template" resources.layout.layoutPath = APPLICATION_PATH "/modules/default/views/layout" resources.view[] = resources.view.encoding = "UTF-8" resources.view.doctype = "XHTML5" resources.view.contentType = "text/html;charset=utf-8" resources.locale.default = "en_US" resources.locale.force = false resources.locale.registry_key = "Zend_Locale" resources.db.adapter = "pdo_mysql" resources.db.params.host = "host" resources.db.params.username = "uname" resources.db.params.password = "pass" resources.db.params.dbname = "dbname" resources.db.params.charset = "utf8" resources.db.params.type = "pdo_mysql" resources.db.params.driver_options.1002 = "SET NAMES utf8" resources.db.isDefaultTableAdapter = true resources.mail.transport.type = Zend_Mail_Transport_Smtp resources.mail.transport.host = "email-host" resources.mail.transport.port = 587 resources.mail.transport.auth = "login" resources.mail.transport.username = "uname" resources.mail.transport.password = "pass" resources.mail.transport.ssl = "tls" resources.mail.defaultFrom.email = from@ocs-webserver.org resources.mail.defaultFrom.name = "ocs-webserver.org" resources.mail.defaultReplyTo.email = contact@ocs-webserver.org resources.mail.defaultReplyTo.name = "ocs-webserver.org" resources.translate.registry_key = "Zend_Translate" resources.translate.adapter = array resources.translate.options.scan = "directory" resources.translate.locale = "en_US" resources.translate.data.de_DE = APPLICATION_DATA "/locales/de_DE.php" resources.translate.data.en_US = APPLICATION_DATA "/locales/en_US.php" resources.translate.data.zh_CN = APPLICATION_DATA "/locales/zh_CN.php" resources.log.stream.writerName = "Stream" resources.log.stream.writerParams.stream = APPLICATION_PATH "/../data/logs/application.log" resources.log.stream.writerParams.mode = "a" ;resources.log.stream.filterName = "Priority" ;resources.log.stream.filterParams.priority = 8 queue.validate.name = "website_validate" queue.validate.dbAdapter = "Local_Queue_Adapter_Db" queue.validate.messageAdapter = "Local_Queue_Adapter_Db_Message" queue.validate.maxMessages = 1 images.upload.path = APPLICATION_PATH "/../httpdocs/img/data/" images.media.server = "http://cn.any_server.org" images.media.upload = "http://cn.any_server.org/any_path" videos.upload.path = APPLICATION_PATH "/../httpdocs/video/data/" videos.media.server = "http://video.any_server.org" videos.media.upload = "http://video.any_server.org/any_path" videos.media.cdnserver = "http://cdn.any_server.org/" third_party.paypal.sandbox.active = 0 third_party.paypal.security.userid = "ppuid" third_party.paypal.security.password = "pppass" third_party.paypal.security.signature = "ppsig" third_party.paypal.facilitator_fee_receiver = "receiver@mail.com" third_party.paypal.facilitator_fee = 0 third_party.paypal.application.id = "APP-ID" third_party.paypal.api.endpoint = "https://svcs.paypal.com" third_party.paypal.form.endpoint = "https://ic.paypal.com" third_party.paypal.ipn.endpoint = "https://www.paypal.com" third_party.paypal.masspay.endpoint = "https://api-3t.paypal.com/nvp" third_party.paypal.masspay.ipn.endpoint = "https://ipnpb.paypal.com/cgi-bin" third_party.paypal.service.version = "1.2.0" third_party.paypal.request.data.format = "NV" third_party.paypal.response.data.format = "NV" third_party.paypal.client.auth = "Nocert" third_party.paypal.client.application_id = "app" third_party.paypal.client.partner_name = "partner" third_party.paypal.merchantid = 0 third_party.github.client_id = "" third_party.github.client_secret = "" third_party.github.client_callback = $_SERVER['HTTP_HOST'] "/oauth/github" ; deprecated ;third_party.ocs.client_id = "" ;third_party.ocs.client_secret = "" ;third_party.ocs.client_callback = $_SERVER['HTTP_HOST'] "/oauth/ocs" admin.email = "contact@ocs-webserver.org" website.tracking.chartbeat = "/js/tracking/chartbeat.js" website.tracking.google = "/js/tracking/goggle.js" ; Application settings.cache.path = APPLICATION_CACHE settings.log.path = APPLICATION_DATA "/logs/" settings.search.path = APPLICATION_DATA "/indexes/" settings.store.template.path = APPLICATION_DATA "/stores/templates/" settings.store.template.default = "default" phpSettings.session.name = "OcsWebserverId" phpSettings.session.save_path = APPLICATION_DATA "/sessions" phpSettings.session.cookie_httponly = true phpSettings.session.cookie_lifetime = 31536000 phpSettings.session.gc_maxlifetime = 7776000 settings.spam_filter.active = true settings.double_opt_in.active = true settings.session.remember_me.name = "OcsWebserverRememberMe" settings.session.remember_me.cookie_lifetime = 31536000 settings.session.remember_me.cookie_httponly = true settings.session.auth.name = "OcsWebserverSession" settings.session.auth.cookie_lifetime = 31536000 settings.session.auth.cookie_path = "/" settings.session.auth.cookie_httponly = true settings.session.filter_browse_original = 'FilterBrowseOriginalSession' settings.session.auth.anonymous = 'user_anonyous' settings.session.saveHandler.replace.enabled = true settings.session.saveHandler.cache.type = "Libmemcached" settings.session.saveHandler.class = "Local_Session_Handler_Memcache" settings.session.saveHandler.options.servers.0.host = "memcachehost" settings.session.saveHandler.options.servers.0.port = 11211 settings.session.saveHandler.options.servers.0.persistent = true settings.session.saveHandler.options.servers.0.status = true settings.session.saveHandler.options.compression = true settings.cache.enabled = true settings.cache.frontend.type = Core settings.cache.frontend.options.lifetime = 600 settings.cache.frontend.options.automatic_serialization = true settings.cache.frontend.options.cache_id_prefix = "front_" settings.cache.frontend.options.cache = true settings.cache.backend.type = "Libmemcached" settings.cache.backend.options.servers.0.host = "memcachehost" settings.cache.backend.options.servers.0.port = 11211 settings.cache.backend.options.servers.0.persistent = true settings.cache.backend.options.servers.0.weight = 1 settings.cache.backend.options.servers.0.timeout = 5 settings.cache.backend.options.servers.0.retry_interval = 15 ; alternative backend file cache, if no memcache installed (only for development environments) ;settings.cache.backend.type = "File" ;settings.cache.backend.options.cache_dir = APPLICATION_CACHE ;settings.cache.backend.options.file_locking = true ;settings.cache.backend.options.read_control = true ;settings.cache.backend.options.read_control_type = 'crc32' ;settings.cache.backend.options.hashed_directory_level = 1 ;settings.cache.backend.options.hashed_directory_perm = 0700 ;settings.cache.backend.options.file_name_prefix = 'ocs' ;settings.cache.backend.options.cache_file_perm = 0700 settings.search.host = 'localhost' settings.search.port = '8983' settings.search.http_path = '/solr/any_core/' settings.client.default.name = 'default' ; deprecated ;settings.client.config.path = APPLICATION_PATH "/configs/" settings.client.default.baseurl = 'any-host.org' settings.client.default.baseurl_store = 'www.any-host.com' settings.client.default.baseurl_meta = 'any-host.org' settings.client.default.baseurl_member = 'any-host.org' settings.client.default.baseurl_product = 'any-host.org' settings.client.default.baselogo = 'images/system/storeLogo.png' settings.client.default.url_forum = "" settings.client.default.url_blog = "" settings.client.default.url_gitlab = "" settings.client.default.url_myopendesktop = "" settings.client.default.url_cloudopendesktop = "" settings.client.default.url_musicopendesktop = "" settings.client.default.url_docsopendesktop = "" settings.client.default.url_mastodon = "" settings.client.default.url_riot = "" settings.client.default.riot_access_token="" settings.client.default.collection_cat_id = '' settings.client.default.ranking_cat_id = '' settings.client.default.tag_group_collection_type_id = '' settings.client.default.tag_collection_type_collection_id = '' settings.client.default.tag_collection_type_ranking_id = '' settings.client.default.tag_group_original_id = '' settings.client.default.tag_original_id = '' settings.client.default.tag_modification_id = '' ;ebook tag config settings.client.default.tag_group_ebook = '' settings.client.default.tag_group_ebook_author = '' settings.client.default.tag_group_ebook_editor = '' settings.client.default.tag_group_ebook_illustrator = '' settings.client.default.tag_group_ebook_translator = '' settings.client.default.tag_group_ebook_subject = '' settings.client.default.tag_group_ebook_shelf = '' settings.client.default.tag_group_ebook_language = '' settings.client.default.tag_group_ebook_type = '' settings.client.default.tag_is_ebook = '' ;os-user tag config settings.client.default.tag_group_osuser = '' settings.client.default.tag_type_osuser = '' settings.static.include_path = APPLICATION_PATH "/../httpdocs/partials/" settings.static.include.contact = "contact.phtml" settings.static.include.privacy = "privacy.phtml" +settings.static.include.imprint = "imprint.phtml" settings.static.include.terms = "terms.phtml" settings.static.include.terms-general = "terms-general.phtml" settings.static.include.terms-publishing = "terms-publishing.phtml" settings.static.include.terms-payout = "terms-payout.phtml" settings.static.include.terms-dmca = "terms-dmca.phtml" settings.static.include.terms-cookies = "terms-cookies.phtml" settings.static.include.faq = "faq.phtml" settings.static.include.gitfaq = "gitfaq.phtml" settings.static.include.faqold = "faqold.phtml" settings.static.include.about = "about.phtml" settings.static.include.ocsapi = "ocsapi.phtml" settings.queue.general.name = "ocs_jobs" ; timeout in microseconds settings.queue.general.timeout = 600000 settings.queue.general.message_count = 1 settings.noLESScompile = 1 ; set it 1 to prevent that the LESS files are processed and dont forget to kill the cache. otherwise 0 to process less files. settings.savePageView = 1 ; in some server environment we don't want to store the page views. I this case set this value to 0. settings.dwh.db.adapter = "pdo_mysql" settings.dwh.db.params.host = "host" settings.dwh.db.params.username = "uname" settings.dwh.db.params.password = "pass" settings.dwh.db.params.dbname = "dbname" settings.dwh.db.params.charset = "utf8" settings.dwh.db.params.type = "pdo_mysql" settings.dwh.db.params.driver_options.1002 = "SET NAMES utf8" settings.dwh.db.isDefaultTableAdapter = false ; ppload ; deprecated third_party.ppload.server = "https://www.ocs-fileserver.org" third_party.ppload.api_uri = "https://www.ocs-fileserver.org/api/" third_party.ppload.client_id = "clientid" third_party.ppload.secret = "sec" third_party.ppload.download_secret = "sec" ; new fileserver config settings.server.files.host = "" settings.server.files.download_secret = "" settings.server.files.api.uri = "" settings.server.files.api.client_id = "" settings.server.files.api.client_secret= "" settings.server.oauth.host = "" settings.server.oauth.authorize_url = "" settings.server.oauth.token_url = "" settings.server.oauth.callback = $_SERVER['HTTP_HOST'] "/oauth/ocs" settings.server.oauth.client_id = "" settings.server.oauth.client_secret = "" settings.server.oauth.create_user_url = "" settings.server.oauth.profile_user_url = "" settings.server.opencode.host = "" settings.server.opencode.user_logfilename = "opencode" settings.server.opencode.user_sudo = "" settings.server.opencode.user_agent = "OCS Opendesktop" settings.server.opencode.private_token = "" settings.server.opencode.provider_name = "oauth_opendesktop" settings.server.ldap.host = "" settings.server.ldap.port = "389" settings.server.ldap.username = "" settings.server.ldap.password = "" settings.server.ldap.bindRequiresDn = true settings.server.ldap.accountDomainName = "" settings.server.ldap.baseDn = "" settings.server.ldap.accountFilterFormat = "(objectClass=account)" settings.server.ldap.tryUsernameSplit = false settings.server.ldap_group.baseDn = "" settings.server.ldap_ext.rootDn = "" settings.server.forum.host = "" settings.server.forum.user_logfilename = "forum" settings.server.forum.user_sudo = "" settings.server.forum.user_agent = "" settings.server.forum.private_token = "" settings.server.chat.host = "" settings.server.chat.user_logfilename = "chat" settings.server.chat.sudo_user = "" settings.server.chat.sudo_user_pw = "" settings.server.chat.home_server = "" settings.server.chat.user_agent = "" settings.ocs_server.apiUri = "http://ocs-server.org" settings.jwt.secret = "" settings.jwt.expire.accessToken = "2 hours" settings.jwt.expire.refreshToken = "180 days" settings.jwt.expire.cookie = "30 days" settings.jwt.expire.authorizationCode = "10 minutes" settings.jwt.expire.resetCode = "2 hours" settings.jwt.issuer_ident = "http://localhost:80" settings.domain.base.host = "www.example.com" settings.domain.forum.host = "forum.example.com" settings.domain.forum.cookie_name = "_t" settings.domain.openid.host = "id.example.com" settings.domain.openid.cookie_name = "ltat" settings.domain.opencode.host = "git.example.com" settings.domain.opencode.cookie_name = "_example.com_session" settings.domain.mastodon.host = "mastodon.example.com" [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 resources.frontController.params.displayExceptions = 1 resources.db.adapter = "pdo_mysql" resources.db.params.host = "dev-host" resources.db.params.username = "uname" resources.db.params.password = "pass" resources.db.params.dbname = "db" resources.db.params.charset = "utf8" resources.db.isDefaultTableAdapter = true ;resources.db.params.profiler.enabled = "true" ;resources.db.params.profiler.class = "Zend_Db_Profiler_Firebug" third_party.paypal.security.userid = "pp.sandbox.uid" third_party.paypal.security.password = "pppass" third_party.paypal.security.signature = "ppsig" third_party.paypal.sandbox.email = "sanbaox@mail.com" third_party.paypal.facilitator_fee_receiver = "sandbox@mail.com" third_party.paypal.facilitator_fee = 0 third_party.paypal.application.id = "SANDBOX-APP-ID" third_party.paypal.api.endpoint = "https://svcs.sandbox.paypal.com" third_party.paypal.form.endpoint = "https://www.sandbox.paypal.com" third_party.paypal.ipn.endpoint = "https://www.sandbox.paypal.com" [testing : development] [cronjob : production] resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.frontController.defaultControllerName = "cron" resources.frontController.defaultAction = "run" resources.modules[] = resources.frontController.params.displayExceptions = 1 phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 third_party.paypal.sandbox.active = 0 third_party.paypal.security.userid = "ppuid" third_party.paypal.security.password = "pppass" third_party.paypal.security.signature = "ppsig" third_party.paypal.facilitator_fee_receiver = "receiver@mail.com" third_party.paypal.facilitator_fee = 0 third_party.paypal.application.id = "APP-ID" third_party.paypal.api.endpoint = "https://svcs.paypal.com" third_party.paypal.form.endpoint = "https://ic.paypal.com" third_party.paypal.ipn.endpoint = "https://www.paypal.com" third_party.paypal.masspay.endpoint = "https://api-3t.paypal.com/nvp" third_party.paypal.service.version = "1.2.0" third_party.paypal.request.data.format = "NV" third_party.paypal.response.data.format = "NV" third_party.paypal.client.auth = "Nocert" third_party.paypal.client.application_id = "app" third_party.paypal.client.partner_name = "partner" third_party.paypal.test = Live settings.cache.enabled = true settings.cache.frontend.type = Core settings.cache.frontend.options.lifetime = 600 settings.cache.frontend.options.automatic_serialization = true settings.cache.frontend.options.cache_id_prefix = "cron_" settings.cache.frontend.options.cache = true settings.cache.backend.type = File settings.cache.backend.options.cache_dir = APPLICATION_CACHE settings.cache.backend.options.file_locking = true settings.cache.backend.options.read_control = true settings.cache.backend.options.read_control_type = 'crc32' settings.cache.backend.options.hashed_directory_level = 1 settings.cache.backend.options.hashed_directory_perm = 0700 settings.cache.backend.options.file_name_prefix = 'cron_' settings.cache.backend.options.cache_file_perm = 0700 [searchbotenv : production] resources.frontController.params.displayExceptions = 0 phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 diff --git a/application/modules/default/Bootstrap.php b/application/modules/default/Bootstrap.php index a1a501aec..26f2d593e 100644 --- a/application/modules/default/Bootstrap.php +++ b/application/modules/default/Bootstrap.php @@ -1,1097 +1,1104 @@ . **/ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { /** * @return Zend_Application_Module_Autoloader * @throws Zend_Loader_Exception */ protected function _initAutoload() { $autoloader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'Default', 'basePath' => realpath(dirname(__FILE__)), )); $autoloader->addResourceType('formelements', 'forms/elements', 'Form_Element'); $autoloader->addResourceType('formvalidators', 'forms/validators', 'Form_Validator'); return $autoloader; } /** * @throws Zend_Exception * @throws Zend_Session_Exception */ protected function _initSessionManagement() { $config = $this->getOption('settings')['session']; $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false; if ($config['saveHandler']['replace']['enabled']) { $cacheClass = 'Zend_Cache_Backend_' . $config['saveHandler']['cache']['type']; $_cache = new $cacheClass($config['saveHandler']['options']); Zend_Loader::loadClass($config['saveHandler']['class']); Zend_Session::setSaveHandler(new $config['saveHandler']['class']($_cache)); Zend_Session::setOptions(array( 'cookie_domain' => $domain, 'cookie_path' => $config['auth']['cookie_path'], 'cookie_lifetime' => $config['auth']['cookie_lifetime'], 'cookie_httponly' => $config['auth']['cookie_httponly'] )); Zend_Session::start(); } $session_namespace = new Zend_Session_Namespace($config['auth']['name']); $session_namespace->setExpirationSeconds($config['auth']['cookie_lifetime']); Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session($session_namespace->getNamespace())); } protected function _initConfig() { /** $config Zend_Config */ $config = $this->getApplication()->getApplicationConfig(); Zend_Registry::set('config', $config); return $config; } /** * @return mixed|null|Zend_Cache_Core|Zend_Cache_Frontend * @throws Zend_Cache_Exception * @throws Zend_Exception */ protected function _initCache() { if (Zend_Registry::isRegistered('cache')) { return Zend_Registry::get('cache'); } $cache = null; $options = $this->getOption('settings'); if (true == $options['cache']['enabled']) { $cache = Zend_Cache::factory($options['cache']['frontend']['type'], $options['cache']['backend']['type'], $options['cache']['frontend']['options'], $options['cache']['backend']['options']); } else { // Fallback settings for some (maybe development) environments which have no cache management installed. if (false === is_writeable(APPLICATION_CACHE)) { error_log('directory for cache files does not exists or not writable: ' . APPLICATION_CACHE); throw new Zend_Application_Bootstrap_Exception('directory for cache files does not exists or not writable: ' . APPLICATION_CACHE); } $frontendOptions = array( 'lifetime' => 600, 'automatic_serialization' => true, 'cache_id_prefix' => $options['cache']['frontend']['options']['cache_id_prefix'], 'cache' => true ); $backendOptions = array( 'cache_dir' => APPLICATION_CACHE, 'file_locking' => true, 'read_control' => true, 'read_control_type' => 'crc32', 'hashed_directory_level' => 1, 'hashed_directory_perm' => 0700, 'file_name_prefix' => $options['cache']['frontend']['options']['cache_id_prefix'], 'cache_file_perm' => 0700 ); $cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions); } Zend_Registry::set('cache', $cache); Zend_Locale::setCache($cache); Zend_Locale_Data::setCache($cache); Zend_Currency::setCache($cache); Zend_Translate::setCache($cache); Zend_Translate_Adapter::setCache($cache); Zend_Db_Table_Abstract::setDefaultMetadataCache($cache); Zend_Paginator::setCache($cache); return $cache; } /** * @throws Zend_Application_Bootstrap_Exception */ protected function _initViewConfig() { $view = $this->bootstrap('view')->getResource('view'); $view->addHelperPath(APPLICATION_PATH . '/modules/default/views/helpers', 'Default_View_Helper_'); $view->addHelperPath(APPLICATION_LIB . '/Zend/View/Helper', 'Zend_View_Helper_'); $options = $this->getOptions(); $docType = $options['resources']['view']['doctype'] ? $options['resources']['view']['doctype'] : 'XHTML1_TRANSITIONAL'; $view->doctype($docType); } /** * @throws Zend_Locale_Exception */ protected function _initLocale() { $configResources = $this->getOption('resources'); Zend_Locale::setDefault($configResources['locale']['default']); Zend_Registry::set($configResources['locale']['registry_key'], $configResources['locale']['default']); } /** * @return Zend_Translate * @throws Zend_Application_Resource_Exception * @throws Zend_Form_Exception * @throws Zend_Session_Exception * @throws Zend_Translate_Exception * @throws Zend_Validate_Exception */ protected function _initTranslate() { $options = $this->getOption('resources'); $options = $options['translate']; if (!isset($options['data'])) { throw new Zend_Application_Resource_Exception('not found the file'); } $adapter = isset($options['adapter']) ? $options['adapter'] : Zend_Translate::AN_ARRAY; $session = new Zend_Session_Namespace('aa'); if ($session->locale) { $locale = $session->locale; } else { $locale = isset($options['locale']) ? $options['locale'] : null; } $data = ''; if (isset($options['data'][$locale])) { $data = $options['data'][$locale]; } $translateOptions = isset($options['options']) ? $options['options'] : array(); $translate = new Zend_Translate($adapter, $data, $locale, $translateOptions); Zend_Form::setDefaultTranslator($translate); Zend_Validate_Abstract::setDefaultTranslator($translate); Zend_Registry::set('Zend_Translate', $translate); return $translate; } /** * @throws Zend_Application_Bootstrap_Exception */ protected function _initDbAdapter() { $db = $this->bootstrap('db')->getResource('db'); Zend_Registry::set('db', $db); Zend_Db_Table::setDefaultAdapter($db); Zend_Db_Table_Abstract::setDefaultAdapter($db); } /** * @throws Zend_Application_Bootstrap_Exception */ protected function _initLogger() { /** @var Zend_Log $logger */ $logger = $this->getPluginResource('log')->getLog(); $logger->registerErrorHandler(); Zend_Registry::set('logger', $logger); } protected function _initGlobals() { Zend_Paginator::setDefaultScrollingStyle('Elastic'); Zend_View_Helper_PaginationControl::setDefaultViewPartial('paginationControl.phtml'); Zend_Filter::addDefaultNamespaces('Local_Filter'); $version = $this->getOption('version'); defined('APPLICATION_VERSION') || define('APPLICATION_VERSION', $version); } /** * @return Default_Plugin_AclRules|false|mixed * @throws Zend_Cache_Exception */ protected function _initAclRules() { /** @var Zend_Cache_Core $appCache */ $appCache = $this->getResource('cache'); if (false == ($aclRules = $appCache->load('AclRules'))) { $aclRules = new Default_Plugin_AclRules(); Zend_Registry::set('acl', $aclRules); $appCache->save($aclRules, 'AclRules', array('AclRules'), 14400); } return $aclRules; } /** * @throws Zend_Application_Bootstrap_Exception * @throws Zend_Loader_PluginLoader_Exception */ protected function _initPlugins() { /** @var $front Zend_Controller_Front */ $front = $this->bootstrap('frontController')->getResource('frontController'); $aclRules = $this->bootstrap('aclRules')->getResource('aclRules'); $front->unregisterPlugin('Zend_Controller_Plugin_ErrorHandler'); $front->registerPlugin(new Default_Plugin_ErrorHandler()); $front->registerPlugin(new Default_Plugin_RememberMe(Zend_Auth::getInstance())); $front->registerPlugin(new Default_Plugin_SignOn(Zend_Auth::getInstance())); $front->registerPlugin(new Default_Plugin_Acl(Zend_Auth::getInstance(), $aclRules)); $loader = new Zend_Loader_PluginLoader(); $loader->addPrefixPath('Zend_View_Helper', APPLICATION_LIB . '/Zend/View/Helper/') ->addPrefixPath('Zend_Form_Element', APPLICATION_LIB . '/Zend/Form/Element') ->addPrefixPath('Default_View_Helper', APPLICATION_PATH . '/modules/default/views/helpers') ->addPrefixPath('Default_Form_Helper', APPLICATION_PATH . '/modules/default/forms/helpers') ->addPrefixPath('Default_Form_Element', APPLICATION_PATH . '/modules/default/forms/elements') ->addPrefixPath('Default_Form_Decorator', APPLICATION_PATH . '/modules/default/forms/decorators') ->addPrefixPath('Default_Form_Validator', APPLICATION_PATH . '/modules/default/forms/validators'); } protected function _initThirdParty() { $appConfig = $this->getResource('config'); $imageConfig = $appConfig->images; defined('IMAGES_UPLOAD_PATH') || define('IMAGES_UPLOAD_PATH', $imageConfig->upload->path); defined('IMAGES_MEDIA_SERVER') || define('IMAGES_MEDIA_SERVER', $imageConfig->media->server); $videoConfig = $appConfig->videos; defined('VIDEOS_UPLOAD_PATH') || define('VIDEOS_UPLOAD_PATH', $videoConfig->upload->path); defined('VIDEOS_MEDIA_SERVER') || define('VIDEOS_MEDIA_SERVER', $videoConfig->media->server); // fileserver $configFileserver = $appConfig->settings->server->files; defined('PPLOAD_API_URI') || define('PPLOAD_API_URI', $configFileserver->api->uri); defined('PPLOAD_CLIENT_ID') || define('PPLOAD_CLIENT_ID', $configFileserver->api->client_id); defined('PPLOAD_SECRET') || define('PPLOAD_SECRET', $configFileserver->api->client_secret); defined('PPLOAD_HOST') || define('PPLOAD_HOST', $configFileserver->host); defined('PPLOAD_DOWNLOAD_SECRET') || define('PPLOAD_DOWNLOAD_SECRET', $configFileserver->download_secret); } /** * @return false|mixed|Zend_Controller_Router_Rewrite * @throws Zend_Application_Bootstrap_Exception * @throws Zend_Cache_Exception * @throws Zend_Controller_Exception * @throws Zend_Exception */ protected function _initRouter() { $this->bootstrap('frontController'); /** @var $front Zend_Controller_Front */ $front = $this->getResource('frontController'); /** @var Zend_Cache_Core $cache */ $cache = Zend_Registry::get('cache'); if (($router = $cache->load('ProjectRouter'))) { $front->setRouter($router); return $router; } /** @var $router Zend_Controller_Router_Rewrite */ $router = $front->getRouter(); /** RSS Feed */ $router->addRoute('rdf_store', new Zend_Controller_Router_Route('/content.rdf', array( 'module' => 'default', 'controller' => 'rss', 'action' => 'rdf' ))); $router->addRoute('rdf_events_hive', new Zend_Controller_Router_Route_Regex('.*-events.rss', array( 'module' => 'default', 'controller' => 'rss', 'action' => 'rss' ))); $router->addRoute('rdf_store_hive', new Zend_Controller_Router_Route_Regex('.*-content.rdf', array( 'module' => 'default', 'controller' => 'rss', 'action' => 'rdf' ))); $router->addRoute('rdf_store_hive_rss', new Zend_Controller_Router_Route_Regex('rss/.*-content.rdf', array( 'module' => 'default', 'controller' => 'rss', 'action' => 'rdf' ))); /** new store dependent routing rules */ //$router->addRoute('store_general', new Zend_Controller_Router_Route('/s/:domain_store_id/:controller/:action/*', array( // 'module' => 'default', // 'controller' => 'explore', // 'action' => 'index' //))); $router->addRoute('store_home', new Zend_Controller_Router_Route('/s/:domain_store_id/', array( 'module' => 'default', 'controller' => 'home', 'action' => 'index' ))); $router->addRoute('store_browse', new Zend_Controller_Router_Route('/s/:domain_store_id/browse/*', array( 'module' => 'default', 'controller' => 'explore', 'action' => 'index' ))); $router->addRoute('store_product_add', new Zend_Controller_Router_Route('/s/:domain_store_id/product/add', array( 'module' => 'default', 'controller' => 'product', 'action' => 'add' ))); $router->addRoute('store_settings', new Zend_Controller_Router_Route('/s/:domain_store_id/settings', array( 'module' => 'default', 'controller' => 'settings', 'action' => 'index' ))); $router->addRoute('store_pling_box_show', new Zend_Controller_Router_Route('/s/:domain_store_id/supporterbox/:memberid', array( 'module' => 'default', 'controller' => 'plingbox', 'action' => 'index' ))); $router->addRoute('store_pling_box_show', new Zend_Controller_Router_Route('/s/:domain_store_id/productcomment/addreply/*', array( 'module' => 'default', 'controller' => 'productcomment', 'action' => 'addreply' ))); $router->addRoute('store_product', new Zend_Controller_Router_Route('/s/:domain_store_id/p/:project_id/:action/*', array( 'module' => 'default', 'controller' => 'product', 'action' => 'show' ))); $router->addRoute('store_collection', new Zend_Controller_Router_Route('/s/:domain_store_id/c/:project_id/:action/*', array( 'module' => 'default', 'controller' => 'collection', 'action' => 'show' ))); /* $router->addRoute('store_product', new Zend_Controller_Router_Route('/s/:domain_store_id/c/:project_id/:action/*', array( 'module' => 'default', 'controller' => 'collection', 'action' => 'show' ))); */ $router->addRoute('store_user', new Zend_Controller_Router_Route('/s/:domain_store_id/member/:member_id/:action/*', array( 'module' => 'default', 'controller' => 'user', 'action' => 'index' ))); $router->addRoute('store_user_name', new Zend_Controller_Router_Route('/s/:domain_store_id/u/:user_name/:action/*', array( 'module' => 'default', 'controller' => 'user', 'action' => 'index' ))); $router->addRoute('store_login', new Zend_Controller_Router_Route('/s/:domain_store_id/login/*', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'login' ))); $router->addRoute('store_register', new Zend_Controller_Router_Route('/s/:domain_store_id/register', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'register' ))); /** general routing rules */ $router->addRoute('home', new Zend_Controller_Router_Route('/', array( 'module' => 'default', 'controller' => 'home', 'action' => 'index' ))); $router->addRoute('home_home', new Zend_Controller_Router_Route('/home', array( 'module' => 'default', 'controller' => 'home', 'action' => 'index' ))); $router->addRoute('home_start', new Zend_Controller_Router_Route('/start', array( 'module' => 'default', 'controller' => 'home', 'action' => 'start' ))); $router->addRoute('home_ajax', new Zend_Controller_Router_Route('/showfeatureajax/*', array( 'module' => 'default', 'controller' => 'home', 'action' => 'showfeatureajax' ))); $router->addRoute('backend', new Zend_Controller_Router_Route('/backend/:controller/:action/*', array( 'module' => 'backend', 'controller' => 'index', 'action' => 'index' ))); $router->addRoute('backend_statistics', new Zend_Controller_Router_Route('/statistics/:action/*', array( 'module' => 'backend', 'controller' => 'statistics', 'action' => 'index' ))); $router->addRoute('browse', new Zend_Controller_Router_Route('/browse/*', array( 'module' => 'default', 'controller' => 'explore', 'action' => 'index' ))); $router->addRoute('browse_favourites', new Zend_Controller_Router_Route('/my-favourites/*', array( 'module' => 'default', 'controller' => 'explore', 'action' => 'index', 'fav' => '1' ))); $router->addRoute('button_render', new Zend_Controller_Router_Route('/button/:project_id/:size/', array( 'module' => 'default', 'controller' => 'button', 'action' => 'render', 'size' => 'large' ))); $router->addRoute('button_action', new Zend_Controller_Router_Route('/button/a/:action/', array( 'module' => 'default', 'controller' => 'button', 'action' => 'index' ))); $router->addRoute('pling_box_show', new Zend_Controller_Router_Route('/supporterbox/:memberid/', array( 'module' => 'default', 'controller' => 'plingbox', 'action' => 'index' ))); $router->addRoute('external_donation_list', new Zend_Controller_Router_Route('/donationlist/:project_id/', array( 'module' => 'default', 'controller' => 'donationlist', 'action' => 'render' ))); $router->addRoute('external_widget', new Zend_Controller_Router_Route('/widget/:project_id/', array( 'module' => 'default', 'controller' => 'widget', 'action' => 'render' ))); $router->addRoute('external_widget_save', new Zend_Controller_Router_Route('/widget/save/*', array( 'module' => 'default', 'controller' => 'widget', 'action' => 'save' ))); $router->addRoute('external_widget_save', new Zend_Controller_Router_Route('/widget/config/:project_id/', array( 'module' => 'default', 'controller' => 'widget', 'action' => 'config' ))); $router->addRoute('external_widget_save_default', new Zend_Controller_Router_Route('/widget/savedefault/*', array( 'module' => 'default', 'controller' => 'widget', 'action' => 'savedefault' ))); $router->addRoute('support_old', new Zend_Controller_Router_Route('/support-old', array( 'module' => 'default', 'controller' => 'support', 'action' => 'index' ))); $router->addRoute('support_old_pay', new Zend_Controller_Router_Route('/support-old/pay', array( 'module' => 'default', 'controller' => 'support', 'action' => 'pay' ))); $router->addRoute('support_old_paymentok', new Zend_Controller_Router_Route('/support-old/paymentok', array( 'module' => 'default', 'controller' => 'support', 'action' => 'paymentok' ))); $router->addRoute('support_old_paymentcancel', new Zend_Controller_Router_Route('/support-old/paymentcancel', array( 'module' => 'default', 'controller' => 'support', 'action' => 'paymentcancel' ))); $router->addRoute('samepaypal', new Zend_Controller_Router_Route('/samepaypal', array( 'module' => 'default', 'controller' => 'spam', 'action' => 'paypal' ))); $router->addRoute('support_new', new Zend_Controller_Router_Route('/supportold2', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'index' ))); $router->addRoute('support_predefined', new Zend_Controller_Router_Route('/support-predefined', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'supportpredefinded' ))); $router->addRoute('support_pay_predefined', new Zend_Controller_Router_Route('/support/paypredefined', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'paypredefined' ))); $router->addRoute('support_new2', new Zend_Controller_Router_Route('/support', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'support2' ))); $router->addRoute('support_new_pay2', new Zend_Controller_Router_Route('/support/pay', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'pay2' ))); $router->addRoute('support_new_pay', new Zend_Controller_Router_Route('/support/payold2', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'pay' ))); $router->addRoute('support_new_paymentok', new Zend_Controller_Router_Route('/support/paymentok', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'paymentok' ))); $router->addRoute('support_new_paymentcancel', new Zend_Controller_Router_Route('/support/paymentcancel', array( 'module' => 'default', 'controller' => 'subscription', 'action' => 'paymentcancel' ))); /** * Project/Product */ $router->addRoute('product_short_url', new Zend_Controller_Router_Route('/p/:project_id/:action/*', array( 'module' => 'default', 'controller' => 'product', 'action' => 'show' ))); $router->addRoute('product_referrer_url', new Zend_Controller_Router_Route('/p/:project_id/er/:er/*', array( 'module' => 'default', 'controller' => 'product', 'action' => 'show' ))); $router->addRoute('product_collectionid_url', new Zend_Controller_Router_Route('/co/:collection_id', array( 'module' => 'default', 'controller' => 'product', 'action' => 'show' ))); $router->addRoute('product_add', new Zend_Controller_Router_Route('/product/add', array( 'module' => 'default', 'controller' => 'product', 'action' => 'add' ))); $router->addRoute('product_add_extend', new Zend_Controller_Router_Route('/product/add/:catId', array( 'module' => 'default', 'controller' => 'product', 'action' => 'add' ))); $router->addRoute('search', new Zend_Controller_Router_Route('/search/*', array( 'module' => 'default', 'controller' => 'product', 'action' => 'search' ))); $router->addRoute('search_domain', new Zend_Controller_Router_Route('/s/:domain_store_id/search/*', array( 'module' => 'default', 'controller' => 'product', 'action' => 'search' ))); $router->addRoute('product_save', new Zend_Controller_Router_Route('/p/save/*', array( 'module' => 'default', 'controller' => 'product', 'action' => 'saveproduct' ))); /** * Collection */ $router->addRoute('collection_short_url', new Zend_Controller_Router_Route('/c/:project_id/', array( 'module' => 'default', 'controller' => 'collection', 'action' => 'index' ))); $router->addRoute('collection_short_url', new Zend_Controller_Router_Route('/c/:project_id/:action/*', array( 'module' => 'default', 'controller' => 'collection', 'action' => 'index' ))); $router->addRoute('collection_referrer_url', new Zend_Controller_Router_Route('/c/:project_id/er/:er/*', array( 'module' => 'default', 'controller' => 'collection', 'action' => 'index' ))); $router->addRoute('collection_add', new Zend_Controller_Router_Route('/collection/add', array( 'module' => 'default', 'controller' => 'collection', 'action' => 'add' ))); /** * $router->addRoute('search', new Zend_Controller_Router_Route('/search/*', array( * 'module' => 'default', * 'controller' => 'collection', * 'action' => 'search' * ))); * * $router->addRoute('search_domain',new Zend_Controller_Router_Route('/s/:domain_store_id/search/*', * array( * 'module' => 'default', * 'controller' => 'product', * 'action' => 'search' * ))); */ $router->addRoute('collection_save', new Zend_Controller_Router_Route('/c/save/*', array( 'module' => 'default', 'controller' => 'collection', 'action' => 'saveproduct' ))); /** * Member */ $router->addRoute('member_settings_old', new Zend_Controller_Router_Route('/settings/:action/*', array( 'module' => 'default', 'controller' => 'settings', 'action' => 'index' ))); $router->addRoute('user_show', new Zend_Controller_Router_Route('/member/:member_id/:action/*', array( 'module' => 'default', 'controller' => 'user', 'action' => 'index' ))); $router->addRoute('user_avatar', new Zend_Controller_Router_Route('/member/avatar/:emailhash/:size', array( 'module' => 'default', 'controller' => 'user', 'action' => 'avatar' ))); $router->addRoute('user_show_with_name', new Zend_Controller_Router_Route('/u/:user_name/:action/*', array( 'module' => 'default', 'controller' => 'user', 'action' => 'index' ))); $router->addRoute('user_recification', new Zend_Controller_Router_Route('/r/:action/*', array( 'module' => 'default', 'controller' => 'rectification', 'action' => 'index' ))); $router->addRoute('user_show_short', new Zend_Controller_Router_Route('/me/:member_id/:action/*', array( 'module' => 'default', 'controller' => 'user', 'action' => 'index' ))); $router->addRoute('register', new Zend_Controller_Router_Route_Static('/register', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'register' ))); $router->addRoute('register_validate', new Zend_Controller_Router_Route_Static('/register/validate', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'validate' ))); $router->addRoute('verification', new Zend_Controller_Router_Route('/verification/:vid', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'verification' ))); $router->addRoute('logout', new Zend_Controller_Router_Route_Static('/logout', array( 'module' => 'default', 'controller' => 'logout', 'action' => 'logout' ))); $router->addRoute('propagatelogout', new Zend_Controller_Router_Route_Static('/logout/propagate', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'propagatelogout' ))); $router->addRoute('checkuser', new Zend_Controller_Router_Route_Static('/checkuser', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'checkuser' ))); $router->addRoute('login', new Zend_Controller_Router_Route('/login', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'login' ))); $router->addRoute('login', new Zend_Controller_Router_Route('/login/:action/*', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'login' ))); $router->addRoute('LoginController', new Zend_Controller_Router_Route('/l/:action/*', array( 'module' => 'default', 'controller' => 'login', 'action' => 'login' ))); $router->addRoute('content', new Zend_Controller_Router_Route('/content/:page', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index' ))); $router->addRoute('categories_about', new Zend_Controller_Router_Route('/cat/:page/about', array( 'module' => 'default', 'controller' => 'categories', 'action' => 'about' ))); // **** static routes $router->addRoute('static_faq_old', new Zend_Controller_Router_Route_Static('/faq-old', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'faqold' ))); $router->addRoute('static_faq', new Zend_Controller_Router_Route_Static('/faq-pling', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'faq' ))); $router->addRoute('static_gitfaq', new Zend_Controller_Router_Route_Static('/faq-opencode', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'gitfaq' ))); $router->addRoute('static_ocsapi', new Zend_Controller_Router_Route_Static('/ocs-api', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'ocsapi' ))); $router->addRoute('static_plings', new Zend_Controller_Router_Route_Static('/about', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'about' ))); $router->addRoute('static_terms', new Zend_Controller_Router_Route_Static('/terms', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'terms' ))); $router->addRoute('static_terms_general', new Zend_Controller_Router_Route_Static('/terms/general', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'terms-general' ))); $router->addRoute('static_terms_publish', new Zend_Controller_Router_Route_Static('/terms/publishing', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'terms-publishing' ))); $router->addRoute('static_terms_dmca', new Zend_Controller_Router_Route_Static('/terms/dmca', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'terms-dmca' ))); $router->addRoute('static_terms_payout', new Zend_Controller_Router_Route_Static('/terms/payout', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'terms-payout' ))); $router->addRoute('static_terms_cookies', new Zend_Controller_Router_Route_Static('/terms/cookies', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'terms-cookies' ))); $router->addRoute('static_privacy', new Zend_Controller_Router_Route_Static('/privacy', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'privacy' ))); + $router->addRoute('static_imprint', new Zend_Controller_Router_Route_Static('/imprint', array( + 'module' => 'default', + 'controller' => 'content', + 'action' => 'index', + 'page' => 'imprint' + ))); + $router->addRoute('static_contact', new Zend_Controller_Router_Route_Static('/contact', array( 'module' => 'default', 'controller' => 'content', 'action' => 'index', 'page' => 'contact' ))); // **** ppload $router->addRoute('pploadlogin', new Zend_Controller_Router_Route('/pploadlogin/*', array( 'module' => 'default', 'controller' => 'authorization', 'action' => 'pploadlogin' ))); // OCS API $router->addRoute('ocs_providers_xml', new Zend_Controller_Router_Route('/ocs/providers.xml', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'providers' ))); $router->addRoute('ocs_v1_config', new Zend_Controller_Router_Route('/ocs/v1/config', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'config' ))); $router->addRoute('ocs_v1_person_check', new Zend_Controller_Router_Route('/ocs/v1/person/check', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'personcheck' ))); $router->addRoute('ocs_v1_person_data', new Zend_Controller_Router_Route('/ocs/v1/person/data', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'persondata' ))); $router->addRoute('ocs_v1_person_data_personid', new Zend_Controller_Router_Route('/ocs/v1/person/data/:personid', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'persondata' ))); $router->addRoute('ocs_v1_person_self', new Zend_Controller_Router_Route('/ocs/v1/person/self', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'personself' ))); $router->addRoute('ocs_v1_content_categories', new Zend_Controller_Router_Route('/ocs/v1/content/categories', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'contentcategories' ))); $router->addRoute('ocs_v1_content_data_contentid', new Zend_Controller_Router_Route('/ocs/v1/content/data/:contentid', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'contentdata', 'contentid' => null ))); $router->addRoute('ocs_v1_content_download_contentid_itemid', new Zend_Controller_Router_Route('/ocs/v1/content/download/:contentid/:itemid', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'contentdownload' ))); $router->addRoute('ocs_v1_content_previewpic_contentid', new Zend_Controller_Router_Route('/ocs/v1/content/previewpic/:contentid', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'contentpreviewpic' ))); $router->addRoute('ocs_v1_comments', new Zend_Controller_Router_Route('/ocs/v1/comments/data/:comment_type/:content_id/:second_id', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'comments', 'comment_type' => -1, 'content_id' => null, 'second_id' => null ))); $router->addRoute('ocs_v1_voting', new Zend_Controller_Router_Route('/ocs/v1/content/vote/:contentid', array( 'module' => 'default', 'controller' => 'ocsv1', 'action' => 'vote' ))); // embed $router->addRoute('embed_v1_member_projects', new Zend_Controller_Router_Route('/embed/v1/member/:memberid', array( 'module' => 'default', 'controller' => 'embedv1', 'action' => 'memberprojects' ))); $router->addRoute('embed_v1_member_projects_files', new Zend_Controller_Router_Route('/embed/v1/ppload/:ppload_collection_id', array( 'module' => 'default', 'controller' => 'embedv1', 'action' => 'ppload' ))); $router->addRoute('embed_v1_member_projectscomments', new Zend_Controller_Router_Route('/embed/v1/comments/:id', array( 'module' => 'default', 'controller' => 'embedv1', 'action' => 'comments' ))); $router->addRoute('embed_v1_member_projectdetail', new Zend_Controller_Router_Route('/embed/v1/project/:projectid', array( 'module' => 'default', 'controller' => 'embedv1', 'action' => 'projectdetail' ))); $router->addRoute('clones', new Zend_Controller_Router_Route('/clones/*', array( 'module' => 'default', 'controller' => 'credits', 'action' => 'index' ))); $cache->save($router, 'ProjectRouter', array('router'), 14400); return $router; } /** * @throws Zend_Cache_Exception * @throws Zend_Exception * @throws exception */ protected function _initCss() { if (APPLICATION_ENV != "development" && APPLICATION_ENV != "staging") { return; } $appConfig = $this->getResource('config'); if ((boolean)$appConfig->settings->noLESScompile === true) { return; } $sLess = realpath(APPLICATION_PATH . '/../httpdocs/theme/flatui/less/stylesheet.less'); $sCss = realpath(APPLICATION_PATH . '/../httpdocs/theme/flatui/css/stylesheet.css'); /** * @var Zend_Cache_Core $cache */ $cache = Zend_Registry::get('cache'); if (md5_file($sLess) !== $cache->load('md5Less')) { require_once APPLICATION_PATH . "/../library/lessphp/lessc.inc.php"; $oLessc = new lessc($sLess); $oLessc->setFormatter('compressed'); file_put_contents($sCss, $oLessc->parse()); $cache->save(md5_file($sLess), 'md5Less'); } } protected function _initGlobalApplicationVars() { $modelDomainConfig = new Default_Model_DbTable_ConfigStore(); Zend_Registry::set('application_store_category_list', $modelDomainConfig->fetchAllStoresAndCategories()); Zend_Registry::set('application_store_config_list', $modelDomainConfig->fetchAllStoresConfigArray()); Zend_Registry::set('application_store_config_id_list', $modelDomainConfig->fetchAllStoresConfigByIdArray()); } /** * @throws Zend_Application_Bootstrap_Exception */ protected function _initStoreDependentVars() { /** @var $front Zend_Controller_Front */ $front = $this->bootstrap('frontController')->getResource('frontController'); $front->registerPlugin(new Default_Plugin_InitGlobalStoreVars()); } } diff --git a/application/modules/default/views/scripts/partials/footer/template.phtml b/application/modules/default/views/scripts/partials/footer/template.phtml index b0cf43019..d303e15f4 100644 --- a/application/modules/default/views/scripts/partials/footer/template.phtml +++ b/application/modules/default/views/scripts/partials/footer/template.phtml @@ -1,71 +1,72 @@ . **/ ?> diff --git a/httpdocs/partials/imprint.phtml b/httpdocs/partials/imprint.phtml new file mode 100644 index 000000000..81126fec7 --- /dev/null +++ b/httpdocs/partials/imprint.phtml @@ -0,0 +1,25 @@ +
+
+

Imprint

+
+

Hive01 GmbH

+ +

Am Speksel 10

+ +

33649 Bielefeld

+ +

Fon +49 0521 417 699-0

+ +

Email contact@opendesktop.org

+ +

Geschäftsführer: Marc Jünger

+ +

Amtsgericht Bielefeld HRB 42225

+ +

Umsatzsteuer-Identifikationsnummer DE261388879

+ +

+

Questions

+
+

If you have questions or suggestions, please contact us: contact@opendesktop.org

+
\ No newline at end of file