Skip to content

Commit

Permalink
Remove unused & deprecated google translate feature
Browse files Browse the repository at this point in the history
  • Loading branch information
kpicaza committed Jan 28, 2022
1 parent 4efdabb commit 0640d46
Show file tree
Hide file tree
Showing 130 changed files with 23,964 additions and 4,598 deletions.
15 changes: 13 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@
"support": {
"issues": "https://github.com/sifophp/SIFO/issues"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/sifophp/sifoweb.git"
}
],
"require": {
"php": ">=7.2",
"adodb/adodb-php": "^5.21",
"geoip/geoip": "^1.17",
"neutron/sphinxsearch-api": "^2.0",
"phpmailer/phpmailer": "^6.0",
"psr/container": "^1.0",
"sifophp/sifo-common-instance": "^2.14",
"smarty/smarty": "^3.1",
"symfony/dotenv": "^3.3.1|^4.3.1|^5.0.1",
"symfony/yaml": "^3.2|^4.3.1|^5.0.1",
Expand All @@ -34,9 +39,12 @@
"twig/twig": "^2.0"
},
"require-dev": {
"adlawson/vfs": "^0.12.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^5.0",
"symfony/var-dumper": "^3.2"
"sifophp/sifo-common-instance": "*",
"sifophp/sifoweb": "@dev",
"symfony/var-dumper": "^5.4"
},
"scripts": {
"cs-check": "phpcs src --colors",
Expand All @@ -47,6 +55,9 @@
"sort-packages": true
},
"autoload": {
"psr-4": {
"Sifo\\": "src/Sifo/"
},
"classmap" : [
"src/Sifo"
]
Expand Down
Empty file.
31 changes: 31 additions & 0 deletions instances/example/config/301_rules.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* Predefined 301 jumps.
*
* This config is required before launch the NO_ROUTE_FOUND behaviour in Router class.
* Used to define 301 jumps from old to new urls.
*
* Description:
* $config[ string $regexp] = string $url_definition
*
* Params:
* regexp
* Regular expression to identify the affected url's.
*
* url_definition
* Destiny url using the param's defined in regexp.
*
* Example:
*
* Given the (old) address: http://www.whatdoyouwant.com?search=doggie_and_kittens
* And the (new) address: http://doggie_and_kittens.whatdoyouwant.com
* We could define this rule:
* $config['/www.whatdoyouwant.com\/?\?search=(.+)$/'] = '$1.whatdoyouwant.com';
*
*
* Trick:
* You can use the Jordi Rivero's useful site to test your definitions. @link: http://xrg.es
*/
// ____________________________________________________________________________

$config = array();
22 changes: 22 additions & 0 deletions instances/example/config/cache.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

// Sets if memcache is active or not. If disabled, the system will cache to disk (if your application uses any caching).
$config['active'] = false;

// Whether to use the Memcache client, or the new Memcached client (see your PHP.ini)
$config['client'] = 'Memcache'; // Memcache or Memcached.

// List of available memcache servers, format: 'host' => 'port'
$config['servers'][] = array( '127.0.0.1' => '11211' );

/**
* Tags definition:
*
* Tags are a label used in your cache usage that allows you to group
* cache keys. By doing this when you delete a tag all the associated
* cache keys with this label (or tag) are aso deleted.
*/
$config['cache_tags'] = array( // Sample tags
'id_user',
'type'
);
65 changes: 65 additions & 0 deletions instances/example/config/classes.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php
include ROOT_PATH . '/vendor/sifophp/sifo-common-instance/config/classes.config.php';
$config['APITwitter']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/API/Twitter.php';
$config['APIYoutube']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/API/Youtube.php';
$config['AmazonS3']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/AmazonS3.php';
$config['Benchmark']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Benchmark.php';
$config['Bootstrap']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Bootstrap.php';
$config['CLBootstrap']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/CLBootstrap.php';
$config['Cache']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cache.php';
$config['CacheBase']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cache/Base.php';
$config['CacheDisk']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cache/Disk.php';
$config['CacheLock']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cache/Lock.php';
$config['CacheMemcache']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cache/Memcache.php';
$config['CacheMemcacheAdapter']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cache/MemcacheAdapter.php';
$config['CacheMemcached']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cache/Memcached.php';
$config['Client']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Client.php';
$config['Config']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Config.php';
$config['Controller']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Controller.php';
$config['Cookie']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Cookie.php';
$config['Crypt']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Crypt.php';
$config['CssPacker']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/CssPacker.php';
$config['Database']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Database.php';
$config['Debug']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Debug.php';
$config['DebugDataBaseHandler']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Debug/DataBaseHandler.php';
$config['DebugMysql']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Debug/Mysql.php';
$config['DebugPredisProxyClient']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Debug/PredisProxyClient.php';
$config['DebugSearch']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Debug/Search.php';
$config['DebugSphinxql']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Debug/Sphinxql.php';
$config['Dir']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Dir.php';
$config['DirectoryList']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/DirectoryList.php';
$config['Domains']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Domains.php';
$config['Exceptions']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Exceptions.php';
$config['Filter']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Filter.php';
$config['FlashMessages']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/FlashMessages.php';
$config['Form']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Form.php';
$config['Headers']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Headers.php';
$config['I18N']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/I18N.php';
$config['ImageController']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/imageController.php';
$config['Images']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Images.php';
$config['JsPacker']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/JsPacker.php';
$config['Keyspace']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Keyspace.php';
$config['LoadBalancer']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/LoadBalancer.php';
$config['Mail']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Mail.php';
$config['MediaGenerator']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/MediaGenerator.php';
$config['MediaPacker']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/MediaPacker.php';
$config['Metadata']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Metadata.php';
$config['Model']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Model.php';
$config['Mysql']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Mysql.php';
$config['MysqlModel']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/MysqlModel.php';
$config['Password']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Password.php';
$config['PaypalNotifier']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/PaypalNotifier.php';
$config['RedisModel']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/RedisModel.php';
$config['Registry']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Registry.php';
$config['Router']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Router.php';
$config['Search']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Search.php';
$config['Session']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Session.php';
$config['Sphinxql']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Sphinxql.php';
$config['Urls']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/Urls.php';
$config['View']['Sifo'] = 'vendor/sifophp/sifo/src/Sifo/View.php';
$config['HomeIndexController']['Example'] = 'instances/example/controllers/home/index.ctrl.php';
$config['SharedFirstLevelController']['Example'] = 'instances/example/controllers/shared/firstLevel.ctrl.php';
$config['SharedFooterController']['Example'] = 'instances/example/controllers/shared/footer.ctrl.php';
$config['SharedHeadController']['Example'] = 'instances/example/controllers/shared/head.ctrl.php';
$config['SharedHeaderController']['Example'] = 'instances/example/controllers/shared/header.ctrl.php';
$config['SharedSystemMessagesController']['Example'] = 'instances/example/controllers/shared/systemMessages.ctrl.php';
22 changes: 22 additions & 0 deletions instances/example/config/configuration_files.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
include ROOT_PATH . '/vendor/sifophp/sifo-common-instance/config/configuration_files.config.php';
$config['301_rules'] = 'instances/example/config/301_rules.config.php';
$config['cache'] = 'instances/example/config/cache.config.php';
$config['classes'] = 'instances/example/config/classes.config.php';
$config['css'] = 'instances/example/config/css.config.php';
$config['db_profiles'] = 'instances/example/config/db_profiles.config.php';
$config['debug_config'] = 'instances/example/config/debug_config.config.php';
$config['domains'] = 'instances/example/config/domains.config.php';
$config['forms/example.form'] = 'instances/example/config/forms/example.form.config.php';
$config['js'] = 'instances/example/config/js.config.php';
$config['lang/metadata_en_US'] = 'instances/example/config/lang/metadata_en_US.config.php';
$config['lang/metadata_es_ES'] = 'instances/example/config/lang/metadata_es_ES.config.php';
$config['lang/router_en_US'] = 'instances/example/config/lang/router_en_US.config.php';
$config['lang/router_es_ES'] = 'instances/example/config/lang/router_es_ES.config.php';
$config['libraries'] = 'instances/example/config/libraries.config.php';
$config['locale'] = 'instances/example/config/locale.config.php';
$config['router'] = 'instances/example/config/router.config.php';
$config['templates'] = 'instances/example/config/templates.config.php';
$config['url'] = 'instances/example/config/url.config.php';
$config['url_definition'] = 'instances/example/config/url_definition.config.php';
$config['views'] = 'instances/example/config/views.config.php';
16 changes: 16 additions & 0 deletions instances/example/config/css.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

$config['default'] = array(
'media' => 'screen',
'files' => array(
'instances/common/public/static/css/bootstrap.css'
)
);

$config['print'] = array(
'media' => 'print',
'files' => array(
'instances/obolog/public/static/css/print.css'
)
);

46 changes: 46 additions & 0 deletions instances/example/config/db_profiles.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* Database profiles used in a Master/Slave schema.
*
* You need to return a $config variable with the following FIXED Syntax:
*
* $config['PROFILE_NAME_INCLUDED_IN_DOMAINS']['master'] = array( $db_properties )
* $config['PROFILE_NAME_INCLUDED_IN_DOMAINS']['slaves'] = array( array( $db_1_properties), array( $db_2_properties), ... )
*
*/

$profile_production['master'] = array(
'db_driver' => 'mysqli',
'db_library' => 'adodb',
'db_host' => 'dbmaster',
'db_user' => 'myuser',
'db_password' => 'xxxx',
'db_name' => 'mydbname',
'db_init_commands' => array( 'SET NAMES utf8' )
);

$profile_production['slaves'] = array(
array(
'db_driver' => 'mysqli',
'db_library' => 'adodb',
'db_host' => 'dbslave1',
'db_user' => 'myuser',
'db_password' => 'xxxx',
'db_name' => 'mydbname',
'db_init_commands' => array( 'SET NAMES utf8' ),
'weight' => 1000,
),
array(
'db_driver' => 'mysqli',
'db_library' => 'adodb',
'db_host' => 'dbslave2',
'db_user' => 'myuser',
'db_password' => 'xxxx',
'db_name' => 'mydbname',
'db_init_commands' => array( 'SET NAMES utf8' ),
'weight' => 500,
)
);

$config['PRODUCTION'] = $profile_production;
$config['DEVELOPMENT'] = $profile_production;
15 changes: 15 additions & 0 deletions instances/example/config/debug_config.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Debug config.
* If array is empty, in Debug will be showed all the information available.
* You can define wich modules do you want to be showed in debug. For example:
*
* $config['debug']['queries'] = true;
* $config['debug']['searches'] = false;
* $config['debug']['log_messages'] = true;
*
* In that case, debug will show the queries module and logs modules. Searches won't be showed even it has information.
*
*/

$config['debug'] = array();
115 changes: 115 additions & 0 deletions instances/example/config/domains.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?php
/**
Syntax of the domains:
$config['domain.com'] = array(
'devel' => false,
'has_debug' => false,
'instance' => 'common',
'auth' => 'user,password', // User and password requested by the browser, comment to disable
'trusted_ips' = 'ip1,ip2,...,ipn'; // When the auth directive is in use. Define here trusted user ip's for access without password.
'lang_in_subdomain' => true, // The language is set in the subdomain. E.g: fr.subdomain.com
'www_as_subdomain' => true, // Are you using "www" as a "default" subdomain or not.
'language' => 'es', // Language by default, e.g. domain.es is always in Spanish
'language_domain' =>'messages' // Name of the file containing the translations,
'static_host' => 'http://static.sifo.local', // host containing the images and other static content
'media_host' => 'http://media.sifo.local', // Avatars and other media not fitting under static. Comment or remove to disable.
'database' => array(
'db_driver' => 'mysql', // mysqli also available
'db_host' => '127.0.0.1',
'db_user' => 'root',
'db_password' => 'root',
'db_name' => 'mydatabase',
'db_init_commands' => array( 'SET NAMES utf8' ),
// 'profile' => 'PRODUCTION' // This option overrides all the previous keys and uses the profile set in db_profiles.config.php
),
// REDIS syntax:
// 'redis' => array(
// 'database' => array(
// 'host' => '127.0.0.1',
// 'port' => 6379,
// 'database' => 0
),
// Sphinx connection parameters.
// This definition has priority over the sphinx.config file, use it wisely.
'sphinx' => array(
'active' => true,
'server' => 'localhost',
'port' => 9312
),
'php_ini_sets' => array( // Changes in php.ini conf. You'd better make changes in your php.ini and leave this array empty.
'log_errors' => 'On',
'error_log' => ROOT_PATH . '/logs/errors.log',
'short_open_tag' => '1'
).
'libraries_profile' => 'default', // This profile defines the versions of libraries your project will use.
// By default (if you don't add this variable in your domains.config) will use "common" profile.
);
Redirections use the EXACT term in the host, and needs the format
$config['redirections'] = array( array( 'from' => 'domain.old', 'to' => 'http://domain.new' ), array( 'from' => 'domain2.old', 'to' => 'http://domain.new' ),... );
FROM: is only the host while TO contains the protocol.
Use $config['core_inheritance'] for active new versions of core.
$config['core_inheritance'] = array( 'Sifo', 'Sifo5.3' ); // For work with SIFO for php5.3
*/;

$config['core_inheritance'] = array( 'Sifo' );
// Define the inheritance of this instance (which instances are their parents:
// $config['instance_inheritance'] = array( 'common', 'mygrandparent', 'myparent' );

$config['redirections'] = array(
array( 'from' => 'www.sifo.local', 'to' => 'http://sifo.local' ),
array( 'from' => 'www2.sifo.local', 'to' => 'http://sifo.local' ),
);

// This is used by external scripts in order to know if this is an executable instance or an abstract one.
$config['instance_type'] = 'instantiable';

$config['127.0.0.1'] = array(
'devel' => true, // Domain is marked as development
'has_debug' => true, // Domain shows the floating debug box.
'instance' => 'example',
'language' => 'en_US',
'language_domain' =>'messages',
'lang_in_subdomain' => array( 'es' => 'es_ES', 'en' => 'en_US' ),
'www_as_subdomain' => false,
'static_host' => 'http://static.sifo.local',
'media_host' => 'http://static.sifo.local', // Alternative static content (media). Comment to disable.
'database' => array(
// If you need a master/slave schema enable the 'profile' line below:
// 'profile' => 'PRODUCTION', // Use this option for MASTER/SLAVE configurations and fill db_profiles.config.php with credentials.
'db_driver' => 'mysql', // To use transactions you must use mysqli driver.
'db_host' => '127.0.0.1',
'db_user' => 'root',
'db_password' => 'root',
'db_name' => 'yourdatabase',
'db_init_commands' => array( 'SET NAMES utf8' ) // Commands launched before the queries.
),
/* REDIS syntax:
'database' => array(
'database' => array(
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0
),
// Sphinx connection parameters.
// This definition has priority over the sphinx.config file, use it wisely.
'sphinx' => array(
'active' => true,
'server' => 'localhost',
'port' => 9312
),
*/
'php_ini_sets' => array( // Empty array if you don't want any php.ini overriden.
// Log errors to 'logs' folder:
'log_errors' => 'On',
'error_log' => ROOT_PATH . '/logs/errors_' . date( 'Y-m' ) . '.log', // Store a different error file per month. For the lazy rotator :)

// Allow short tags <? (instead of <?php) for more flexible view scripts.
// 'short_open_tag' => '1'
),
//'libraries_profile' => 'bleeding_edge' // What profile of libraries should be used.
);

$config['unit.test'] = $config['127.0.0.1'];
$config['unit.test']['instance'] = 'example';
Loading

0 comments on commit 0640d46

Please sign in to comment.