Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove direct includes of files #52

Closed
alombarte opened this issue Jan 30, 2014 · 5 comments
Closed

Remove direct includes of files #52

alombarte opened this issue Jan 30, 2014 · 5 comments
Assignees
Milestone

Comments

@alombarte
Copy link
Contributor

All Sifo code should be cleaned of "require", "require_once", "include", or "include_once".

Some examples (list uncomplete)

Sifo//API/Twitter.php:include ROOT_PATH . '/libs/EpiClasses/EpiCurl.php';
Sifo//API/Youtube.php:include ROOT_PATH . '/libs/EpiClasses/EpiCurl.php';
Sifo//Database.php:include_once 'LoadBalancer.php';
Sifo//Database.php:                     include_once( ROOT_PATH . "/libs/$version/adodb-exceptions.inc.php" ); //include exceptions for php5
Sifo//Database.php:                     include_once( ROOT_PATH . "/libs/$version/adodb.inc.php" );
Sifo//Debug/Mysql.php:include_once ROOT_PATH . '/libs/Sifo/Mysql.php';
Sifo//I18N.php:                 include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'googleTranslate' ) . '/googleTranslate.class.php';
Sifo//I18N.php:                 include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'googleTranslate' ) . '/googleTranslate.class.php';
Sifo//Images.php:               include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'phpthumb' ) . '/ThumbLib.inc.php';
Sifo//Images.php:               include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'phpthumb' ) . '/ThumbLib.inc.php';
Sifo//Mail.php:         include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'phpmailer' ) .'/class.phpmailer.php';
Sifo//RedisModel.php:include_once ROOT_PATH . '/libs/' . Config::getInstance()->getLibrary( 'predis' ) . '/lib/Predis/Autoloader.php';
Sifo//View.php:include_once ROOT_PATH . '/libs/'. Config::getInstance()->getLibrary( 'smarty' ).'/Smarty.class.php';
@lombartec
Copy link
Member

Should we leave a comment just to have a reference of which class was included there to use it later with namespaces?

@alexgt9
Copy link
Member

alexgt9 commented Jan 31, 2014

No, comments are useless for that.
El 31/01/2014 18:04, "Carlos Lombarte" [email protected] escribió:

Should we leave a comment just to have a reference of which class was
included there to use it later with namespaces?

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-33820869
.

@lombartec
Copy link
Member

Well now that I think it better, a better approach would be to document it in the wiki, what do you think @alexgt9 ?

@alexgt9
Copy link
Member

alexgt9 commented Jan 31, 2014

I think that there is no need to do that. The class names will be the anyway
El 31/01/2014 18:16, "Carlos Lombarte" [email protected] escribió:

Well now that I think it better, a better approach would be to document it
in the wiki, what do you think @alexgt9 https://github.com/alexgt9 ?

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-33822023
.

@ghost ghost assigned lombartec Jan 31, 2014
@lombartec
Copy link
Member

Commit here 70cd5ad 😄

I left include and inculde_once in the following files

  • Config class (loads the configuration files)
  • I18N (loads the translation file)
  • MediaGenerator (loads the hashes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants