Skip to content
Browse files

Removed author information from project-specific files, updated other…

… documentation inconsistencies.
  • Loading branch information...
1 parent 4466b27 commit cb85015cada49d394642c5b8fcb8b3ad5ff11d0b @kristovaher committed Aug 30, 2012
Showing with 146 additions and 140 deletions.
  1. +1 −1 .htaccess
  2. +1 −1 .version
  3. +1 −1 config.ini
  4. +4 −4 controllers/controller.example.php
  5. +1 −1 controllers/controller.url.php
  6. +1 −1 controllers/controller.view.php
  7. +2 −2 doc/examples/webservice/controllers/controller.movies.php
  8. +2 −2 doc/examples/webservice/models/model.movie.php
  9. +3 −3 doc/examples/webservice/resources/api.profiles.ini
  10. +2 −2 doc/examples/website/controllers/controller.movies.php
  11. +2 −2 doc/examples/website/models/model.movie.php
  12. +3 −3 doc/examples/website/resources/api.profiles.ini
  13. +3 −3 doc/examples/website/resources/en.sitemap.ini
  14. +3 −3 doc/examples/website/resources/en.translations.ini
  15. +3 −3 doc/examples/website/resources/style.css
  16. +2 −2 doc/examples/website/views/view.add.php
  17. +2 −2 doc/examples/website/views/view.home.php
  18. +2 −2 doc/examples/website/views/view.list.php
  19. +2 −2 doc/examples/website/views/view.movie.php
  20. +2 −2 doc/examples/website/views/view.page.php
  21. +1 −0 doc/pages/history.htm
  22. +1 −1 doc/style.css
  23. +1 −1 engine/class.www-api.php
  24. +1 −1 engine/class.www-database.php
  25. +1 −1 engine/class.www-factory.php
  26. +1 −1 engine/class.www-imager.php
  27. +1 −1 engine/class.www-limiter.php
  28. +1 −1 engine/class.www-logger.php
  29. +1 −1 engine/class.www-minifier.php
  30. +1 −1 engine/class.www-state.php
  31. +1 −1 engine/class.www-wrapper.js
  32. +1 −1 engine/class.www-wrapper.php
  33. +1 −1 engine/handler.api.php
  34. +1 −1 engine/handler.data.php
  35. +1 −1 engine/handler.file.php
  36. +1 −1 engine/handler.image.php
  37. +1 −1 engine/handler.resource.php
  38. +1 −1 engine/handler.robots.php
  39. +1 −1 engine/handler.sitemap.php
  40. +1 −1 index.php
  41. +4 −4 models/model.example.php
  42. +1 −1 nginx.conf
  43. +4 −4 resources/api.observers.ini
  44. +4 −4 resources/api.profiles.ini
  45. +22 −17 resources/autoload.php
  46. +4 −4 resources/en.sitemap.ini
  47. +4 −4 resources/en.translations.ini
  48. +4 −4 resources/home.script.js
  49. +4 −4 resources/home.style.css
  50. +4 −4 resources/script.js
  51. +4 −4 resources/style.css
  52. +1 −1 tools/.htaccess
  53. +1 −1 tools/api-info.php
  54. +1 −1 tools/backup.php
  55. +1 −1 tools/cleaner.php
  56. +1 −1 tools/compatibility.php
  57. +1 −1 tools/debugger.php
  58. +1 −1 tools/log-reader.php
  59. +1 −1 tools/php-info.php
  60. +1 −1 tools/style.css
  61. +1 −1 tools/tools_autoload.php
  62. +1 −1 tools/tools_functions.php
  63. +1 −1 tools/updater.php
  64. +1 −1 tools/www-updater.php
  65. +4 −4 views/view.404.php
  66. +4 −4 views/view.example.php
  67. +4 −4 views/view.home.php
View
2 .htaccess
@@ -13,7 +13,7 @@
# @license GNU Lesser General Public License Version 3
# @tutorial /doc/pages/rewrites.htm
# @since 1.0.0
-# @version 3.1.3
+# @version 3.1.4
# This is required on some server setups for RewriteEngine to work properly
# But this can also throw 500 errors on some hosting environments, if it does then remove it
View
2 .version
@@ -1,2 +1,2 @@
-www:3.1.3
+www:3.1.4
system:1.0.0
View
2 config.ini
@@ -24,7 +24,7 @@
; @license GNU Lesser General Public License Version 3
; @tutorial /doc/pages/configuration.htm
; @since 1.9.4
-; @version 3.1.3
+; @version 3.1.4
; HTTP AUTHENTICATION
View
8 controllers/controller.example.php
@@ -1,19 +1,19 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* Example Controller
*
* It is recommended to extend View classes from WWW_Factory in order to
* provide various useful functions and API access for the view.
*
* @package Factory
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_mvc.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_controller_example extends WWW_Factory {
View
2 controllers/controller.url.php
@@ -15,7 +15,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_url.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_controller_url extends WWW_Factory {
View
2 controllers/controller.view.php
@@ -15,7 +15,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_view.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_controller_view extends WWW_Factory {
View
4 doc/examples/webservice/controllers/controller.movies.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Web Service Tutorial <http://www.waveframework.com>
* Tutorial Movie Controller
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_webservice.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_controller_movies extends WWW_Factory {
View
4 doc/examples/webservice/models/model.movie.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Web Service Tutorial <http://www.waveframework.com>
* Tutorial Movie Model
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_webservice.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_model_movie extends WWW_Factory {
View
6 doc/examples/webservice/resources/api.profiles.ini
@@ -1,6 +1,6 @@
-; Wave Framework <http://www.waveframework.com>
-; API Profiles
+; Web Service Tutorial <http://www.waveframework.com>
+; Tutorial API Profiles
;
; This file stores an array of API profile names and their secret keys and other configuration
; options. When API is called with an API profile that is from this list and is not set as
@@ -25,7 +25,7 @@
; @license Unrestricted
; @tutorial /doc/pages/api_security.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
[public]
disabled=0
View
4 doc/examples/website/controllers/controller.movies.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Website Tutorial <http://www.waveframework.com>
* Tutorial Movie Controller
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_website.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_controller_movies extends WWW_Factory {
View
4 doc/examples/website/models/model.movie.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Website Tutorial <http://www.waveframework.com>
* Tutorial Movie Model
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_website.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_model_movie extends WWW_Factory {
View
6 doc/examples/website/resources/api.profiles.ini
@@ -1,6 +1,6 @@
-; Wave Framework <http://www.waveframework.com>
-; API Profiles
+; Website Tutorial <http://www.waveframework.com>
+; Tutorial API Profiles
;
; This file stores an array of API profile names and their secret keys and other configuration
; options. When API is called with an API profile that is from this list and is not set as
@@ -25,7 +25,7 @@
; @license Unrestricted
; @tutorial /doc/pages/api_security.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
[public]
disabled=0
View
6 doc/examples/website/resources/en.sitemap.ini
@@ -1,6 +1,6 @@
-; Wave Framework <http://www.waveframework.com>
-; Sitemap Declaration
+; Website Tutorial <http://www.waveframework.com>
+; Tutorial Sitemap Declaration
;
; Sitemap is an INI file that defines all the URL's for all the languages - with one sitemap
; file per language - and these files are used by the URL Controller to find a match in URL
@@ -45,7 +45,7 @@
; @license Unrestricted
; @tutorial /doc/pages/guide_url.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
[home]
view="home"
View
6 doc/examples/website/resources/en.translations.ini
@@ -1,6 +1,6 @@
-; Wave Framework <http://www.waveframework.com>
-; Translations
+; Website Tutorial <http://www.waveframework.com>
+; Tutorial Translations
;
; Translations are stored in an INI file that lists all the translation keywords for all
; languages - with one translations file per language - and these files are used by View
@@ -13,7 +13,7 @@
; @license Unrestricted
; @tutorial /doc/pages/guide_view.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
welcome="Welcome to my DVD List website!"
about-content="This is an example website made with Wave Framework"
View
6 doc/examples/website/resources/style.css
@@ -1,7 +1,7 @@
/**
- * Wave Framework <http://www.waveframework.com>
- * Main Stylesheet
+ * Website Tutorial <http://www.waveframework.com>
+ * Tutorial Main Stylesheet
*
* General use stylesheet that is loaded by WWW_controller_view. All styles can be defined
* in this file and this file is generally loaded as the first CSS file in the system after
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/guide_view.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
body,html {
View
4 doc/examples/website/views/view.add.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Website Tutorial <http://www.waveframework.com>
* Tutorial Add Movie View
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_website.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_add extends WWW_Factory {
View
4 doc/examples/website/views/view.home.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Website Tutorial <http://www.waveframework.com>
* Tutorial Home View
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_website.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_home extends WWW_Factory {
View
4 doc/examples/website/views/view.list.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Website Tutorial <http://www.waveframework.com>
* Tutorial Movie List View
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_website.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_list extends WWW_Factory {
View
4 doc/examples/website/views/view.movie.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Website Tutorial <http://www.waveframework.com>
* Tutorial Single Movie View
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_website.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_movie extends WWW_Factory {
View
4 doc/examples/website/views/view.page.php
@@ -1,7 +1,7 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * Website Tutorial <http://www.waveframework.com>
* Tutorial Page View
*
* It is recommended to extend View classes from WWW_Factory in order to
@@ -13,7 +13,7 @@
* @license Unrestricted
* @tutorial /doc/pages/tutorial_website.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_page extends WWW_Factory {
View
1 doc/pages/history.htm
@@ -25,6 +25,7 @@
<h2>3.x.x</h2>
<ul>
+ <li><b>3.1.4</b> - Removed author information from project-specific files, updated other documentation inconsistencies.</li>
<li><b>3.1.3</b> - Updated comments to follow Zend style guidelines. Added a section about commenting guidelines to documentation.</li>
<li><b>3.1.2</b> - Added public request tokens as methods to protect against cross-site-request-forgeries. Added Security Feature Guide documentation page.</li>
<li><b>3.1.0</b> - Much-improved session handling for situations where session data is rapidly modified and set or unset with different session ID values. Added support for XML attributes in the output array conversion.</li>
View
2 doc/style.css
@@ -12,7 +12,7 @@
* @copyright Copyright (c) 2012, Kristo Vaher
* @license GNU Lesser General Public License Version 3
* @since 2.2.5
-* @version 3.1.3
+* @version 3.1.4
*/
html,body {
View
2 engine/class.www-api.php
@@ -17,7 +17,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/api.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
final class WWW_API {
View
2 engine/class.www-database.php
@@ -16,7 +16,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/database.htm
* @since 1.1.2
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_Database {
View
2 engine/class.www-factory.php
@@ -15,7 +15,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/factory.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_Factory {
View
2 engine/class.www-imager.php
@@ -15,7 +15,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/imager.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_Imager {
View
2 engine/class.www-limiter.php
@@ -19,7 +19,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/limiter.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_Limiter {
View
2 engine/class.www-logger.php
@@ -18,7 +18,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/logger.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_Logger {
View
2 engine/class.www-minifier.php
@@ -17,7 +17,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/minifier.htm
* @since 1.7.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_Minifier {
View
2 engine/class.www-state.php
@@ -19,7 +19,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/state.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_State {
View
2 engine/class.www-wrapper.js
@@ -16,7 +16,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/wrapper_js.htm
* @since 2.0.1
- * @version 3.1.3
+ * @version 3.1.4
*/
/*
View
2 engine/class.www-wrapper.php
@@ -16,7 +16,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/wrapper_php.htm
* @since 2.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_Wrapper {
View
2 engine/handler.api.php
@@ -15,7 +15,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/handler_api.htm
* @since 1.5.0
- * @version 3.1.3
+ * @version 3.1.4
*/
//INITIALIZATION
View
2 engine/handler.data.php
@@ -16,7 +16,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/handler_data.htm
* @since 1.5.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// INITIALIZATION
View
2 engine/handler.file.php
@@ -1 +1 @@
-<?php
+<?php
View
2 engine/handler.image.php
@@ -1 +1 @@
-<?php
+<?php
View
2 engine/handler.resource.php
@@ -1 +1 @@
-<?php
+<?php
View
2 engine/handler.robots.php
@@ -1 +1 @@
-<?php
+<?php
View
2 engine/handler.sitemap.php
@@ -1 +1 @@
-<?php
+<?php
View
2 index.php
@@ -16,7 +16,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/gateway.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// SOLVING THE HTTP REQUEST
View
8 models/model.example.php
@@ -1,19 +1,19 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* Example Model
*
* It is recommended to extend View classes from WWW_Factory in order to
* provide various useful functions and API access for the view.
*
* @package Factory
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_mvc.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_model_example extends WWW_Factory {
View
2 nginx.conf
@@ -14,7 +14,7 @@
# @license GNU Lesser General Public License Version 3
# @tutorial /doc/pages/rewrites.htm
# @since 2.0.0
-# @version 3.1.3
+# @version 3.1.4
server
{
View
8 resources/api.observers.ini
@@ -1,5 +1,5 @@
-; Wave Framework <http://www.waveframework.com>
+; MyProjectNameHere <http://www.example.com>
; API Observers
;
; API observers allow you to add simple observers to your web system that act like event
@@ -14,12 +14,12 @@
; input/output-cache-timeout - Whether cache is allowed with this observer what is the age of accepted cache. 0 by default.
;
; @package API
-; @author Kristo Vaher <kristo@waher.net>
-; @copyright Copyright (c) 2012, Kristo Vaher
+; @author DeveloperNameHere <email@example.com>
+; @copyright Copyright (c) 2012, ProjectOwnerNameHere
; @license Unrestricted
; @tutorial /doc/pages/api_observers.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
; [example-get]
; input="observer-run"
View
8 resources/api.profiles.ini
@@ -1,5 +1,5 @@
-; Wave Framework <http://www.waveframework.com>
+; MyProjectNameHere <http://www.example.com>
; API Profiles
;
; This file stores an array of API profile names and their secret keys and other configuration
@@ -20,12 +20,12 @@
; * hash-validation - If this is set to 0 (it is set to 1 by default), then hash-based validations are not used at all.
;
; @package API
-; @author Kristo Vaher <kristo@waher.net>
-; @copyright Copyright (c) 2012, Kristo Vaher
+; @author DeveloperNameHere <email@example.com>
+; @copyright Copyright (c) 2012, ProjectOwnerNameHere
; @license Unrestricted
; @tutorial /doc/pages/api_security.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
[public]
disabled=0
View
39 resources/autoload.php
@@ -1,21 +1,26 @@
<?php
-/*
-Wave Framework
-Autoload
-
-By default, this file is empty as no libraries are used or loaded by Wave Framework. But
-if you wish to add system-wide functions, then this file can be used for that purpose as
-it is loaded by Index Gateway for all requests. Generally it is useful to not have a
-general library in a system, as it can make testing more difficult, but it can be useful
-at times. It is also possible to add other functionality to this file that is not
-necessarily a function definition. This will make sure that the Index Gateway and
-Handlers themselves are not touched during project development for the same purpose.
-This file is loaded only by API and Data Handlers and only after configuration and
-state has been loaded.
-
-Author and support: Kristo Vaher - kristo@waher.net
-License: This file can be copied, changed and re-published under another license without any restrictions
-*/
+/**
+ * MyProjectNameHere <http://www.example.com>
+ * Autoload
+ *
+ * By default, this file is empty as no libraries are used or loaded by Wave Framework. But
+ * if you wish to add system-wide functions, then this file can be used for that purpose as
+ * it is loaded by Index Gateway for all requests. Generally it is useful to not have a
+ * general library in a system, as it can make testing more difficult, but it can be useful
+ * at times. It is also possible to add other functionality to this file that is not
+ * necessarily a function definition. This will make sure that the Index Gateway and
+ * Handlers themselves are not touched during project development for the same purpose.
+ * This file is loaded only by API and Data Handlers and only after configuration and
+ * state has been loaded.
+ *
+ * @package Factory
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
+ * @license Unrestricted
+ * @tutorial /doc/pages/guide_autoload.htm
+ * @since 1.0.0
+ * @version 3.1.4
+ */
?>
View
8 resources/en.sitemap.ini
@@ -1,5 +1,5 @@
-; Wave Framework <http://www.waveframework.com>
+; MyProjectNameHere <http://www.example.com>
; Sitemap Declaration
;
; Sitemap is an INI file that defines all the URL's for all the languages - with one sitemap
@@ -40,12 +40,12 @@
; * last-modified - Time in YYYY-MM-DD format for the last time content of this page was modified, for sitemap.xml
;
; @package URL Controller
-; @author Kristo Vaher <kristo@waher.net>
-; @copyright Copyright (c) 2012, Kristo Vaher
+; @author DeveloperNameHere <email@example.com>
+; @copyright Copyright (c) 2012, ProjectOwnerNameHere
; @license Unrestricted
; @tutorial /doc/pages/guide_url.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
[home]
view="home"
View
8 resources/en.translations.ini
@@ -1,5 +1,5 @@
-; Wave Framework <http://www.waveframework.com>
+; MyProjectNameHere <http://www.example.com>
; Translations
;
; Translations are stored in an INI file that lists all the translation keywords for all
@@ -8,11 +8,11 @@
; translations in the views.
;
; @package View Controller
-; @author Kristo Vaher <kristo@waher.net>
-; @copyright Copyright (c) 2012, Kristo Vaher
+; @author DeveloperNameHere <email@example.com>
+; @copyright Copyright (c) 2012, ProjectOwnerNameHere
; @license Unrestricted
; @tutorial /doc/pages/guide_view.htm
; @since 1.0.0
-; @version 3.1.3
+; @version 3.1.4
hello-world="Hello Wave"
View
8 resources/home.script.js
@@ -1,17 +1,17 @@
/*
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* View JavaScript
*
* It is possible to load view specific JavaScript, this file is included among HTML resources
* by WWW_controller_view if it is detected and found for the view it loads. This file is
* loaded after other JavaScript files.
*
* @package View Controller
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_view.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
View
8 resources/home.style.css
@@ -1,17 +1,17 @@
/**
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* View Stylesheet
*
* It is possible to load view specific stylesheet, this file is included among HTML resources
* by WWW_controller_view if it is detected and found for the view it loads. This file is
* loaded after other stylesheet files.
*
* @package View Controller
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_view.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
View
8 resources/script.js
@@ -1,18 +1,18 @@
/*
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* Main JavaScript
*
* This is general use JavaScript file. Main JavaScript functionality should go here and
* this file is loaded by default by View controller.
*
* @package View Controller
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_view.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// This is executed the moment document has finished loading
View
8 resources/style.css
@@ -1,19 +1,19 @@
/**
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* Main Stylesheet
*
* General use stylesheet that is loaded by WWW_controller_view. All styles can be defined
* in this file and this file is generally loaded as the first CSS file in the system after
* reset CSS. It is possible to pre-load images based on the example in this file.
*
* @package View Controller
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_view.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
View
2 tools/.htaccess
@@ -10,7 +10,7 @@
# @license GNU Lesser General Public License Version 3
# @tutorial /doc/pages/rewrites.htm
# @since 1.0.0
-# @version 3.1.3
+# @version 3.1.4
# This is required on some server setups for RewriteEngine to work properly
# But this can also throw 500 errors on some hosting environments, if it does then remove it
View
2 tools/api-info.php
@@ -1 +1 @@
-<?php /** * Wave Framework <http://www.waveframework.com> * API Documentation Generator * * This script lists all controllers and their methods, as well as all API profiles that can use * these methods. This is meant for an overview of API commands for documentation purposes or * otherwise. It shows all API commands based on what their 'www-command' value should be as well * as displays comments that have been written next to these methods. It is also possible to show * commands for only specific API profile by defining GET variable 'profile'. * * @package Tools * @author Kristo Vaher <kristo@waher.net> * @copyright Copyright (c) 2012, Kristo Vaher * @license GNU Lesser General Public License Version 3 * @tutorial /doc/pages/guide_tools.htm * @since 2.2.1 * @version 3.1.3 */ // This initializes tools and authentication require('.'.DIRECTORY_SEPARATOR.'tools_autoload.php'); // Log is printed out in plain text format header('Content-Type: text/html;charset=utf-8'); ?> <!DOCTYPE html> <html lang="en"> <head> <title>API Info</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"/> <link type="text/css" href="style.css" rel="stylesheet" media="all"/> <link rel="icon" href="../favicon.ico" type="image/x-icon"/> <link rel="icon" href="../favicon.ico" type="image/vnd.microsoft.icon"/> <meta content="noindex,nocache,nofollow,noarchive,noimageindex,nosnippet" name="robots"/> <meta http-equiv="cache-control" content="no-cache"/> <meta http-equiv="pragma" content="no-cache"/> <meta http-equiv="expires" content="0"/> </head> <body> <?php // If API commands for specific profile only are returned if(isset($_GET['profile'])){ $apiProfile=$_GET['profile']; } else { $apiProfile='*'; } // Factory class is required by all of custom-classes $apiProfiles=parse_ini_file('../resources/api.profiles.ini',true); // Getting list of controller files $controllerFiles=fileIndex('../controllers/','files'); // Methods and their comments are stored here $methodComments=array(); // If controllers were found if($controllerFiles && !empty($controllerFiles)){ // Looping over controllers and finding suitable ones foreach($controllerFiles as $controllerFile){ // Controller file name will be checked for controller validity $controllerFileInfo=explode('.',$controllerFile); // Simple file-name check $extension=array_pop($controllerFileInfo); $className=array_pop($controllerFileInfo); if($extension=='php' && array_pop($controllerFileInfo)=='/controllers/controller'){ // Getting tokens from the file $tokens=token_get_all(file_get_contents($controllerFile)); // Temporary comment gatherer $tmpComments=array(); // This is used to check what level token is at $gatherComments=false; // This is used to double-check, making sure that the same token is not detected twice in a row $prevToken=0; $prevPrevToken=0; // Looping over tokens foreach($tokens as $token){ // Ignoring single matches if(!is_string($token)){ // Testing based on values if($token[0]==T_COMMENT || $token[0]==T_DOC_COMMENT){ // If token is a comment then it is added to comment array $tmpComments[]=$token[1]; } elseif($token[0]==T_FUNCTION && $prevPrevToken!=T_PROTECTED && $prevPrevToken!=T_PRIVATE){ // Raising stage if function key is detected $gatherComments=true; } elseif($token[0]==T_STRING && $gatherComments){ // If token is function name that is not in illegal methods list, it is added to functions array if(strpos($token[1],'WWW_')===false){ $methodComments[$className.'-'.strtolower(str_replace('_','-',$token[1]))]=$tmpComments; } // Comments are cleared for next method or token $tmpComments=array(); $gatherComments=false; } else if($token[0]!=T_WHITESPACE && $token[0]!=T_PUBLIC){ // Since token is not whitespace or is not public, token is cleared $tmpComments=array(); $gatherComments=false; } // Assigning token as previous $prevPrevToken=$prevToken; $prevToken=$token[0]; } } } } } // Header echo '<h1>API Documentation</h1>'; echo '<h4 class="highlight">'; foreach($softwareVersions as $software=>$version){ // Adding version numbers echo '<b>'.$software.'</b> ('.$version.') '; } echo '</h4>'; echo '<h2>Reference</h2>'; echo '<div class="border box">'; echo '<div class="box">'; echo '<span style="font-weight:bold;">{www-command value}</span><br/>'; if($apiProfile=='*'){ echo '<span style="font-style:italic; font-size:11px;">Allowed API profiles: {comma-separated list of API profiles that can use this command, if any}<br/>'; } echo '<p style="font-style:italic;font-size:11px;padding:5px;margin:0px;">'; echo '{comments and description, if any}'; echo '</p>'; echo '</div>'; echo '<div class="disabled italic box">'; echo '<span style="font-weight:bold;">{Internal-only API command}</span><br/>'; echo '<p style="font-style:italic;font-size:11px;padding:5px;margin:0px;">'; echo '{comments and description, if any. Note that API command is considered internal only if no API profile has access to it.}'; echo '</p>'; echo '</div>'; echo '</div>'; // Title for API commands if($apiProfile!='*'){ echo '<h2>API commands for <b>'.$apiProfile.'</b></h2>'; echo '<p>Show commands for <a href="api-info.php">all profiles</a></p>'; } else { echo '<h2>API commands for all profiles</h2>'; echo '<p>Show only commands for specific profile: '; $links=array(); // Looping over each API profile foreach($apiProfiles as $key=>$profile){ $links[]='<a href="api-info.php?profile='.$key.'">'.$key.'</a>'; } echo implode(', ',$links); echo '</p>'; } // Last controller data is stored here $lastController=''; // Looping over found methods foreach($methodComments as $command=>$comments){ // Getting current controller name $tmp=explode('-',$command); $controller=array_shift($tmp); // Displaying controller-header, if new controller if($controller!=$lastController){ echo '<h3 class="highlight">Controller: '.$controller.'</h3>'; } $lastController=$controller; // This array stores allowed profiles for current method $allowedProfiles=array(); // Looping over each API profile foreach($apiProfiles as $key=>$profile){ $commands=explode(',',$profile['commands']); if(isset($profile['commands']) && ((in_array('*',$commands) && !in_array('!'.$command,$commands)) || (!in_array('*',$commands) && in_array($command,$commands)))){ $allowedProfiles[]=$key; } } // Displaying information if all API data is shown or if selected profile is listed as allowed for that command if($apiProfile=='*' || in_array($apiProfile,$allowedProfiles)){ if(empty($allowedProfiles)){ echo '<div class="disabled italic box">'; } else { echo '<div class="box">'; } // printing out main information echo '<span class="bold">'.$command.'</span><br/>'; if($apiProfile=='*' && !empty($allowedProfiles)){ echo '<span class="small italic">Allowed API profiles:</span> '.implode(',',$allowedProfiles).'<br/>'; } // Printing out comment information, if exists if(!empty($comments)){ echo '<p class="italic">'; foreach($comments as $comment){ // Stripping comment tags $commentLines=explode("\n",$comment); foreach($commentLines as $key=>$c){ $c=trim($c); if(!in_array($c,array('*','//','/**','/*','*/'))){ if(isset($c[0],$c[1]) && $c[0]=='*' && $c[1]==' '){ echo substr($c,2); } elseif(isset($c[0],$c[1],$c[2]) && $c[0]=='/' && $c[1]=='/' && $c[2]==' '){ echo substr($c,3); } else { echo $c; } echo '<br/>'; } elseif($key>0){ echo '<br/>'; } } } echo '</p>'; } echo '</div>'; } } // Footer echo '<p class="footer small bold">Generated at '.date('d.m.Y h:i').' GMT '.date('P').' for '.$_SERVER['HTTP_HOST'].'</p>'; ?> </body> </html>
+<?php /** * Wave Framework <http://www.waveframework.com> * API Documentation Generator * * This script lists all controllers and their methods, as well as all API profiles that can use * these methods. This is meant for an overview of API commands for documentation purposes or * otherwise. It shows all API commands based on what their 'www-command' value should be as well * as displays comments that have been written next to these methods. It is also possible to show * commands for only specific API profile by defining GET variable 'profile'. * * @package Tools * @author Kristo Vaher <kristo@waher.net> * @copyright Copyright (c) 2012, Kristo Vaher * @license GNU Lesser General Public License Version 3 * @tutorial /doc/pages/guide_tools.htm * @since 2.2.1 * @version 3.1.4 */ // This initializes tools and authentication require('.'.DIRECTORY_SEPARATOR.'tools_autoload.php'); // Log is printed out in plain text format header('Content-Type: text/html;charset=utf-8'); ?> <!DOCTYPE html> <html lang="en"> <head> <title>API Info</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"/> <link type="text/css" href="style.css" rel="stylesheet" media="all"/> <link rel="icon" href="../favicon.ico" type="image/x-icon"/> <link rel="icon" href="../favicon.ico" type="image/vnd.microsoft.icon"/> <meta content="noindex,nocache,nofollow,noarchive,noimageindex,nosnippet" name="robots"/> <meta http-equiv="cache-control" content="no-cache"/> <meta http-equiv="pragma" content="no-cache"/> <meta http-equiv="expires" content="0"/> </head> <body> <?php // If API commands for specific profile only are returned if(isset($_GET['profile'])){ $apiProfile=$_GET['profile']; } else { $apiProfile='*'; } // Factory class is required by all of custom-classes $apiProfiles=parse_ini_file('../resources/api.profiles.ini',true); // Getting list of controller files $controllerFiles=fileIndex('../controllers/','files'); // Methods and their comments are stored here $methodComments=array(); // If controllers were found if($controllerFiles && !empty($controllerFiles)){ // Looping over controllers and finding suitable ones foreach($controllerFiles as $controllerFile){ // Controller file name will be checked for controller validity $controllerFileInfo=explode('.',$controllerFile); // Simple file-name check $extension=array_pop($controllerFileInfo); $className=array_pop($controllerFileInfo); if($extension=='php' && array_pop($controllerFileInfo)=='/controllers/controller'){ // Getting tokens from the file $tokens=token_get_all(file_get_contents($controllerFile)); // Temporary comment gatherer $tmpComments=array(); // This is used to check what level token is at $gatherComments=false; // This is used to double-check, making sure that the same token is not detected twice in a row $prevToken=0; $prevPrevToken=0; // Looping over tokens foreach($tokens as $token){ // Ignoring single matches if(!is_string($token)){ // Testing based on values if($token[0]==T_COMMENT || $token[0]==T_DOC_COMMENT){ // If token is a comment then it is added to comment array $tmpComments[]=$token[1]; } elseif($token[0]==T_FUNCTION && $prevPrevToken!=T_PROTECTED && $prevPrevToken!=T_PRIVATE){ // Raising stage if function key is detected $gatherComments=true; } elseif($token[0]==T_STRING && $gatherComments){ // If token is function name that is not in illegal methods list, it is added to functions array if(strpos($token[1],'WWW_')===false){ $methodComments[$className.'-'.strtolower(str_replace('_','-',$token[1]))]=$tmpComments; } // Comments are cleared for next method or token $tmpComments=array(); $gatherComments=false; } else if($token[0]!=T_WHITESPACE && $token[0]!=T_PUBLIC){ // Since token is not whitespace or is not public, token is cleared $tmpComments=array(); $gatherComments=false; } // Assigning token as previous $prevPrevToken=$prevToken; $prevToken=$token[0]; } } } } } // Header echo '<h1>API Documentation</h1>'; echo '<h4 class="highlight">'; foreach($softwareVersions as $software=>$version){ // Adding version numbers echo '<b>'.$software.'</b> ('.$version.') '; } echo '</h4>'; echo '<h2>Reference</h2>'; echo '<div class="border box">'; echo '<div class="box">'; echo '<span style="font-weight:bold;">{www-command value}</span><br/>'; if($apiProfile=='*'){ echo '<span style="font-style:italic; font-size:11px;">Allowed API profiles: {comma-separated list of API profiles that can use this command, if any}<br/>'; } echo '<p style="font-style:italic;font-size:11px;padding:5px;margin:0px;">'; echo '{comments and description, if any}'; echo '</p>'; echo '</div>'; echo '<div class="disabled italic box">'; echo '<span style="font-weight:bold;">{Internal-only API command}</span><br/>'; echo '<p style="font-style:italic;font-size:11px;padding:5px;margin:0px;">'; echo '{comments and description, if any. Note that API command is considered internal only if no API profile has access to it.}'; echo '</p>'; echo '</div>'; echo '</div>'; // Title for API commands if($apiProfile!='*'){ echo '<h2>API commands for <b>'.$apiProfile.'</b></h2>'; echo '<p>Show commands for <a href="api-info.php">all profiles</a></p>'; } else { echo '<h2>API commands for all profiles</h2>'; echo '<p>Show only commands for specific profile: '; $links=array(); // Looping over each API profile foreach($apiProfiles as $key=>$profile){ $links[]='<a href="api-info.php?profile='.$key.'">'.$key.'</a>'; } echo implode(', ',$links); echo '</p>'; } // Last controller data is stored here $lastController=''; // Looping over found methods foreach($methodComments as $command=>$comments){ // Getting current controller name $tmp=explode('-',$command); $controller=array_shift($tmp); // Displaying controller-header, if new controller if($controller!=$lastController){ echo '<h3 class="highlight">Controller: '.$controller.'</h3>'; } $lastController=$controller; // This array stores allowed profiles for current method $allowedProfiles=array(); // Looping over each API profile foreach($apiProfiles as $key=>$profile){ $commands=explode(',',$profile['commands']); if(isset($profile['commands']) && ((in_array('*',$commands) && !in_array('!'.$command,$commands)) || (!in_array('*',$commands) && in_array($command,$commands)))){ $allowedProfiles[]=$key; } } // Displaying information if all API data is shown or if selected profile is listed as allowed for that command if($apiProfile=='*' || in_array($apiProfile,$allowedProfiles)){ if(empty($allowedProfiles)){ echo '<div class="disabled italic box">'; } else { echo '<div class="box">'; } // printing out main information echo '<span class="bold">'.$command.'</span><br/>'; if($apiProfile=='*' && !empty($allowedProfiles)){ echo '<span class="small italic">Allowed API profiles:</span> '.implode(',',$allowedProfiles).'<br/>'; } // Printing out comment information, if exists if(!empty($comments)){ echo '<p class="italic">'; foreach($comments as $comment){ // Stripping comment tags $commentLines=explode("\n",$comment); foreach($commentLines as $key=>$c){ $c=trim($c); if(!in_array($c,array('*','//','/**','/*','*/'))){ if(isset($c[0],$c[1]) && $c[0]=='*' && $c[1]==' '){ echo substr($c,2); } elseif(isset($c[0],$c[1],$c[2]) && $c[0]=='/' && $c[1]=='/' && $c[2]==' '){ echo substr($c,3); } else { echo $c; } echo '<br/>'; } elseif($key>0){ echo '<br/>'; } } } echo '</p>'; } echo '</div>'; } } // Footer echo '<p class="footer small bold">Generated at '.date('d.m.Y h:i').' GMT '.date('P').' for '.$_SERVER['HTTP_HOST'].'</p>'; ?> </body> </html>
View
2 tools/backup.php
@@ -14,7 +14,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// This initializes tools and authentication
View
2 tools/cleaner.php
@@ -23,7 +23,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.4.9
- * @version 3.1.3
+ * @version 3.1.4
*/
// This initializes tools and authentication
View
2 tools/compatibility.php
@@ -14,7 +14,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.5.1
- * @version 3.1.3
+ * @version 3.1.4
*/
// This initializes tools and authentication
View
2 tools/debugger.php
@@ -14,7 +14,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// This initializes tools and authentication
View
2 tools/log-reader.php
@@ -16,7 +16,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// This initializes tools and authentication
View
2 tools/php-info.php
@@ -1 +1 @@
-<?php /** * Wave Framework <http://www.waveframework.com> * PHP Information * * This simple script is simply used to return current PHP information and call phpinfo() * function. This function details a lot of important information about PHP installation and * server setup. * * @package Tools * @author Kristo Vaher <kristo@waher.net> * @copyright Copyright (c) 2012, Kristo Vaher * @license GNU Lesser General Public License Version 3 * @tutorial /doc/pages/guide_tools.htm * @since 1.0.0 * @version 3.1.3 */ // This initializes tools and authentication require('.'.DIRECTORY_SEPARATOR.'tools_autoload.php'); // Simple phpinfo() is executed, returning all the relevant data about current installation phpinfo(); ?>
+<?php /** * Wave Framework <http://www.waveframework.com> * PHP Information * * This simple script is simply used to return current PHP information and call phpinfo() * function. This function details a lot of important information about PHP installation and * server setup. * * @package Tools * @author Kristo Vaher <kristo@waher.net> * @copyright Copyright (c) 2012, Kristo Vaher * @license GNU Lesser General Public License Version 3 * @tutorial /doc/pages/guide_tools.htm * @since 1.0.0 * @version 3.1.4 */ // This initializes tools and authentication require('.'.DIRECTORY_SEPARATOR.'tools_autoload.php'); // Simple phpinfo() is executed, returning all the relevant data about current installation phpinfo(); ?>
View
2 tools/style.css
@@ -12,7 +12,7 @@
* @copyright Copyright (c) 2012, Kristo Vaher
* @license GNU Lesser General Public License Version 3
* @since 2.2.5
-* @version 3.1.3
+* @version 3.1.4
*/
html,body {
View
2 tools/tools_autoload.php
@@ -13,7 +13,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// Main configuration file is included
View
2 tools/tools_functions.php
@@ -20,7 +20,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
/**
View
2 tools/updater.php
@@ -1 +1 @@
-<?php /** * Wave Framework <http://www.waveframework.com> * Updater * * This script is used to update Wave Framework application. It downloads an archive from specific * URL and unpacks it in the temporary folder where it will be used by FTP to update all files in * root folder of the system. * * @package Tools * @author Kristo Vaher <kristo@waher.net> * @copyright Copyright (c) 2012, Kristo Vaher * @license GNU Lesser General Public License Version 3 * @tutorial /doc/pages/guide_tools.htm * @since 1.8.9 * @version 3.1.3 */ // This initializes tools and authentication require('.'.DIRECTORY_SEPARATOR.'tools_autoload.php'); // Log is printed out in plain text format header('Content-Type: text/html;charset=utf-8'); ?> <!DOCTYPE html> <html lang="en"> <head> <title>Updater</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"/> <link type="text/css" href="style.css" rel="stylesheet" media="all"/> <link rel="icon" href="../favicon.ico" type="image/x-icon"/> <link rel="icon" href="../favicon.ico" type="image/vnd.microsoft.icon"/> <meta content="noindex,nocache,nofollow,noarchive,noimageindex,nosnippet" name="robots"/> <meta http-equiv="cache-control" content="no-cache"/> <meta http-equiv="pragma" content="no-cache"/> <meta http-equiv="expires" content="0"/> </head> <body> <?php // Header echo '<h1>System update</h1>'; echo '<h4 class="highlight">'; foreach($softwareVersions as $software=>$version){ // Adding version numbers echo '<b>'.$software.'</b> ('.$version.') '; } echo '</h4>'; // Nothing has been submitted yet if(empty($_POST) && empty($_GET)){ echo '<h2>Apply update</h2>'; // This script only works if Zip and FTP functions are supported if(extension_loaded('Zip') && extension_loaded('ftp')){ ?> <form method="post" action="" enctype="multipart/form-data"> <p class="bold">Update archive URL:</p> <input type="text" name="archive_url" value=""/> <p class="bold">Update archive file upload:</p> <input type="file" name="archive_file"/> <p class="bold">FTP directory (this is the directory your system is installed in)</p> <input type="text" name="ftp_directory" value="/"/> <p class="bold">FTP username</p> <input type="text" name="ftp_username" value=""/> <p class="bold">FTP password</p> <input type="password" name="ftp_password" value=""/> <p><input type="submit" value="APPLY UPDATE"/></p> </form> <?php } else { // required extensions don't seem to be used echo '<p class="bold">Updater requires Zip and FTP PHP extensions</p>'; } } elseif(trim($_REQUEST['ftp_username'])!='' && trim($_REQUEST['ftp_password'])!='' && trim($_REQUEST['ftp_directory'])!=''){ // Error encounter flag $error=''; // This script only works if Zip and FTP functions are supported if(extension_loaded('Zip') && extension_loaded('ftp')){ // If file has been uploaded then this is used instead of archive URL if(isset($_FILES['archive_file']) && !empty($_FILES['archive_file']) && $_FILES['archive_file']['error']==0){ // Update archive is moved to temporary directory if(!move_uploaded_file($_FILES['archive_file']['tmp_name'],'..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip')){ // Error is archive file creation failed $error='Cannot store update archive to temporary files'; } } elseif(isset($_REQUEST['archive_url']) && trim($_REQUEST['archive_url'])!=''){ // Since archive URL was set, then system downloads the file $file=file_get_contents($_REQUEST['archive_url']); if($file){ // Downloaded file contents are placed in update.zip file in temporary directory if(!file_put_contents('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip',$file)){ // Error is archive file creation failed $error='<p class="bold red">Cannot store update archive to temporary files'; } } else { // Error is thrown if downloading failed $error='Cannot download update archive from '.$_REQUEST['archive_url']; } } else { // Since archive file was not set with URL or uploaded file, system throws an error $error='Update archive was not uploaded or found'; } // Only continues if no error has been encountered if($error==''){ // Zip is used to unpack the update archive $zip=new ZipArchive; // Opening the previously created archive if($zip->open('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip')){ // This is the directory where update archive contents will be unpacked $updateArchiveDirectory='..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update-'.date('Y-m-d-H-i-s').DIRECTORY_SEPARATOR; // If cache folder does not exist, it is created if(!is_dir($updateArchiveDirectory)){ if(!mkdir($updateArchiveDirectory,0755)){ $error='Cannot create update folder'; } } // Only continues if no error has been encountered if($error==''){ // Archive is unpacked if($zip->extractTo($updateArchiveDirectory)){ // Testing if the update archive version is new or not if(file_exists($updateArchiveDirectory.'.version')){ // Default version numbers $updateVersions=array(); // Loading data from version file to array $versionsRaw=explode("\n",str_replace("\r",'',file_get_contents($updateArchiveDirectory.'.version'))); foreach($versionsRaw as $ver){ // Versions are separated by colon in the version file $thisVersion=explode(':',$ver); $updateVersions[$thisVersion[0]]=$thisVersion[1]; } // This tests if new version numbers are good for this update $versionValid=true; foreach($softwareVersions as $software=>$version){ if(!isset($updateVersions[$software]) || version_compare($updateVersions[$software],$version)==-1){ $versionValid=false; } } // Making sure that update archive version numbers are at least equal to current installations version numbers if($versionValid){ // Connecting to localhost FTP $ftpConnection=ftp_connect('localhost'); // If connection is a success if($ftpConnection){ // If log-in with provided authentication is a success if(ftp_login($ftpConnection,$_REQUEST['ftp_username'],$_REQUEST['ftp_password'])){ // This attempts to change current FTP connection to installation directory if(ftp_chdir($ftpConnection,$_REQUEST['ftp_directory'])){ // Assigning current FTP directory $ftpDirectory=$_REQUEST['ftp_directory']; // Making sure that FTP directory ends in slash $lastCharacter=strrev($ftpDirectory); if($lastCharacter[0]!=DIRECTORY_SEPARATOR){ $ftpDirectory.=DIRECTORY_SEPARATOR; } // This is the directory where files are $ftpUpdateDirectory=$ftpDirectory.'filesystem/tmp/update/'; // Installation directory contents $directoryContents=ftp_nlist($ftpConnection,'.'); // This checks if .version file exists in this directory and is the same size as the current installation and has been modified at the same time if(in_array('.version',$directoryContents) && ftp_size($ftpConnection,'.version')==filesize('..'.DIRECTORY_SEPARATOR.'.version') && ftp_mdtm($ftpConnection,'.version')==filemtime('..'.DIRECTORY_SEPARATOR.'.version')){ // Target archive of the backup $backupFilename='system-backup-'.date('Y-m-d-H-i-s').'.zip.tmp'; // This creates a backup of all core files, if this fails then updater will not continue if(systemBackup('../','..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'backups'.DIRECTORY_SEPARATOR.$backupFilename)){ // This stores log messages $log=array(); // Since backup was successful $log[]='SYSTEM BACKUP SAVED TO /filesystem/backups/'.$backupFilename; // Scanning the unpacked archive directory $files=scandir($updateArchiveDirectory); // Notice that files were updated $log[]='INSTALLING UPDATE FILES'; // This will loop over all the files if files were found in this directory if(!empty($files)){ $log=array_merge($log,ftpFileMover($ftpConnection,$ftpUpdateDirectory,$ftpDirectory)); } // Notice that files were updated $log[]='INSTALLATION COMPLETE'; // If uploader also uploaded an updater script then this is executed and then removed if(file_exists('../www-updater.php')){ // Log message for updater script $log[]='EXECUTING UPDATER SCRIPT'; // Building software version string $softwareVersionString=array(); foreach($softwareVersions as $software=>$version){ $softwareVersionString[]=$software.'-version='.$version; } // This is the URL that needs to be executed for update to complete $updateScriptAddress=((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']==1 || $_SERVER['HTTPS']=='on'))?'https':'http').'://'.$_SERVER['SERVER_NAME'].'/www-updater.php?'.implode('&',$softwareVersionString); // Request is made with file get contents, so allow_url_fopen must be enabled if(function_exists('ini_get') && ini_get('allow_url_fopen')==1){ // Script is executed over HTTP $updaterScript=file_get_contents($updateScriptAddress); // If updater script was a success if($updaterScript){ // Adding log messages from updater script $log=array_merge($log,explode("\n",$updaterScript)); // Successful log message for updater script $log[]='UPDATER SCRIPT COMPLETE'; // Removing updater script ftp_delete($ftpConnection,$ftpDirectory.'www-updater.php'); } else { // Failed log message for updater script $log[]='UPDATER SCRIPT FAILED, PLEASE RUN '.$updateScriptAddress.' MANUALLY AND THEN DELETE THE FILE'; } } else { // Failed log message for updater script $log[]='CANNOT MAKE URL REQUESTS, PLEASE RUN '.$updateScriptAddress.' MANUALLY AND THEN DELETE THE FILE'; } } // Printing out plain-text log echo '<p>'; echo implode('</p><p>',$log); echo '</p>'; // Notice that files were updated echo '<p class="bold">UPDATE COMPLETE</p>'; } else { // Backup creation failed echo '<p class="bold red">Cannot create backup, update halted</p>'; } } else { // This is shown when the installation directory given is different based on .version file information echo '<p class="bold red">Incorrect installation directory</p>'; } } else { // This is thrown when FTP cannot move its directory echo '<p class="bold red">Cannot move to installation directory</p>'; } } else { // This is thrown when FTP authentication fails echo '<p class="bold red">Cannot log-in to FTP</p>'; } // Closing FTP connection ftp_close($ftpConnection); } else { // This is thrown when localhost FTP connection does not work echo '<p class="bold red">Cannot connect to localhost with FTP</p>'; } } else { // Error message echo '<p class="bold red">Update archive version numbers are too old for current installation</p>'; } } else { // Error message echo '<p class="bold red">Update archive version number information is missing</p>'; } // Cleaning the update directory and removing the directory dirCleaner($updateArchiveDirectory,time()); rmdir($updateArchiveDirectory); } else { // This is thrown when it was not possible to unpack the archive echo '<p class="bold red">Cannot unpack archive</p>'; } // Zip class is closed as the file is not used anymore $zip->close(); // Archive file is removed unlink('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip'); } else { echo '<p class="bold red">'.$error.'</p>'; } } else { // Since opening archive fails, the file is removed and error is thrown unlink('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip'); echo '<p class="bold red">Cannot open archive</p>'; } } else { echo '<p class="bold red">'.$error.'</p>'; } } else { // required extensions don't seem to be used echo '<p class="bold red">Updater requires Zip and FTP PHP extensions</p>'; } } else { // Error is thrown if downloading failed echo '<p class="bold red">FTP authentication is required</p>'; } // Footer echo '<p class="footer small bold">Generated at '.date('d.m.Y h:i').' GMT '.date('P').' for '.$_SERVER['HTTP_HOST'].'</p>'; ?> </body> </html>
+<?php /** * Wave Framework <http://www.waveframework.com> * Updater * * This script is used to update Wave Framework application. It downloads an archive from specific * URL and unpacks it in the temporary folder where it will be used by FTP to update all files in * root folder of the system. * * @package Tools * @author Kristo Vaher <kristo@waher.net> * @copyright Copyright (c) 2012, Kristo Vaher * @license GNU Lesser General Public License Version 3 * @tutorial /doc/pages/guide_tools.htm * @since 1.8.9 * @version 3.1.4 */ // This initializes tools and authentication require('.'.DIRECTORY_SEPARATOR.'tools_autoload.php'); // Log is printed out in plain text format header('Content-Type: text/html;charset=utf-8'); ?> <!DOCTYPE html> <html lang="en"> <head> <title>Updater</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"/> <link type="text/css" href="style.css" rel="stylesheet" media="all"/> <link rel="icon" href="../favicon.ico" type="image/x-icon"/> <link rel="icon" href="../favicon.ico" type="image/vnd.microsoft.icon"/> <meta content="noindex,nocache,nofollow,noarchive,noimageindex,nosnippet" name="robots"/> <meta http-equiv="cache-control" content="no-cache"/> <meta http-equiv="pragma" content="no-cache"/> <meta http-equiv="expires" content="0"/> </head> <body> <?php // Header echo '<h1>System update</h1>'; echo '<h4 class="highlight">'; foreach($softwareVersions as $software=>$version){ // Adding version numbers echo '<b>'.$software.'</b> ('.$version.') '; } echo '</h4>'; // Nothing has been submitted yet if(empty($_POST) && empty($_GET)){ echo '<h2>Apply update</h2>'; // This script only works if Zip and FTP functions are supported if(extension_loaded('Zip') && extension_loaded('ftp')){ ?> <form method="post" action="" enctype="multipart/form-data"> <p class="bold">Update archive URL:</p> <input type="text" name="archive_url" value=""/> <p class="bold">Update archive file upload:</p> <input type="file" name="archive_file"/> <p class="bold">FTP directory (this is the directory your system is installed in)</p> <input type="text" name="ftp_directory" value="/"/> <p class="bold">FTP username</p> <input type="text" name="ftp_username" value=""/> <p class="bold">FTP password</p> <input type="password" name="ftp_password" value=""/> <p><input type="submit" value="APPLY UPDATE"/></p> </form> <?php } else { // required extensions don't seem to be used echo '<p class="bold">Updater requires Zip and FTP PHP extensions</p>'; } } elseif(trim($_REQUEST['ftp_username'])!='' && trim($_REQUEST['ftp_password'])!='' && trim($_REQUEST['ftp_directory'])!=''){ // Error encounter flag $error=''; // This script only works if Zip and FTP functions are supported if(extension_loaded('Zip') && extension_loaded('ftp')){ // If file has been uploaded then this is used instead of archive URL if(isset($_FILES['archive_file']) && !empty($_FILES['archive_file']) && $_FILES['archive_file']['error']==0){ // Update archive is moved to temporary directory if(!move_uploaded_file($_FILES['archive_file']['tmp_name'],'..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip')){ // Error is archive file creation failed $error='Cannot store update archive to temporary files'; } } elseif(isset($_REQUEST['archive_url']) && trim($_REQUEST['archive_url'])!=''){ // Since archive URL was set, then system downloads the file $file=file_get_contents($_REQUEST['archive_url']); if($file){ // Downloaded file contents are placed in update.zip file in temporary directory if(!file_put_contents('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip',$file)){ // Error is archive file creation failed $error='<p class="bold red">Cannot store update archive to temporary files'; } } else { // Error is thrown if downloading failed $error='Cannot download update archive from '.$_REQUEST['archive_url']; } } else { // Since archive file was not set with URL or uploaded file, system throws an error $error='Update archive was not uploaded or found'; } // Only continues if no error has been encountered if($error==''){ // Zip is used to unpack the update archive $zip=new ZipArchive; // Opening the previously created archive if($zip->open('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip')){ // This is the directory where update archive contents will be unpacked $updateArchiveDirectory='..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update-'.date('Y-m-d-H-i-s').DIRECTORY_SEPARATOR; // If cache folder does not exist, it is created if(!is_dir($updateArchiveDirectory)){ if(!mkdir($updateArchiveDirectory,0755)){ $error='Cannot create update folder'; } } // Only continues if no error has been encountered if($error==''){ // Archive is unpacked if($zip->extractTo($updateArchiveDirectory)){ // Testing if the update archive version is new or not if(file_exists($updateArchiveDirectory.'.version')){ // Default version numbers $updateVersions=array(); // Loading data from version file to array $versionsRaw=explode("\n",str_replace("\r",'',file_get_contents($updateArchiveDirectory.'.version'))); foreach($versionsRaw as $ver){ // Versions are separated by colon in the version file $thisVersion=explode(':',$ver); $updateVersions[$thisVersion[0]]=$thisVersion[1]; } // This tests if new version numbers are good for this update $versionValid=true; foreach($softwareVersions as $software=>$version){ if(!isset($updateVersions[$software]) || version_compare($updateVersions[$software],$version)==-1){ $versionValid=false; } } // Making sure that update archive version numbers are at least equal to current installations version numbers if($versionValid){ // Connecting to localhost FTP $ftpConnection=ftp_connect('localhost'); // If connection is a success if($ftpConnection){ // If log-in with provided authentication is a success if(ftp_login($ftpConnection,$_REQUEST['ftp_username'],$_REQUEST['ftp_password'])){ // This attempts to change current FTP connection to installation directory if(ftp_chdir($ftpConnection,$_REQUEST['ftp_directory'])){ // Assigning current FTP directory $ftpDirectory=$_REQUEST['ftp_directory']; // Making sure that FTP directory ends in slash $lastCharacter=strrev($ftpDirectory); if($lastCharacter[0]!=DIRECTORY_SEPARATOR){ $ftpDirectory.=DIRECTORY_SEPARATOR; } // This is the directory where files are $ftpUpdateDirectory=$ftpDirectory.'filesystem/tmp/update/'; // Installation directory contents $directoryContents=ftp_nlist($ftpConnection,'.'); // This checks if .version file exists in this directory and is the same size as the current installation and has been modified at the same time if(in_array('.version',$directoryContents) && ftp_size($ftpConnection,'.version')==filesize('..'.DIRECTORY_SEPARATOR.'.version') && ftp_mdtm($ftpConnection,'.version')==filemtime('..'.DIRECTORY_SEPARATOR.'.version')){ // Target archive of the backup $backupFilename='system-backup-'.date('Y-m-d-H-i-s').'.zip.tmp'; // This creates a backup of all core files, if this fails then updater will not continue if(systemBackup('../','..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'backups'.DIRECTORY_SEPARATOR.$backupFilename)){ // This stores log messages $log=array(); // Since backup was successful $log[]='SYSTEM BACKUP SAVED TO /filesystem/backups/'.$backupFilename; // Scanning the unpacked archive directory $files=scandir($updateArchiveDirectory); // Notice that files were updated $log[]='INSTALLING UPDATE FILES'; // This will loop over all the files if files were found in this directory if(!empty($files)){ $log=array_merge($log,ftpFileMover($ftpConnection,$ftpUpdateDirectory,$ftpDirectory)); } // Notice that files were updated $log[]='INSTALLATION COMPLETE'; // If uploader also uploaded an updater script then this is executed and then removed if(file_exists('../www-updater.php')){ // Log message for updater script $log[]='EXECUTING UPDATER SCRIPT'; // Building software version string $softwareVersionString=array(); foreach($softwareVersions as $software=>$version){ $softwareVersionString[]=$software.'-version='.$version; } // This is the URL that needs to be executed for update to complete $updateScriptAddress=((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']==1 || $_SERVER['HTTPS']=='on'))?'https':'http').'://'.$_SERVER['SERVER_NAME'].'/www-updater.php?'.implode('&',$softwareVersionString); // Request is made with file get contents, so allow_url_fopen must be enabled if(function_exists('ini_get') && ini_get('allow_url_fopen')==1){ // Script is executed over HTTP $updaterScript=file_get_contents($updateScriptAddress); // If updater script was a success if($updaterScript){ // Adding log messages from updater script $log=array_merge($log,explode("\n",$updaterScript)); // Successful log message for updater script $log[]='UPDATER SCRIPT COMPLETE'; // Removing updater script ftp_delete($ftpConnection,$ftpDirectory.'www-updater.php'); } else { // Failed log message for updater script $log[]='UPDATER SCRIPT FAILED, PLEASE RUN '.$updateScriptAddress.' MANUALLY AND THEN DELETE THE FILE'; } } else { // Failed log message for updater script $log[]='CANNOT MAKE URL REQUESTS, PLEASE RUN '.$updateScriptAddress.' MANUALLY AND THEN DELETE THE FILE'; } } // Printing out plain-text log echo '<p>'; echo implode('</p><p>',$log); echo '</p>'; // Notice that files were updated echo '<p class="bold">UPDATE COMPLETE</p>'; } else { // Backup creation failed echo '<p class="bold red">Cannot create backup, update halted</p>'; } } else { // This is shown when the installation directory given is different based on .version file information echo '<p class="bold red">Incorrect installation directory</p>'; } } else { // This is thrown when FTP cannot move its directory echo '<p class="bold red">Cannot move to installation directory</p>'; } } else { // This is thrown when FTP authentication fails echo '<p class="bold red">Cannot log-in to FTP</p>'; } // Closing FTP connection ftp_close($ftpConnection); } else { // This is thrown when localhost FTP connection does not work echo '<p class="bold red">Cannot connect to localhost with FTP</p>'; } } else { // Error message echo '<p class="bold red">Update archive version numbers are too old for current installation</p>'; } } else { // Error message echo '<p class="bold red">Update archive version number information is missing</p>'; } // Cleaning the update directory and removing the directory dirCleaner($updateArchiveDirectory,time()); rmdir($updateArchiveDirectory); } else { // This is thrown when it was not possible to unpack the archive echo '<p class="bold red">Cannot unpack archive</p>'; } // Zip class is closed as the file is not used anymore $zip->close(); // Archive file is removed unlink('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip'); } else { echo '<p class="bold red">'.$error.'</p>'; } } else { // Since opening archive fails, the file is removed and error is thrown unlink('..'.DIRECTORY_SEPARATOR.'filesystem'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'update.zip'); echo '<p class="bold red">Cannot open archive</p>'; } } else { echo '<p class="bold red">'.$error.'</p>'; } } else { // required extensions don't seem to be used echo '<p class="bold red">Updater requires Zip and FTP PHP extensions</p>'; } } else { // Error is thrown if downloading failed echo '<p class="bold red">FTP authentication is required</p>'; } // Footer echo '<p class="footer small bold">Generated at '.date('d.m.Y h:i').' GMT '.date('P').' for '.$_SERVER['HTTP_HOST'].'</p>'; ?> </body> </html>
View
2 tools/www-updater.php
@@ -15,7 +15,7 @@
* @license GNU Lesser General Public License Version 3
* @tutorial /doc/pages/guide_tools.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
// It is always recommended to have this file return a plain-text log where each log entry is on a new line
View
8 views/view.404.php
@@ -1,20 +1,20 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* 404 View
*
* This view is called by WWW_controller_view if WWW_controller_url could not find a matching
* view for current request. This can be used to customize page-specific page-not-found pages,
* however this view is not used for missing files and other static resources.
*
* @package Factory
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_mvc.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_404 extends WWW_Factory {
View
8 views/view.example.php
@@ -1,19 +1,19 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* Example View
*
* It is recommended to extend View classes from WWW_Factory in order to
* provide various useful functions and API access for the view.
*
* @package Factory
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_mvc.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_example extends WWW_Factory {
View
8 views/view.home.php
@@ -1,20 +1,20 @@
<?php
/**
- * Wave Framework <http://www.waveframework.com>
+ * MyProjectNameHere <http://www.example.com>
* Home View
*
* This view is loaded when WWW_controller_view finds root or home page as the view file. Name
* of the 'home' view is defined as a default in WWW_State class. This home view example also
* shows how to use translations.
*
* @package Factory
- * @author Kristo Vaher <kristo@waher.net>
- * @copyright Copyright (c) 2012, Kristo Vaher
+ * @author DeveloperNameHere <email@example.com>
+ * @copyright Copyright (c) 2012, ProjectOwnerNameHere
* @license Unrestricted
* @tutorial /doc/pages/guide_mvc.htm
* @since 1.0.0
- * @version 3.1.3
+ * @version 3.1.4
*/
class WWW_view_home extends WWW_Factory {

0 comments on commit cb85015

Please sign in to comment.
Something went wrong with that request. Please try again.