summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Caldwell <inc@inc-omplete.org>2008-09-01 23:43:27 +0000
committerIan Caldwell <inc@inc-omplete.org>2008-09-01 23:43:27 +0000
commit3662b9b39e36f546888f5c8eeaa2e469c68981b6 (patch)
treea8095b5d69ecc618cd5a75316420956be1caad1c
Moving exchange.enlightenment.org application to svn in order to allow
the e community to further as needed. SVN revision: 35786
-rw-r--r--edje_list/AUTHORS1
-rw-r--r--edje_list/COPYING20
-rw-r--r--edje_list/ChangeLog0
-rw-r--r--edje_list/Makefile.am7
-rw-r--r--edje_list/NEWS0
-rw-r--r--edje_list/README0
-rwxr-xr-xedje_list/autogen.sh16
-rw-r--r--edje_list/configure.in27
-rw-r--r--edje_list/src/Makefile.am4
-rw-r--r--edje_list/src/bin/Makefile.am16
-rw-r--r--edje_list/src/bin/main.c32
-rw-r--r--edje_list/src/bin/main.h29
-rw-r--r--edje_smart_thumb/AUTHORS2
-rw-r--r--edje_smart_thumb/COPYING20
-rw-r--r--edje_smart_thumb/ChangeLog0
-rw-r--r--edje_smart_thumb/Makefile.am7
-rw-r--r--edje_smart_thumb/NEWS0
-rw-r--r--edje_smart_thumb/README2
-rwxr-xr-xedje_smart_thumb/autogen.sh16
-rw-r--r--edje_smart_thumb/configure.in33
-rw-r--r--edje_smart_thumb/src/Makefile.am4
-rw-r--r--edje_smart_thumb/src/bin/Makefile.am16
-rw-r--r--edje_smart_thumb/src/bin/main.c406
-rw-r--r--edje_smart_thumb/src/bin/main.h31
-rw-r--r--exchange/README39
-rw-r--r--exchange/TODO8
-rw-r--r--exchange/apps/exchange/config/app.yml8
-rw-r--r--exchange/apps/exchange/config/cache.yml4
-rw-r--r--exchange/apps/exchange/config/exchangeConfiguration.class.php8
-rw-r--r--exchange/apps/exchange/config/factories.yml42
-rw-r--r--exchange/apps/exchange/config/filters.yml10
-rw-r--r--exchange/apps/exchange/config/routing.yml43
-rw-r--r--exchange/apps/exchange/config/security.yml2
-rw-r--r--exchange/apps/exchange/config/settings.yml107
-rw-r--r--exchange/apps/exchange/config/view.yml17
-rw-r--r--exchange/apps/exchange/lib/Thumbnail.class.php660
-rw-r--r--exchange/apps/exchange/lib/Tools.class.php10
-rw-r--r--exchange/apps/exchange/lib/WikiText.class.php864
-rw-r--r--exchange/apps/exchange/lib/exchangeActions.php38
-rw-r--r--exchange/apps/exchange/lib/exchangeComponents.php11
-rw-r--r--exchange/apps/exchange/lib/forwardUnsecureException.php14
-rw-r--r--exchange/apps/exchange/lib/myUser.class.php35
-rw-r--r--exchange/apps/exchange/modules/api/actions/actions.class.php369
-rw-r--r--exchange/apps/exchange/modules/api/config/view.yml4
-rw-r--r--exchange/apps/exchange/modules/api/templates/indexSuccess.php2
-rw-r--r--exchange/apps/exchange/modules/application/actions/actions.class.php136
-rw-r--r--exchange/apps/exchange/modules/application/actions/components.class.php88
-rw-r--r--exchange/apps/exchange/modules/application/config/security.yml31
-rw-r--r--exchange/apps/exchange/modules/application/templates/_table.php58
-rw-r--r--exchange/apps/exchange/modules/application/templates/indexSuccess.php13
-rw-r--r--exchange/apps/exchange/modules/application/templates/readSuccess.php52
-rw-r--r--exchange/apps/exchange/modules/application/templates/updateSuccess.php19
-rw-r--r--exchange/apps/exchange/modules/applicationThemeGroup/actions/actions.class.php61
-rw-r--r--exchange/apps/exchange/modules/applicationThemeGroup/config/security.yml4
-rw-r--r--exchange/apps/exchange/modules/applicationThemeGroup/templates/indexSuccess.php0
-rw-r--r--exchange/apps/exchange/modules/applicationThemeGroup/templates/updateSuccess.php16
-rw-r--r--exchange/apps/exchange/modules/comment/actions/actions.class.php83
-rw-r--r--exchange/apps/exchange/modules/comment/actions/components.class.php62
-rw-r--r--exchange/apps/exchange/modules/comment/config/security.yml15
-rw-r--r--exchange/apps/exchange/modules/comment/templates/_table.php61
-rw-r--r--exchange/apps/exchange/modules/comment/templates/indexSuccess.php3
-rw-r--r--exchange/apps/exchange/modules/comment/templates/readSuccess.php14
-rw-r--r--exchange/apps/exchange/modules/comment/templates/updateSuccess.php21
-rw-r--r--exchange/apps/exchange/modules/home/actions/actions.class.php193
-rw-r--r--exchange/apps/exchange/modules/home/actions/components.class.php33
-rw-r--r--exchange/apps/exchange/modules/home/config/security.yml3
-rw-r--r--exchange/apps/exchange/modules/home/config/view.yml7
-rw-r--r--exchange/apps/exchange/modules/home/templates/_navigation.php61
-rw-r--r--exchange/apps/exchange/modules/home/templates/aboutSuccess.php16
-rw-r--r--exchange/apps/exchange/modules/home/templates/cvsSuccess.php6
-rw-r--r--exchange/apps/exchange/modules/home/templates/error404Success.php2
-rw-r--r--exchange/apps/exchange/modules/home/templates/indexSuccess.php13
-rw-r--r--exchange/apps/exchange/modules/home/templates/searchSuccess.php18
-rw-r--r--exchange/apps/exchange/modules/home/templates/secureSuccess.php2
-rw-r--r--exchange/apps/exchange/modules/home/templates/sitemapSuccess.php15
-rw-r--r--exchange/apps/exchange/modules/home/templates/wikiSyntaxSuccess.php14
-rw-r--r--exchange/apps/exchange/modules/module/actions/actions.class.php138
-rw-r--r--exchange/apps/exchange/modules/module/actions/components.class.php93
-rw-r--r--exchange/apps/exchange/modules/module/config/security.yml31
-rw-r--r--exchange/apps/exchange/modules/module/templates/_table.php59
-rw-r--r--exchange/apps/exchange/modules/module/templates/indexSuccess.php15
-rw-r--r--exchange/apps/exchange/modules/module/templates/readSuccess.php45
-rw-r--r--exchange/apps/exchange/modules/module/templates/updateSuccess.php19
-rw-r--r--exchange/apps/exchange/modules/moduleThemeGroup/actions/actions.class.php61
-rw-r--r--exchange/apps/exchange/modules/moduleThemeGroup/config/security.yml4
-rw-r--r--exchange/apps/exchange/modules/moduleThemeGroup/templates/indexSuccess.php0
-rw-r--r--exchange/apps/exchange/modules/moduleThemeGroup/templates/updateSuccess.php16
-rw-r--r--exchange/apps/exchange/modules/rating/actions/actions.class.php70
-rw-r--r--exchange/apps/exchange/modules/rating/actions/components.class.php14
-rw-r--r--exchange/apps/exchange/modules/rating/templates/_rating.php1
-rw-r--r--exchange/apps/exchange/modules/rating/templates/indexSuccess.php0
-rw-r--r--exchange/apps/exchange/modules/rating/templates/rateSuccess.php1
-rw-r--r--exchange/apps/exchange/modules/theme/actions/actions.class.php157
-rw-r--r--exchange/apps/exchange/modules/theme/actions/components.class.php112
-rw-r--r--exchange/apps/exchange/modules/theme/config/security.yml31
-rw-r--r--exchange/apps/exchange/modules/theme/templates/_table.php59
-rw-r--r--exchange/apps/exchange/modules/theme/templates/indexSuccess.php22
-rw-r--r--exchange/apps/exchange/modules/theme/templates/readSuccess.php55
-rw-r--r--exchange/apps/exchange/modules/theme/templates/updateSuccess.php19
-rw-r--r--exchange/apps/exchange/modules/themeGroup/actions/actions.class.php58
-rw-r--r--exchange/apps/exchange/modules/themeGroup/actions/components.class.php49
-rw-r--r--exchange/apps/exchange/modules/themeGroup/config/security.yml10
-rw-r--r--exchange/apps/exchange/modules/themeGroup/templates/_table.php53
-rw-r--r--exchange/apps/exchange/modules/themeGroup/templates/indexSuccess.php6
-rw-r--r--exchange/apps/exchange/modules/themeGroup/templates/readSuccess.php19
-rw-r--r--exchange/apps/exchange/modules/themeGroup/templates/updateSuccess.php23
-rw-r--r--exchange/apps/exchange/modules/user/actions/actions.class.php143
-rw-r--r--exchange/apps/exchange/modules/user/actions/components.class.php44
-rw-r--r--exchange/apps/exchange/modules/user/config/security.yml11
-rw-r--r--exchange/apps/exchange/modules/user/templates/_table.php46
-rw-r--r--exchange/apps/exchange/modules/user/templates/activateSuccess.php2
-rw-r--r--exchange/apps/exchange/modules/user/templates/checkEmailSuccess.php2
-rw-r--r--exchange/apps/exchange/modules/user/templates/forgotSuccess.php26
-rw-r--r--exchange/apps/exchange/modules/user/templates/indexSuccess.php7
-rw-r--r--exchange/apps/exchange/modules/user/templates/loginSuccess.php20
-rw-r--r--exchange/apps/exchange/modules/user/templates/readSuccess.php22
-rw-r--r--exchange/apps/exchange/modules/user/templates/updateSuccess.php30
-rw-r--r--exchange/apps/exchange/templates/empty.php22
-rw-r--r--exchange/apps/exchange/templates/layout.php85
-rw-r--r--exchange/config/ProjectConfiguration.class.php11
-rw-r--r--exchange/config/config_prod.php5
-rw-r--r--exchange/config/databases.yml10
-rw-r--r--exchange/config/doctrine/schema.yml266
-rw-r--r--exchange/config/properties.ini2
-rw-r--r--exchange/config/rsync_exclude.txt4
-rw-r--r--exchange/config/schema.yml0
-rw-r--r--exchange/data/environment.migrated0
-rw-r--r--exchange/data/fixtures/defaultData.yml7
-rw-r--r--exchange/data/sql/reload.sql2
-rw-r--r--exchange/data/sql/schema.sql28
-rw-r--r--exchange/lib/form/ApplicationForm.class.php75
-rw-r--r--exchange/lib/form/ApplicationThemeGroupForm.class.php28
-rw-r--r--exchange/lib/form/CommentForm.class.php26
-rw-r--r--exchange/lib/form/ForgotForm.class.php25
-rw-r--r--exchange/lib/form/LoginForm.class.php31
-rw-r--r--exchange/lib/form/ModuleForm.class.php79
-rw-r--r--exchange/lib/form/ModuleThemeGroupForm.class.php28
-rw-r--r--exchange/lib/form/SearchForm.class.php11
-rw-r--r--exchange/lib/form/SortForm.class.php22
-rw-r--r--exchange/lib/form/ThemeForm.class.php69
-rw-r--r--exchange/lib/form/ThemeGroupForm.class.php22
-rw-r--r--exchange/lib/form/UserForm.class.php66
-rw-r--r--exchange/lib/form/exchangeWidgetFormSchemaFormatter.class.php11
-rw-r--r--exchange/lib/form/validatorLogin.php81
-rw-r--r--exchange/lib/migration/doctrine/001_add_theme_theme_group.class.php57
-rw-r--r--exchange/lib/migration/doctrine/002_add_application.class.php77
-rw-r--r--exchange/lib/migration/doctrine/003_add_madule.class.php82
-rw-r--r--exchange/lib/migration/doctrine/004_add_comment.class.php67
-rw-r--r--exchange/lib/migration/doctrine/005_add_rating.class.php57
-rw-r--r--exchange/lib/migration/doctrine/006_add_application_theme_group.class.php57
-rw-r--r--exchange/lib/migration/doctrine/007_add_theme_group.class.php57
-rw-r--r--exchange/lib/migration/doctrine/008_add_theme.class.php77
-rw-r--r--exchange/lib/migration/doctrine/009_add_user.class.php77
-rw-r--r--exchange/lib/migration/doctrine/010_add_object_theme_group.class.php57
-rw-r--r--exchange/lib/migration/doctrine/011_add_object.class.php82
-rw-r--r--exchange/lib/migration/doctrine/012_add_madule_theme_group.class.php57
-rw-r--r--exchange/lib/migration/doctrine/013_apply_foreign_key_constraints.class.php184
-rw-r--r--exchange/lib/migration/doctrine/014_metadata.class.php20
-rwxr-xr-xexchange/lib/migration/doctrine/015_showcase.class.php20
-rw-r--r--exchange/lib/model/doctrine/Application.class.php188
-rw-r--r--exchange/lib/model/doctrine/ApplicationTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/ApplicationThemeGroup.class.php23
-rw-r--r--exchange/lib/model/doctrine/ApplicationThemeGroupTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/Comment.class.php64
-rw-r--r--exchange/lib/model/doctrine/CommentTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/Madule.class.php190
-rw-r--r--exchange/lib/model/doctrine/MaduleTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/MaduleThemeGroup.class.php23
-rw-r--r--exchange/lib/model/doctrine/MaduleThemeGroupTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/Rating.class.php30
-rw-r--r--exchange/lib/model/doctrine/RatingTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/Theme.class.php197
-rw-r--r--exchange/lib/model/doctrine/ThemeGroup.class.php91
-rw-r--r--exchange/lib/model/doctrine/ThemeGroupTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/ThemeTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/ThemeThemeGroup.class.php15
-rw-r--r--exchange/lib/model/doctrine/ThemeThemeGroupTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/User.class.php189
-rw-r--r--exchange/lib/model/doctrine/UserTable.class.php10
-rw-r--r--exchange/lib/model/doctrine/generated/BaseApplication.class.php44
-rw-r--r--exchange/lib/model/doctrine/generated/BaseApplicationThemeGroup.class.php30
-rw-r--r--exchange/lib/model/doctrine/generated/BaseComment.class.php38
-rw-r--r--exchange/lib/model/doctrine/generated/BaseMadule.class.php45
-rw-r--r--exchange/lib/model/doctrine/generated/BaseMaduleThemeGroup.class.php30
-rw-r--r--exchange/lib/model/doctrine/generated/BaseRating.class.php36
-rw-r--r--exchange/lib/model/doctrine/generated/BaseTheme.class.php44
-rw-r--r--exchange/lib/model/doctrine/generated/BaseThemeGroup.class.php33
-rw-r--r--exchange/lib/model/doctrine/generated/BaseThemeThemeGroup.class.php30
-rw-r--r--exchange/lib/model/doctrine/generated/BaseUser.class.php43
-rw-r--r--exchange/lib/rememberFilter.class.php25
-rw-r--r--exchange/plugins/sfDoctrinePlugin/LICENSE7
-rw-r--r--exchange/plugins/sfDoctrinePlugin/README24
-rw-r--r--exchange/plugins/sfDoctrinePlugin/config/autoload.yml11
-rw-r--r--exchange/plugins/sfDoctrinePlugin/config/config_handlers.yml7
-rw-r--r--exchange/plugins/sfDoctrinePlugin/config/doctrine.yml28
-rw-r--r--exchange/plugins/sfDoctrinePlugin/config/settings.yml3
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/skeleton/actions/actions.class.php13
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/skeleton/config/generator.yml5
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/skeleton/lib/.sf0
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/skeleton/templates/.sf0
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/skeleton/validate/.sf0
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/template/actions/actions.class.php104
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/template/templates/editSuccess.php31
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/template/templates/listSuccess.php27
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/crud/template/templates/showSuccess.php13
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/skeleton/actions/actions.class.php13
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/skeleton/config/generator.yml5
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/actions/actions.class.php422
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_edit_actions.php13
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_edit_footer.php0
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_edit_form.php86
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_edit_header.php0
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_edit_messages.php15
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_filters.php37
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list.php43
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_actions.php10
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_batch_actions.php13
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_footer.php0
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_header.php0
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_messages.php12
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_td_actions.php9
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_td_batch_actions.php5
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_td_stacked.php16
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_td_tabular.php16
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_th_stacked.php1
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/_list_th_tabular.php24
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/editSuccess.php22
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineAdmin/default/template/templates/listSuccess.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineForm/default/template/sfDoctrineFormBaseTemplate.php14
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineForm/default/template/sfDoctrineFormGeneratedTemplate.php114
-rw-r--r--exchange/plugins/sfDoctrinePlugin/data/generator/sfDoctrineForm/default/template/sfDoctrineFormTemplate.php16
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/database/sfDoctrineDataRetriever.class.php28
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/database/sfDoctrineDatabase.class.php215
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine.php1048
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Access.php203
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter.php108
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Db2.php325
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Interface.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Mock.php294
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Mysqli.php142
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Oracle.php257
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Statement.php131
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Statement/Interface.php276
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Adapter/Statement/Mock.php379
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/AuditLog.php139
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/AuditLog/Listener.php147
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache.php416
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Apc.php100
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Array.php113
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Db.php200
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Driver.php80
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Interface.php73
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Memcache.php128
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cache/Xcache.php97
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cli.php356
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cli/AnsiColorFormatter.php160
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cli/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Cli/Formatter.php116
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Collection.php917
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Collection/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Collection/Iterator.php119
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Collection/Iterator/Expandable.php54
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Collection/Iterator/Normal.php42
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Collection/Iterator/Offset.php37
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Collection/Offset.php65
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Column.php158
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Compiler.php139
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Compiler/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Configurable.php484
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection.php1535
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Common.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Db2.php64
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Exception.php130
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Firebird.php114
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Firebird/Exception.php136
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Informix.php62
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Informix/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Mock.php51
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Module.php83
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Mssql.php205
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Mssql/Exception.php75
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Mysql.php213
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Mysql/Exception.php86
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Oracle.php130
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Oracle/Exception.php80
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Pgsql.php195
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Pgsql/Exception.php108
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Profiler.php182
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Profiler/Exception.php35
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Sqlite.php141
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Sqlite/Exception.php78
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Statement.php459
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/UnitOfWork.php851
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Data.php286
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Data/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Data/Export.php208
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Data/Import.php449
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict.php96
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Firebird.php218
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Informix.php110
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Mssql.php195
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Mysql.php477
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Oracle.php199
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Pgsql.php641
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataDict/Sqlite.php312
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/DataType.php49
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Event.php351
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/EventListener.php119
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/EventListener/Chain.php405
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/EventListener/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/EventListener/Interface.php68
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Exception.php92
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export.php1310
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Firebird.php551
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Frontbase.php316
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Informix.php37
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Mssql.php256
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Mysql.php744
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Oracle.php505
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Pgsql.php364
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Reporter.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Schema.php146
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Export/Sqlite.php407
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression.php145
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Driver.php762
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Firebird.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Informix.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Mock.php35
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Mssql.php92
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Mysql.php149
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Oracle.php108
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Pgsql.php222
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Expression/Sqlite.php172
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/File.php53
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/File/Index.php56
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Formatter.php245
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hook.php230
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hook/Equal.php52
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hook/Integer.php75
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hook/Parser.php67
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hook/Parser/Complex.php107
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hook/WordLike.php66
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hydrator.php348
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hydrator/Abstract.php124
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hydrator/ArrayDriver.php75
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hydrator/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Hydrator/RecordDriver.php143
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/I18n.php123
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/I18n/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import.php385
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Builder.php1073
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Builder/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Firebird.php128
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Informix.php55
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Mssql.php201
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Mysql.php212
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Oracle.php239
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Pgsql.php251
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Schema.php702
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Import/Sqlite.php240
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Inflector.php447
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/IntegrityMapper.php174
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Lib.php447
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Locator.php197
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Locator/Exception.php36
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Locator/Injectable.php149
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Locking/Exception.php37
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Locking/Manager/Pessimistic.php291
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Manager.php643
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Manager/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Migration.php629
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Migration/Builder.php320
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Migration/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Migration/IrreversibleMigrationException.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Migration/Process.php251
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node.php190
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/AdjacencyList.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/AdjacencyList/LevelOrderIterator.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/AdjacencyList/PostOrderIterator.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/AdjacencyList/PreOrderIterator.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/Interface.php268
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/MaterializedPath.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/MaterializedPath/LevelOrderIterator.php68
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/MaterializedPath/PostOrderIterator.php68
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/MaterializedPath/PreOrderIterator.php68
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/NestedSet.php1019
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/NestedSet/LevelOrderIterator.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/NestedSet/PostOrderIterator.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Node/NestedSet/PreOrderIterator.php183
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Null.php46
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Overloadable.php44
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Pager.php576
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Pager/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Pager/Layout.php513
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Pager/Range.php176
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Pager/Range/Jumping.php117
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Pager/Range/Sliding.php133
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser.php149
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/Json.php68
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/Serialize.php65
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/Spyc.php836
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/Spyc/YamlNode.php56
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/Xml.php140
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Parser/Yml.php72
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query.php1938
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Abstract.php1972
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Check.php169
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Condition.php118
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Filter.php63
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Filter/Chain.php109
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Filter/Interface.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/From.php96
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Groupby.php52
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Having.php102
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/JoinCondition.php143
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Limit.php39
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Offset.php39
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Orderby.php53
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Parser.php35
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Part.php61
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Registry.php70
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Registry/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Select.php39
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Set.php58
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Tokenizer.php387
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Tokenizer/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Where.php180
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/RawSql.php330
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/RawSql/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record.php1900
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Abstract.php359
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Filter.php62
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Filter/Compound.php100
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Filter/Standard.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Generator.php368
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Iterator.php81
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Listener.php85
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Listener/Chain.php209
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/Listener/Interface.php62
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Record/State/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation.php376
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/Association.php98
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/Association/Self.php111
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/ForeignKey.php100
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/LocalKey.php82
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/Nest.php146
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/Parser.php512
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Relation/Parser/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search.php267
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Analyzer.php39
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Analyzer/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Analyzer/Interface.php36
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Analyzer/Standard.php298
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/File.php80
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Indexer.php75
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Indexer/Dir.php47
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Indexer/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Listener.php59
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Parser.php41
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Query.php235
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Record.php47
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Search/Scorer.php63
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence.php74
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Db2.php123
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Firebird.php107
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Informix.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Mssql.php157
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Mysql.php112
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Oracle.php96
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Pgsql.php94
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Sequence/Sqlite.php114
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Table.php2208
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Table/Exception.php41
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Table/Repository.php163
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Table/Repository/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task.php232
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/BuildAll.php65
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/BuildAllLoad.php58
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/BuildAllReload.php58
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/Compile.php46
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/CreateDb.php48
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/CreateTables.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/Dql.php73
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/DropDb.php59
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/DumpData.php54
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateMigration.php46
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateMigrationsDb.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateMigrationsModels.php46
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateModelsDb.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateModelsYaml.php46
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateSql.php56
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateYamlDb.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/GenerateYamlModels.php46
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/LoadData.php47
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/LoadDummyData.php47
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/Migrate.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Task/RebuildDb.php58
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template.php152
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Geographical.php133
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/I18n.php65
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Listener/Sluggable.php180
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Listener/SoftDelete.php118
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Listener/Timestampable.php109
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/NestedSet.php73
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Searchable.php70
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Sluggable.php83
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/SoftDelete.php71
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Timestampable.php85
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Template/Versionable.php102
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction.php515
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Firebird.php140
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Informix.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Mock.php36
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Mssql.php92
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Mysql.php116
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Oracle.php106
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Pgsql.php105
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Transaction/Sqlite.php66
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Tree.php131
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Tree/AdjacencyList.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Tree/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Tree/Interface.php65
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Tree/MaterializedPath.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Tree/NestedSet.php357
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Util.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator.php168
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Country.php302
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Creditcard.php82
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Date.php53
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Driver.php116
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Email.php78
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/ErrorStack.php185
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Exception.php100
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Future.php79
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Htmlcolor.php48
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Ip.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Minlength.php49
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Nospace.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Notblank.php46
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Notnull.php45
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Past.php79
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Range.php51
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Readonly.php43
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Regexp.php62
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Time.php65
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Timestamp.php66
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Unique.php71
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Unsigned.php50
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Validator/Usstate.php105
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/View.php192
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/View/Exception.php34
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineAdminColumn.class.php232
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineAdminGenerator.class.php263
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineFormGenerator.class.php548
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/helper/ObjectDoctrineAdminHelper.php116
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineCli.class.php67
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineConfigHandler.class.php104
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineConnectionListener.class.php30
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineException.class.php30
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrinePager.class.php145
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineQueryLogger.class.php132
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineRecord.class.php163
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineRecordListener.class.php51
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfDoctrineSchemasConfigHandler.class.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/sfFormDoctrine.class.php285
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php98
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildAllLoadTask.class.php85
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildAllReloadTask.class.php94
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildAllReloadTestAllTask.class.php91
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildAllTask.class.php72
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildDbTask.class.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildFormsTask.class.php85
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php97
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildSchemaTask.class.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildSqlTask.class.php59
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDataDumpTask.class.php78
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDataLoadTask.class.php81
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDqlTask.class.php54
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDropDbTask.class.php58
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateCrudTask.class.php101
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateMigrationTask.class.php56
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateMigrationsDbTask.class.php55
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateMigrationsModelsTask.class.php55
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineInitAdminTask.class.php93
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineInsertSqlTask.class.php58
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php57
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/task/sfDoctrineRebuildDbTask.class.php71
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/validator/sfDoctrineUniqueValidator.class.php111
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/validator/sfValidatorDoctrineChoice.class.php84
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/validator/sfValidatorDoctrineChoiceMany.class.php44
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/validator/sfValidatorDoctrineUnique.class.php137
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/widget/sfWidgetFormDoctrineSelect.class.php97
-rw-r--r--exchange/plugins/sfDoctrinePlugin/lib/widget/sfWidgetFormDoctrineSelectMany.class.php32
-rw-r--r--exchange/plugins/sfDoctrinePlugin/package.xml49
-rwxr-xr-xexchange/symfony15
-rw-r--r--exchange/test/bootstrap/functional.php26
-rw-r--r--exchange/test/bootstrap/unit.php15
-rw-r--r--exchange/test/functional/exchange/apiActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/applicationActionsTest.php13
-rw-r--r--exchange/test/functional/exchange/applicationThemeGroupActionsTest.php13
-rw-r--r--exchange/test/functional/exchange/commentActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/homeActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/moduleActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/moduleThemeGroupActionsTest.php13
-rw-r--r--exchange/test/functional/exchange/objectActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/ratingActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/restActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/themeActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/themeGroupActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/userActionsTest.php15
-rw-r--r--exchange/test/functional/exchange/wallpaperActionsTest.php15
-rwxr-xr-xexchange/update.sh8
-rw-r--r--exchange/web/.htaccess25
-rw-r--r--exchange/web/css/ReMooz.css186
-rw-r--r--exchange/web/css/main.css419
-rw-r--r--exchange/web/css/ratings.css56
-rw-r--r--exchange/web/exchange_dev.php6
-rw-r--r--exchange/web/favicon.icobin0 -> 1150 bytes
-rw-r--r--exchange/web/images/ajax-loading.gifbin0 -> 847 bytes
-rw-r--r--exchange/web/images/button.pngbin0 -> 1441 bytes
-rw-r--r--exchange/web/images/button_cat.pngbin0 -> 891 bytes
-rw-r--r--exchange/web/images/button_cat2.pngbin0 -> 1744 bytes
-rw-r--r--exchange/web/images/button_down.pngbin0 -> 1705 bytes
-rw-r--r--exchange/web/images/closebox.gifbin0 -> 351 bytes
-rw-r--r--exchange/web/images/closebox.pngbin0 -> 1910 bytes
-rw-r--r--exchange/web/images/exchange.svg227
-rw-r--r--exchange/web/images/logo.pngbin0 -> 24899 bytes
-rw-r--r--exchange/web/images/magnifier.pngbin0 -> 2251 bytes
-rw-r--r--exchange/web/images/rating.pngbin0 -> 417 bytes
-rw-r--r--exchange/web/images/rating2.pngbin0 -> 425 bytes
-rw-r--r--exchange/web/images/remo_bg_e.pngbin0 -> 990 bytes
-rw-r--r--exchange/web/images/remo_bg_n.pngbin0 -> 986 bytes
-rw-r--r--exchange/web/images/remo_bg_ne.pngbin0 -> 1367 bytes
-rw-r--r--exchange/web/images/remo_bg_nw.pngbin0 -> 1246 bytes
-rw-r--r--exchange/web/images/remo_bg_s.pngbin0 -> 985 bytes
-rw-r--r--exchange/web/images/remo_bg_se.pngbin0 -> 1260 bytes
-rw-r--r--exchange/web/images/remo_bg_sw.pngbin0 -> 1223 bytes
-rw-r--r--exchange/web/images/remo_bg_w.pngbin0 -> 981 bytes
-rw-r--r--exchange/web/images/spinner.gifbin0 -> 1569 bytes
-rw-r--r--exchange/web/index.php6
-rw-r--r--exchange/web/index_prod.php6
-rw-r--r--exchange/web/js/ReMooz.js364
-rw-r--r--exchange/web/js/mootools-more.js153
-rw-r--r--exchange/web/js/mootools-more_dev.js1491
-rw-r--r--exchange/web/js/mootools.js341
-rw-r--r--exchange/web/js/mootools_dev.js3816
-rw-r--r--exchange/web/js/ratings.js144
-rw-r--r--exchange/web/js/script.js16
-rw-r--r--exchange/web/robots.txt2
664 files changed, 83095 insertions, 0 deletions
diff --git a/edje_list/AUTHORS b/edje_list/AUTHORS
new file mode 100644
index 0000000..569e63f
--- /dev/null
+++ b/edje_list/AUTHORS
@@ -0,0 +1 @@
Sthithaprajna Garapaty (iamsthitha) \ No newline at end of file
diff --git a/edje_list/COPYING b/edje_list/COPYING
new file mode 100644
index 0000000..25562c5
--- /dev/null
+++ b/edje_list/COPYING
@@ -0,0 +1,20 @@
1Copyright (C) 2008 Sthithaprajna Garapaty
2
3Permission is hereby granted, free of charge, to any person obtaining a copy
4of this software and associated documentation files (the "Software"), to
5deal in the Software without restriction, including without limitation the
6rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7sell copies of the Software, and to permit persons to whom the Software is
8furnished to do so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in
11all copies of the Software, its documentation and marketing & publicity
12materials, and acknowledgment shall be given in the documentation, materials
13and software packages that this Software was used.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/edje_list/ChangeLog b/edje_list/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/edje_list/ChangeLog
diff --git a/edje_list/Makefile.am b/edje_list/Makefile.am
new file mode 100644
index 0000000..bc44e24
--- /dev/null
+++ b/edje_list/Makefile.am
@@ -0,0 +1,7 @@
1
2SUBDIRS = src
3
4MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
5 config.h.in config.sub configure install-sh \
6 ltconfig ltmain.sh missing mkinstalldirs \
7 stamp-h.in depcomp
diff --git a/edje_list/NEWS b/edje_list/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/edje_list/NEWS
diff --git a/edje_list/README b/edje_list/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/edje_list/README
diff --git a/edje_list/autogen.sh b/edje_list/autogen.sh
new file mode 100755
index 0000000..995ff2f
--- /dev/null
+++ b/edje_list/autogen.sh
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6touch README
7
8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running autoconf..." ; autoconf || exit 1
11echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
12echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
13
14if [ -z "$NOCONFIGURE" ]; then
15 ./configure "$@"
16fi
diff --git a/edje_list/configure.in b/edje_list/configure.in
new file mode 100644
index 0000000..e731bb9
--- /dev/null
+++ b/edje_list/configure.in
@@ -0,0 +1,27 @@
1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT(edje_list, 0.0.1, enlightenment-devel@lists.sourceforge.net)
4AC_PREREQ(2.52)
5AC_CONFIG_SRCDIR(configure.in)
6
7AM_INIT_AUTOMAKE
8AM_CONFIG_HEADER(config.h)
9
10AC_PROG_CC
11AM_PROG_CC_STDC
12AC_HEADER_STDC
13AC_C_CONST
14
15define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
16define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
17AC_PROG_LIBTOOL
18
19PKG_CHECK_MODULES(EVAS, [evas >= 0.9.9])
20
21PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0])
22
23AC_OUTPUT([
24Makefile
25src/Makefile
26src/bin/Makefile
27])
diff --git a/edje_list/src/Makefile.am b/edje_list/src/Makefile.am
new file mode 100644
index 0000000..c296d8c
--- /dev/null
+++ b/edje_list/src/Makefile.am
@@ -0,0 +1,4 @@
1
2SUBDIRS = bin
3
4MAINTAINERCLEANFILES = Makefile.in
diff --git a/edje_list/src/bin/Makefile.am b/edje_list/src/bin/Makefile.am
new file mode 100644
index 0000000..6206f7a
--- /dev/null
+++ b/edje_list/src/bin/Makefile.am
@@ -0,0 +1,16 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I$(top_builddir) \
6-I$(top_srcdir) \
7-I$(top_srcdir)/src/bin \
8@EDJE_CFLAGS@ @EVAS_CFLAGS@
9
10bin_PROGRAMS = edje_list
11
12edje_list_SOURCES = \
13main.c \
14main.h
15
16edje_list_LDADD = @EDJE_LIBS@ @EVAS_LIBS@
diff --git a/edje_list/src/bin/main.c b/edje_list/src/bin/main.c
new file mode 100644
index 0000000..1d4612b
--- /dev/null
+++ b/edje_list/src/bin/main.c
@@ -0,0 +1,32 @@
1#include "main.h"
2
3int
4main(int argc, char **argv)
5{
6 Evas_List *l;
7 char *string;
8 edje_init();
9
10 string = edje_file_data_get(argv[argc - 1], "theme/name");
11 if (!string)
12 string = "";
13 printf("Name: %s\n", string);
14 string = edje_file_data_get(argv[argc - 1], "theme/author");
15 if (!string)
16 string = "";
17 printf("Author: %s\n", string);
18 string = edje_file_data_get(argv[argc - 1], "theme/license");
19 if (!string)
20 string = "";
21 printf("License: %s\n", string);
22 string = edje_file_data_get(argv[argc - 1], "theme/version");
23 if (!string)
24 string = "";
25 printf("Version: %s\n", string);
26 for(l = edje_file_collection_list(argv[argc - 1]); l; l = l->next)
27 {
28 printf("%s\n", l->data);
29 }
30 edje_shutdown();
31 return 0;
32}
diff --git a/edje_list/src/bin/main.h b/edje_list/src/bin/main.h
new file mode 100644
index 0000000..592fe38
--- /dev/null
+++ b/edje_list/src/bin/main.h
@@ -0,0 +1,29 @@
1#include "config.h"
2
3#include <stdio.h>
4#include <string.h>
5#include <Evas.h>
6#include <Edje.h>
7
8#ifdef EAPI
9#undef EAPI
10#endif
11#ifdef WIN32
12# ifdef BUILDING_DLL
13# define EAPI __declspec(dllexport)
14# else
15# define EAPI __declspec(dllimport)
16# endif
17#else
18# ifdef __GNUC__
19# if __GNUC__ >= 4
20// BROKEN in gcc 4 on amd64
21//# pragma GCC visibility push(hidden)
22# define EAPI __attribute__ ((visibility("default")))
23# else
24# define EAPI
25# endif
26# else
27# define EAPI
28# endif
29#endif
diff --git a/edje_smart_thumb/AUTHORS b/edje_smart_thumb/AUTHORS
new file mode 100644
index 0000000..5c674e7
--- /dev/null
+++ b/edje_smart_thumb/AUTHORS
@@ -0,0 +1,2 @@
1Sthithaprajna Garapaty (iamsthitha)
2and whoever wrote edje_thumb \ No newline at end of file
diff --git a/edje_smart_thumb/COPYING b/edje_smart_thumb/COPYING
new file mode 100644
index 0000000..25562c5
--- /dev/null
+++ b/edje_smart_thumb/COPYING
@@ -0,0 +1,20 @@
1Copyright (C) 2008 Sthithaprajna Garapaty
2
3Permission is hereby granted, free of charge, to any person obtaining a copy
4of this software and associated documentation files (the "Software"), to
5deal in the Software without restriction, including without limitation the
6rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7sell copies of the Software, and to permit persons to whom the Software is
8furnished to do so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in
11all copies of the Software, its documentation and marketing & publicity
12materials, and acknowledgment shall be given in the documentation, materials
13and software packages that this Software was used.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/edje_smart_thumb/ChangeLog b/edje_smart_thumb/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/edje_smart_thumb/ChangeLog
diff --git a/edje_smart_thumb/Makefile.am b/edje_smart_thumb/Makefile.am
new file mode 100644
index 0000000..bc44e24
--- /dev/null
+++ b/edje_smart_thumb/Makefile.am
@@ -0,0 +1,7 @@
1
2SUBDIRS = src
3
4MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
5 config.h.in config.sub configure install-sh \
6 ltconfig ltmain.sh missing mkinstalldirs \
7 stamp-h.in depcomp
diff --git a/edje_smart_thumb/NEWS b/edje_smart_thumb/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/edje_smart_thumb/NEWS
diff --git a/edje_smart_thumb/README b/edje_smart_thumb/README
new file mode 100644
index 0000000..d38fa0b
--- /dev/null
+++ b/edje_smart_thumb/README
@@ -0,0 +1,2 @@
1This is a thumbnailing app written specifically for themes for the enlightenment WM.
2Lots of code taken from edje_thumb. \ No newline at end of file
diff --git a/edje_smart_thumb/autogen.sh b/edje_smart_thumb/autogen.sh
new file mode 100755
index 0000000..995ff2f
--- /dev/null
+++ b/edje_smart_thumb/autogen.sh
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6touch README
7
8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running autoconf..." ; autoconf || exit 1
11echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
12echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
13
14if [ -z "$NOCONFIGURE" ]; then
15 ./configure "$@"
16fi
diff --git a/edje_smart_thumb/configure.in b/edje_smart_thumb/configure.in
new file mode 100644
index 0000000..5cefd82
--- /dev/null
+++ b/edje_smart_thumb/configure.in
@@ -0,0 +1,33 @@
1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT(edje_smart_thumb, 0.0.1, enlightenment-devel@lists.sourceforge.net)
4AC_PREREQ(2.52)
5AC_CONFIG_SRCDIR(configure.in)
6
7AM_INIT_AUTOMAKE
8AM_CONFIG_HEADER(config.h)
9
10AC_PROG_CC
11AM_PROG_CC_STDC
12AC_HEADER_STDC
13AC_C_CONST
14
15define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
16define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
17AC_PROG_LIBTOOL
18
19PKG_CHECK_MODULES(EVAS, [evas >= 0.9.9])
20
21PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0])
22
23
24PKG_CHECK_MODULES(ECORE, [
25 ecore
26 ecore-evas
27])
28
29AC_OUTPUT([
30Makefile
31src/Makefile
32src/bin/Makefile
33])
diff --git a/edje_smart_thumb/src/Makefile.am b/edje_smart_thumb/src/Makefile.am
new file mode 100644
index 0000000..c296d8c
--- /dev/null
+++ b/edje_smart_thumb/src/Makefile.am
@@ -0,0 +1,4 @@
1
2SUBDIRS = bin
3
4MAINTAINERCLEANFILES = Makefile.in
diff --git a/edje_smart_thumb/src/bin/Makefile.am b/edje_smart_thumb/src/bin/Makefile.am
new file mode 100644
index 0000000..cbe6575
--- /dev/null
+++ b/edje_smart_thumb/src/bin/Makefile.am
@@ -0,0 +1,16 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I$(top_builddir) \
6-I$(top_srcdir) \
7-I$(top_srcdir)/src/bin \
8@EDJE_CFLAGS@ @EVAS_CFLAGS@
9
10bin_PROGRAMS = edje_smart_thumb
11
12edje_smart_thumb_SOURCES = \
13main.c \
14main.h
15
16edje_smart_thumb_LDADD = @EDJE_LIBS@ @EVAS_LIBS@
diff --git a/edje_smart_thumb/src/bin/main.c b/edje_smart_thumb/src/bin/main.c
new file mode 100644
index 0000000..54af83a
--- /dev/null
+++ b/edje_smart_thumb/src/bin/main.c
@@ -0,0 +1,406 @@
1#include "main.h"
2
3static void args_parse(void);
4static void help_show(void);
5static int signal_exit(void *data, int ev_type, void *ev);
6static int thumb_grab(void *data);
7
8Ecore_Evas *ee = NULL, *ee_im = NULL, *ee_im2 = NULL;
9Evas *evas = NULL, *evas_im = NULL, *evas_im2 = NULL;
10Evas_Object *edje = NULL, *im = NULL, *im2 = NULL;
11char *file = NULL;
12char *group = NULL;
13char *outfile = NULL;
14int w = 640;
15int h = 480;
16int outw = 160;
17int outh = 120;
18
19int
20main(int argc, char **argv)
21{
22 if (!ecore_init()) return -1;
23 ecore_app_args_set(argc, (const char **)argv);
24 ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, signal_exit, NULL);
25 if (!ecore_evas_init()) return -1;
26 if (!edje_init()) return -1;
27
28 args_parse();
29
30 ee = ecore_evas_buffer_new(outw, outh);
31 if (!ee)
32 {
33 fprintf(stderr, "Error. cannot create buffer engine canvas for image save.\n");
34 exit(-1);
35 }
36 evas = ecore_evas_get(ee);
37
38 im = ecore_evas_object_image_new(ee);
39 if (!im)
40 {
41 fprintf(stderr, "Error. cannot create buffer canvas image object for scaling.\n");
42 exit(-1);
43 }
44 evas_object_move(im, 0, 0);
45 evas_object_resize(im, outw, outh);
46 evas_object_image_fill_set(im, 0, 0, outw, outh);
47 evas_object_show(im);
48 evas_object_image_size_set(im, outw, outh);
49 ee_im = evas_object_data_get(im, "Ecore_Evas");
50 evas_im = ecore_evas_get(ee_im);
51
52 im2 = ecore_evas_object_image_new(ee_im);
53 if (!im2)
54 {
55 fprintf(stderr, "Error. cannot create buffer canvas image for scaling.\n");
56 exit(-1);
57 }
58 evas_object_move(im2, 0, 0);
59 evas_object_resize(im2, outw, outh);
60 evas_object_image_fill_set(im2, 0, 0, outw, outh);
61 evas_object_show(im2);
62 evas_object_image_size_set(im2, w, h);
63 ee_im2 = evas_object_data_get(im2, "Ecore_Evas");
64 evas_im2 = ecore_evas_get(ee_im2);
65
66 setup_scene();
67
68 edje_message_signal_process();
69
70 ecore_timer_add(2.0, thumb_grab, NULL);
71 ecore_main_loop_begin();
72
73 evas_object_del(edje);
74 ecore_evas_free(ee);
75 edje_shutdown();
76 ecore_evas_shutdown();
77 ecore_shutdown();
78 return 0;
79}
80
81static void
82setup_scene(void)
83{
84 if (!strcmp(group, "e/desktop/background"))
85 {
86 edje = edje_object_add(evas_im2);
87 if (!edje_object_file_set(edje, file, group))
88 {
89 fprintf(stderr, "Error. cannot load file %s, group %s\n", file, group);
90 exit(-1);
91 }
92 evas_object_move(edje, 0, 0);
93 evas_object_resize(edje, w, h);
94 evas_object_show(edje);
95 }
96 else if (!strcmp(group, "e/fileman"))
97 {
98
99 }
100 else if (!strcmp(group, "e/gadman"))
101 {
102
103 }
104 else if (!strcmp(group, "e/icons"))
105 {
106
107 }
108 else if (!strcmp(group, "e/modules/battery"))
109 {
110
111 }
112 else if (!strcmp(group, "e/modules/clock"))
113 {
114
115 }
116 else if (!strcmp(group, "e/modules/cpufreq"))
117 {
118
119 }
120 else if (!strcmp(group, "e/modules/ibar"))
121 {
122
123 }
124 else if (!strcmp(group, "e/modules/ibox"))
125 {
126
127 }
128 else if (!strcmp(group, "e/modules/pager"))
129 {
130
131 }
132 else if (!strcmp(group, "e/modules/start"))
133 {
134
135 }
136 else if (!strcmp(group, "e/modules/temperature"))
137 {
138
139 }
140 else if (!strcmp(group, "e/modules/winlist"))
141 {
142
143 }
144 else if (!strcmp(group, "e/pointer"))
145 {
146
147 }
148 else if (!strcmp(group, "e/shelf"))
149 {
150
151 }
152 else if (!strcmp(group, "e/theme/about"))
153 {
154
155 }
156 else if (!strcmp(group, "e/widgets/border"))
157 {
158
159 }
160 else if (!strcmp(group, "e/widgets/border/default"))
161 {
162
163 }
164 else if (!strcmp(group, "e/widgets/border/dialog"))
165 {
166
167 }
168 else if (!strcmp(group, "e/widgets/border/noresize"))
169 {
170
171 }
172 else if (!strcmp(group, "e/widgets/border/noresize_dialog"))
173 {
174
175 }
176 else if (!strcmp(group, "e/widgets/border/pixel"))
177 {
178
179 }
180 else if (!strcmp(group, "e/widgets/border/shaped"))
181 {
182
183 }
184 else if (!strcmp(group, "e/widgets/about"))
185 {
186
187 }
188 else if (!strcmp(group, "e/widgets/button"))
189 {
190
191 }
192 else if (!strcmp(group, "e/widgets/check"))
193 {
194
195 }
196 else if (!strcmp(group, "e/widgets/color_well"))
197 {
198
199 }
200 else if (!strcmp(group, "e/widgets/configure"))
201 {
202
203 }
204 else if (!strcmp(group, "e/widgets/cslider"))
205 {
206
207 }
208 else if (!strcmp(group, "e/widgets/deskpreview"))
209 {
210
211 }
212 else if (!strcmp(group, "e/widgets/dialog"))
213 {
214
215 }
216 else if (!strcmp(group, "e/widgets/entry"))
217 {
218
219 }
220 else if (!strcmp(group, "e/widgets/exebuf"))
221 {
222
223 }
224 else if (!strcmp(group, "e/widgets/fileselector"))
225 {
226
227 }
228 else if (!strcmp(group, "e/widgets/fontpreview"))
229 {
230
231 }
232 else if (!strcmp(group, "e/widgets/frame"))
233 {
234
235 }
236 else if (!strcmp(group, "e/widgets/gradpreview"))
237 {
238
239 }
240 else if (!strcmp(group, "e/widgets/ilist"))
241 {
242
243 }
244 else if (!strcmp(group, "e/widgets/label"))
245 {
246
247 }
248 else if (!strcmp(group, "e/widgets/menu"))
249 {
250
251 }
252 else if (!strcmp(group, "e/widgets/pager"))
253 {
254
255 }
256 else if (!strcmp(group, "e/widgets/preview"))
257 {
258
259 }
260 else if (!strcmp(group, "e/widgets/radio"))
261 {
262
263 }
264 else if (!strcmp(group, "e/widgets/scrollframe"))
265 {
266
267 }
268 else if (!strcmp(group, "e/widgets/slider"))
269 {
270
271 }
272 else if (!strcmp(group, "e/widgets/spectrum"))
273 {
274
275 }
276 else if (!strcmp(group, "e/widgets/textblock"))
277 {
278
279 }
280 else if (!strcmp(group, "e/widgets/tlist"))
281 {
282
283 }
284 else if (!strcmp(group, "e/widgets/winlist"))
285 {
286
287 }
288 else
289 {
290 edje = edje_object_add(evas_im2);
291 if (!edje_object_file_set(edje, file, group))
292 {
293 fprintf(stderr, "Error. cannot load file %s, group %s\n", file, group);
294 exit(-1);
295 }
296 evas_object_move(edje, 0, 0);
297 evas_object_resize(edje, w, h);
298 evas_object_show(edje);
299 }
300}
301
302static void
303args_parse(void)
304{
305 int argc;
306 char **argv;
307 int i;
308
309 ecore_app_args_get(&argc, &argv);
310 for (i = 1; i < argc; i++)
311 {
312 if ((!strcmp(argv[i], "-h")) ||
313 (!strcmp(argv[i], "-help")) ||
314 (!strcmp(argv[i], "--help")))
315 {
316 help_show();
317 exit(-1);
318 }
319 else if (((!strcmp(argv[i], "-g")) ||
320 (!strcmp(argv[i], "-geometry")) ||
321 (!strcmp(argv[i], "--geometry"))) && (i < (argc - 1)))
322 {
323 int n;
324 char buf[16], buf2[16];
325
326 n = sscanf(argv[i +1], "%10[^x]x%10s", buf, buf2);
327 if (n == 2)
328 {
329 w = atoi(buf);
330 h = atoi(buf2);
331 }
332 i++;
333 }
334 else if (((!strcmp(argv[i], "-og")) ||
335 (!strcmp(argv[i], "-out-geometry")) ||
336 (!strcmp(argv[i], "--out-geometry"))) && (i < (argc - 1)))
337 {
338 int n;
339 char buf[16], buf2[16];
340
341 n = sscanf(argv[i +1], "%10[^x]x%10s", buf, buf2);
342 if (n == 2)
343 {
344 outw = atoi(buf);
345 outh = atoi(buf2);
346 }
347 i++;
348 }
349 else if (!file)
350 {
351 file = argv[i];
352 }
353 else if (!group)
354 {
355 group = argv[i];
356 }
357 else if (!outfile)
358 {
359 outfile = argv[i];
360 }
361 }
362 if ((!file) || (!group) || (!outfile))
363 {
364 help_show();
365 exit(-1);
366 }
367}
368
369static void
370help_show(void)
371{
372 printf("Usage: edje_thumb INPUT_EDJE GROUP_TO_LOAD OUT_FILE [OPTIONS]\n"
373 "\n"
374 "Where required parameters are:\n"
375 " INPUT_EDJE the edje file to look at\n"
376 " GROUP_TO_LOAD the group name in the edge\n"
377 " OUT_FILE the output file or format\n"
378 "\n"
379 "Where optional OPTIONS are:\n"
380 " -h this help\n" " -g WxH rendering geometry\n"
381 " -og WxH output file geometry\n"
382 );
383}
384
385static int
386signal_exit(void *data, int ev_type, void *ev)
387{
388 ecore_main_loop_quit();
389 return 1;
390}
391
392static int
393thumb_grab(void *data)
394{
395 char buf[4096];
396
397 snprintf(buf, sizeof(buf), outfile);
398 ecore_evas_buffer_pixels_get(ee);
399 if (!evas_object_image_save(im, buf, NULL, "quality=100 compress=9"))
400 {
401 fprintf(stderr, "Error. cannot load file \"%s\". Missing saver module for Evas or literally cannot write the file (permissions or directory doesnt exist).\n", buf);
402 exit(-1);
403 }
404 ecore_main_loop_quit();
405 return 0;
406}
diff --git a/edje_smart_thumb/src/bin/main.h b/edje_smart_thumb/src/bin/main.h
new file mode 100644
index 0000000..99fd087
--- /dev/null
+++ b/edje_smart_thumb/src/bin/main.h
@@ -0,0 +1,31 @@
1#include "config.h"
2
3#include <stdio.h>
4#include <string.h>
5#include <Evas.h>
6#include <Ecore.h>
7#include <Ecore_Evas.h>
8#include <Edje.h>
9
10#ifdef EAPI
11#undef EAPI
12#endif
13#ifdef WIN32
14# ifdef BUILDING_DLL
15# define EAPI __declspec(dllexport)
16# else
17# define EAPI __declspec(dllimport)
18# endif
19#else
20# ifdef __GNUC__
21# if __GNUC__ >= 4
22// BROKEN in gcc 4 on amd64
23//# pragma GCC visibility push(hidden)
24# define EAPI __attribute__ ((visibility("default")))
25# else
26# define EAPI
27# endif
28# else
29# define EAPI
30# endif
31#endif
diff --git a/exchange/README b/exchange/README
new file mode 100644
index 0000000..54639b5
--- /dev/null
+++ b/exchange/README
@@ -0,0 +1,39 @@
1Exchange is the web application that runs exchange.enlightenment.org
2
3For Administrators:
4-------------------
5Administrators are expected to test and approve themes, apps & modules.
6Administrators are also responsible for moderating comments and building a positive atmosphere for the community.
7Administrators should test themes to make sure they are bugfree and do not cause problems when in use. However, administrators should not disapprove themes simply because they look bad.
8
9For Developers:
10---------------
11Exchange is built on top of the symfony (1.1) framework for PHP.
12I recommend going through some of the documentation here http://www.symfony-project.org/doc/1_1/
13At least the first two chapters of the book.
14Exchange also uses PHPDoctrine instead of symfony's default ORM.
15http://www.phpdoctrine.org/
16
17If you are working on developing Exchange, it is recommended that you have a copy of the web application running on your local machine.
18For this you will need a LAMP stack (Linux, Apache, Mysql & PHP)
19You must download symfony 1.1 and setup a database for exchange.
20Edit config/databases.yml and configure your webserver to point to web/index.php
21
22To push changes to the actual website, login to the server
23cd /var/www/exchange
24sudo ./sync.sh
25
26If there are any css/js changes, copy them:
27cp exchange/web/css/* html/css/
28cp exchange/web/js/* html/js/
29
30Remember: Always backup the database and the /var/www/exchange/html/ folder before performing any updates.
31
32If you are making changes to the database schema, you need to edit config/doctrine/schema.yml and create a migration.
33symfony doctrine:generate-migration
34
35On the production server, run:
36symfony doctrine:migrate exchange
37to migrate the production database.
38
39
diff --git a/exchange/TODO b/exchange/TODO
new file mode 100644
index 0000000..b0ec2fe
--- /dev/null
+++ b/exchange/TODO
@@ -0,0 +1,8 @@
1 - Filter by multiple theme groups (This is already done, however, there needs to be a way to allow administrators to put this into the menu)
2 - Applications need a "supports modules" checkbox. Only apps that have this enabled should show up in the edit modules screen.
3 - Add Rating to the API
4 - Add "theme_showcase", "application_showcase" & "module_showcase" cookies. These should be booleans that determine whether to show the showcase on the frontpage or to show all items. New visitors should be shown the showcased themes by default, but returning visitors should be able to switch and see all themes on the frontpage.
5 - Automatically generate screenshots for every part. See edje_smart_thumb. Need a way to automatically generate screenshots for every part of the theme. This way, people can get a full view of the theme before downloading it instead of just viewing a screenshot.
6 - A way to change the owner of an item.
7 - When the new e.org website goes online, exchange needs to be modified to match it.
8
diff --git a/exchange/apps/exchange/config/app.yml b/exchange/apps/exchange/config/app.yml
new file mode 100644
index 0000000..50ecf5b
--- /dev/null
+++ b/exchange/apps/exchange/config/app.yml
@@ -0,0 +1,8 @@
1# default values
2all:
3 copyright: Copyright &copy; Enlightenment.org
4 edje_list_path: /opt/enlightenment/bin/edje_list
5 name: Exchange
6 rss_desc: Exchange RSS Feed
7 url: http://exchange.enlightenment.org
8 webmaster_email: webmaster@enlightenment.org \ No newline at end of file
diff --git a/exchange/apps/exchange/config/cache.yml b/exchange/apps/exchange/config/cache.yml
new file mode 100644
index 0000000..9a80ccb
--- /dev/null
+++ b/exchange/apps/exchange/config/cache.yml
@@ -0,0 +1,4 @@
1default:
2 enabled: off
3 with_layout: false
4 lifetime: 86400
diff --git a/exchange/apps/exchange/config/exchangeConfiguration.class.php b/exchange/apps/exchange/config/exchangeConfiguration.class.php
new file mode 100644
index 0000000..29b344e
--- /dev/null
+++ b/exchange/apps/exchange/config/exchangeConfiguration.class.php
@@ -0,0 +1,8 @@
1<?php
2
3class exchangeConfiguration extends sfApplicationConfiguration
4{
5 public function configure()
6 {
7 }
8}
diff --git a/exchange/apps/exchange/config/factories.yml b/exchange/apps/exchange/config/factories.yml
new file mode 100644
index 0000000..fc1c5d5
--- /dev/null
+++ b/exchange/apps/exchange/config/factories.yml
@@ -0,0 +1,42 @@
1prod:
2 logger:
3 class: sfNoLogger
4 param:
5 level: err
6 loggers: ~
7cli:
8 controller:
9 class: sfConsoleController
10 request:
11 class: sfConsoleRequest
12 response:
13 class: sfConsoleResponse
14
15test:
16 storage:
17 class: sfSessionTestStorage
18
19all:
20 controller:
21 class: sfFrontWebController
22
23 request:
24 class: sfWebRequest
25
26 response:
27 class: sfWebResponse
28
29 user:
30 class: myUser
31
32 storage:
33 class: sfSessionStorage
34 param:
35 session_name: exchange
36
37# view_cache:
38# class: sfFileCache
39# param:
40# automatic_cleaning_factor: 0
41# prefix: %SF_APP_DIR%
42# cache_dir: %SF_TEMPLATE_CACHE_DIR%
diff --git a/exchange/apps/exchange/config/filters.yml b/exchange/apps/exchange/config/filters.yml
new file mode 100644
index 0000000..2bb57bc
--- /dev/null
+++ b/exchange/apps/exchange/config/filters.yml
@@ -0,0 +1,10 @@
1rendering: ~
2rememberMe:
3 class: rememberFilter
4security: ~
5
6# generally, you will want to insert your own filters here
7
8cache: ~
9common: ~
10execution: ~
diff --git a/exchange/apps/exchange/config/routing.yml b/exchange/apps/exchange/config/routing.yml
new file mode 100644
index 0000000..d51a870
--- /dev/null
+++ b/exchange/apps/exchange/config/routing.yml
@@ -0,0 +1,43 @@
1create:
2 url: /:module/create
3 param: { action: update }
4
5delete:
6 url: /:module/delete/:id
7 param: { action: remove }
8
9edit:
10 url: /:module/edit/:id
11 param: { action: update }
12
13show:
14 url: /:module/show/:id
15 param: { action: read }
16
17get:
18 url: /:module/get/:id
19 param: { action: download }
20
21rss:
22 url: /rss/:object/*
23 param: { module: api, action: list, rss: true }
24
25sitemap:
26 url: /sitemap
27 param: { module: home, action: sitemap }
28
29# default rules
30homepage:
31 url: /
32 param: { module: home, action: index }
33
34default_symfony:
35 url: /symfony/:action/*
36 param: { module: home }
37
38default_index:
39 url: /:module
40 param: { action: index }
41
42default:
43 url: /:module/:action/*
diff --git a/exchange/apps/exchange/config/security.yml b/exchange/apps/exchange/config/security.yml
new file mode 100644
index 0000000..225dd93
--- /dev/null
+++ b/exchange/apps/exchange/config/security.yml
@@ -0,0 +1,2 @@
1default:
2 is_secure: off
diff --git a/exchange/apps/exchange/config/settings.yml b/exchange/apps/exchange/config/settings.yml
new file mode 100644
index 0000000..a7622c4
--- /dev/null
+++ b/exchange/apps/exchange/config/settings.yml
@@ -0,0 +1,107 @@
1prod:
2 .settings:
3 logging_enabled: off
4 no_script_name: on
5 debug: off
6
7dev:
8 .settings:
9 # E_ALL | E_STRICT = 4095
10 error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
11 web_debug: off
12 debug: off
13 cache: off
14 no_script_name: on
15 etag: off
16
17test:
18 .settings:
19 # E_ALL | E_STRICT & ~E_NOTICE = 2047
20 error_reporting: <?php echo ((E_ALL | E_STRICT) ^ E_NOTICE)."\n" ?>
21 cache: off
22 web_debug: off
23 no_script_name: off
24 etag: off
25
26all:
27 .actions:
28 default_module: home # Default module and action to be called when
29 default_action: index # A routing rule doesn't set it
30
31 error_404_module: home # To be called when a 404 error is raised
32 error_404_action: error404 # Or when the requested URL doesn't match any route
33
34 login_module: user # To be called when a non-authenticated user
35 login_action: login # Tries to access a secure page
36
37 secure_module: home # To be called when a user doesn't have
38 secure_action: secure # The credentials required for an action
39
40# module_disabled_module: default # To be called when a user requests
41# module_disabled_action: disabled # A module disabled in the module.yml
42#
43# unavailable_module: default # To be called when a user requests a page
44# unavailable_action: unavailable # From an application disabled via the available setting below
45#
46 .settings:
47# available: on # Enable the whole application. Switch to off to redirect all requests to the unavailable module and action.
48#
49# # Optional features. Deactivating unused features boots performance a bit.
50# use_database: on # Enable database manager. Set to off if you don't use a database.
51# use_security: on # Enable security features (login and credentials). Set to off for public applications.
52# use_flash: on # Enable flash parameter feature. Set to off if you never use the set_flash() method in actions.
53# i18n: off # Enable interface translation. Set to off if your application should not be translated.
54# check_symfony_version: off # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade.
55# use_process_cache: on # Enable symfony optimizations based on PHP accelerators. Set to off for tests or when you have enabled a PHP accelerator in your server but don't want symfony to use it internally.
56# compressed: off # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler.
57# check_lock: off # Enable the application lock system triggered by the clear-cache task. Set to on to have all requests redirected to the $sf_symfony_data_dir/web/arrors/unavailable.php page during the clear-cache process.
58#
59# # Output escaping settings
60# escaping_strategy: bc # Determines how variables are made available to templates. Accepted values: bc, both, on, off. The value off deactivates escaping completely and gives a slight boost.
61# escaping_method: ESC_ENTITIES # Function or helper used for escaping. Accepted values: ESC_RAW, ESC_ENTITIES, ESC_JS, ESC_JS_NO_ENTITIES.
62#
63# # Routing settings
64# relative_url_root: # Default URL prefix. Use this when your symfony project is installed in a sub directory of the apache document root.
65# suffix: . # Default suffix for generated URLs. If set to a single dot (.), no suffix is added. Possible values: .html, .php, and so on.
66# no_script_name: off # Enable the front controller name in generated URLs
67#
68# # Validation settings, used for error generation by the Validation helper
69 validation_error_prefix: ''
70 validation_error_suffix: ''
71 validation_error_class: error
72 validation_error_id_prefix: error_for_
73#
74# # Cache settings
75# cache: off # Enable the template cache
76# etag: on # Enable etag handling
77#
78# # Logging and debugging settings
79# web_debug: off # Enable the web debug toolbar
80# error_reporting: 341 # Determines which events are logged. The default value is E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR = 341
81#
82# # Assets paths
83# rich_text_js_dir: js/tiny_mce
84# prototype_web_dir: /sf/prototype
85# admin_web_dir: /sf/sf_admin
86# web_debug_web_dir: /sf/sf_web_debug
87#
88# # Helpers included in all templates by default
89 standard_helpers: [Partial, Cache, Form, Validation]
90#
91# # Activated modules from plugins or from the symfony core
92# enabled_modules: [default]
93#
94# # Charset used for the response
95# charset: utf-8
96#
97# # Miscellaneous
98# strip_comments: on # Remove comments in core framework classes as defined in the core_compile.yml
99# autoloading_functions: ~ # Functions called when a class is requested and this it is not already loaded. Expects an array of callables. Used by the framework bridges.
100# timeout: 1800 # Session timeout, in seconds
101# max_forwards: 5
102# path_info_array: SERVER
103# path_info_key: PATH_INFO
104# url_format: PATH
105#
106# # ORM
107# orm: propel
diff --git a/exchange/apps/exchange/config/view.yml b/exchange/apps/exchange/config/view.yml
new file mode 100644
index 0000000..26b804c
--- /dev/null
+++ b/exchange/apps/exchange/config/view.yml
@@ -0,0 +1,17 @@
1default:
2 http_metas:
3 content-type: text/html
4
5 metas:
6 title: Exchange
7 robots: index, follow
8 description: exchange is a place to share themes, applications and modules for the enlightenment shell
9 keywords: enlightenment, exchange, wallpaper, background, theme, application, efl, module, emodules, e_modules
10 language: en
11
12 stylesheets: [main, ReMooz, ratings]
13
14 javascripts: [mootools, mootools-more, ReMooz, ratings, script]
15
16 has_layout: on
17 layout: layout
diff --git a/exchange/apps/exchange/lib/Thumbnail.class.php b/exchange/apps/exchange/lib/Thumbnail.class.php
new file mode 100644
index 0000000..f97c158
--- /dev/null
+++ b/exchange/apps/exchange/lib/Thumbnail.class.php
@@ -0,0 +1,660 @@
1<?php
2/**
3 * thumbnail.class.php
4 *
5 * @author Ian Selby (ian@gen-x-design.com)
6 * @copyright Copyright 2006
7 * @version 1.1 (PHP5)
8 *
9 */
10
11/**
12 * PHP class for dynamically resizing, cropping, and rotating images for thumbnail purposes and either displaying them on-the-fly or saving them.
13 *
14 */
15class Thumbnail {
16 /**
17 * Error message to display, if any
18 *
19 * @var string
20 */
21 private $errmsg;
22 /**
23 * Whether or not there is an error
24 *
25 * @var boolean
26 */
27 private $error;
28 /**
29 * Format of the image file
30 *
31 * @var string
32 */
33 private $format;
34 /**
35 * File name and path of the image file
36 *
37 * @var string
38 */
39 private $fileName;
40 /**
41 * Image meta data if any is available (jpeg/tiff) via the exif library
42 *
43 * @var array
44 */
45 public $imageMeta;
46 /**
47 * Current dimensions of working image
48 *
49 * @var array
50 */
51 private $currentDimensions;
52 /**
53 * New dimensions of working image
54 *
55 * @var array
56 */
57 private $newDimensions;
58 /**
59 * Image resource for newly manipulated image
60 *
61 * @var resource
62 */
63 private $newImage;
64 /**
65 * Image resource for image before previous manipulation
66 *
67 * @var resource
68 */
69 private $oldImage;
70 /**
71 * Image resource for image being currently manipulated
72 *
73 * @var resource
74 */
75 private $workingImage;
76 /**
77 * Percentage to resize image by
78 *
79 * @var int
80 */
81 private $percent;
82 /**
83 * Maximum width of image during resize
84 *
85 * @var int
86 */
87 private $maxWidth;
88 /**
89 * Maximum height of image during resize
90 *
91 * @var int
92 */
93 private $maxHeight;
94
95 /**
96 * Class constructor
97 *
98 * @param string $fileName
99 * @return Thumbnail
100 */
101 public function __construct($fileName) {
102 //make sure the GD library is installed
103 if(!function_exists("gd_info")) {
104 echo 'You do not have the GD Library installed. This class requires the GD library to function properly.' . "\n";
105 echo 'visit http://us2.php.net/manual/en/ref.image.php for more information';
106 exit;
107 }
108 //initialize variables
109 $this->errmsg = '';
110 $this->error = false;
111 $this->currentDimensions = array();
112 $this->newDimensions = array();
113 $this->fileName = $fileName;
114 $this->imageMeta = array();
115 $this->percent = 100;
116 $this->maxWidth = 0;
117 $this->maxHeight = 0;
118
119 //check to see if file exists
120 if(!file_exists($this->fileName)) {
121 $this->errmsg = 'File not found';
122 $this->error = true;
123 }
124 //check to see if file is readable
125 elseif(!is_readable($this->fileName)) {
126 $this->errmsg = 'File is not readable';
127 $this->error = true;
128 }
129
130 //if there are no errors, determine the file format
131 if($this->error == false) {
132 //check if gif
133 if(stristr(strtolower($this->fileName),'.gif')) $this->format = 'GIF';
134 //check if jpg
135 elseif(stristr(strtolower($this->fileName),'.jpg') || stristr(strtolower($this->fileName),'.jpeg')) $this->format = 'JPG';
136 //check if png
137 elseif(stristr(strtolower($this->fileName),'.png')) $this->format = 'PNG';
138 //unknown file format
139 else {
140 $this->errmsg = 'Unknown file format';
141 $this->error = true;
142 }
143 }
144
145 //initialize resources if no errors
146 if($this->error == false) {
147 switch($this->format) {
148 case 'GIF':
149 $this->oldImage = ImageCreateFromGif($this->fileName);
150 break;
151 case 'JPG':
152 $this->oldImage = ImageCreateFromJpeg($this->fileName);
153 break;
154 case 'PNG':
155 $this->oldImage = ImageCreateFromPng($this->fileName);
156 break;
157 }
158
159 $size = GetImageSize($this->fileName);
160 $this->currentDimensions = array('width'=>$size[0],'height'=>$size[1]);
161 $this->newImage = $this->oldImage;
162 $this->gatherImageMeta();
163 }
164
165 if($this->error == true) {
166 $this->showErrorImage();
167 break;
168 }
169 }
170
171 /**
172 * Class destructor
173 *
174 */
175 public function __destruct() {
176 if(is_resource($this->newImage)) @ImageDestroy($this->newImage);
177 if(is_resource($this->oldImage)) @ImageDestroy($this->oldImage);
178 if(is_resource($this->workingImage)) @ImageDestroy($this->workingImage);
179 }
180
181 /**
182 * Returns the current width of the image
183 *
184 * @return int
185 */
186 public function getCurrentWidth() {
187 return $this->currentDimensions['width'];
188 }
189
190 /**
191 * Returns the current height of the image
192 *
193 * @return int
194 */
195 public function getCurrentHeight() {
196 return $this->currentDimensions['height'];
197 }
198
199 /**
200 * Calculates new image width
201 *
202 * @param int $width
203 * @param int $height
204 * @return array
205 */
206 private function calcWidth($width,$height) {
207 $newWp = (100 * $this->maxWidth) / $width;
208 $newHeight = ($height * $newWp) / 100;
209 return array('newWidth'=>intval($this->maxWidth),'newHeight'=>intval($newHeight));
210 }
211
212 /**
213 * Calculates new image height
214 *
215 * @param int $width
216 * @param int $height
217 * @return array
218 */
219 private function calcHeight($width,$height) {
220 $newHp = (100 * $this->maxHeight) / $height;
221 $newWidth = ($width * $newHp) / 100;
222 return array('newWidth'=>intval($newWidth),'newHeight'=>intval($this->maxHeight));
223 }
224
225 /**
226 * Calculates new image size based on percentage
227 *
228 * @param int $width
229 * @param int $height
230 * @return array
231 */
232 private function calcPercent($width,$height) {
233 $newWidth = ($width * $this->percent) / 100;
234 $newHeight = ($height * $this->percent) / 100;
235 return array('newWidth'=>intval($newWidth),'newHeight'=>intval($newHeight));
236 }
237
238 /**
239 * Calculates new image size based on width and height, while constraining to maxWidth and maxHeight
240 *
241 * @param int $width
242 * @param int $height
243 */
244 private function calcImageSize($width,$height) {
245 $newSize = array('newWidth'=>$width,'newHeight'=>$height);
246
247 if($this->maxWidth > 0) {
248
249 $newSize = $this->calcWidth($width,$height);
250
251 if($this->maxHeight > 0 && $newSize['newHeight'] > $this->maxHeight) {
252 $newSize = $this->calcHeight($newSize['newWidth'],$newSize['newHeight']);
253 }
254
255 //$this->newDimensions = $newSize;
256 }
257
258 if($this->maxHeight > 0) {
259 $newSize = $this->calcHeight($width,$height);
260
261 if($this->maxWidth > 0 && $newSize['newWidth'] > $this->maxWidth) {
262 $newSize = $this->calcWidth($newSize['newWidth'],$newSize['newHeight']);
263 }
264
265 //$this->newDimensions = $newSize;
266 }
267
268 $this->newDimensions = $newSize;
269 }
270
271 /**
272 * Calculates new image size based percentage
273 *
274 * @param int $width
275 * @param int $height
276 */
277 private function calcImageSizePercent($width,$height) {
278 if($this->percent > 0) {
279 $this->newDimensions = $this->calcPercent($width,$height);
280 }
281 }
282
283 /**
284 * Displays error image
285 *
286 */
287 private function showErrorImage() {
288 echo 'Error:'.$this->errmsg;
289 }
290
291 /**
292 * Resizes image to maxWidth x maxHeight
293 *
294 * @param int $maxWidth
295 * @param int $maxHeight
296 */
297 public function resize($maxWidth = 0, $maxHeight = 0) {
298 $this->maxWidth = $maxWidth;
299 $this->maxHeight = $maxHeight;
300
301 $this->calcImageSize($this->currentDimensions['width'],$this->currentDimensions['height']);
302
303 if(function_exists("ImageCreateTrueColor")) {
304 $this->workingImage = ImageCreateTrueColor($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
305 }
306 else {
307 $this->workingImage = ImageCreate($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
308 }
309
310 ImageCopyResampled(
311 $this->workingImage,
312 $this->oldImage,
313 0,
314 0,
315 0,
316 0,
317 $this->newDimensions['newWidth'],
318 $this->newDimensions['newHeight'],
319 $this->currentDimensions['width'],
320 $this->currentDimensions['height']
321 );
322
323 $this->oldImage = $this->workingImage;
324 $this->newImage = $this->workingImage;
325 $this->currentDimensions['width'] = $this->newDimensions['newWidth'];
326 $this->currentDimensions['height'] = $this->newDimensions['newHeight'];
327 }
328
329 /**
330 * Resizes the image by $percent percent
331 *
332 * @param int $percent
333 */
334 public function resizePercent($percent = 0) {
335 $this->percent = $percent;
336
337 $this->calcImageSizePercent($this->currentDimensions['width'],$this->currentDimensions['height']);
338
339 if(function_exists("ImageCreateTrueColor")) {
340 $this->workingImage = ImageCreateTrueColor($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
341 }
342 else {
343 $this->workingImage = ImageCreate($this->newDimensions['newWidth'],$this->newDimensions['newHeight']);
344 }
345
346 ImageCopyResampled(
347 $this->workingImage,
348 $this->oldImage,
349 0,
350 0,
351 0,
352 0,
353 $this->newDimensions['newWidth'],
354 $this->newDimensions['newHeight'],
355 $this->currentDimensions['width'],
356 $this->currentDimensions['height']
357 );
358
359 $this->oldImage = $this->workingImage;
360 $this->newImage = $this->workingImage;
361 $this->currentDimensions['width'] = $this->newDimensions['newWidth'];
362 $this->currentDimensions['height'] = $this->newDimensions['newHeight'];
363 }
364
365 /**
366 * Crops the image from calculated center in a square of $cropSize pixels
367 *
368 * @param int $cropSize
369 */
370 public function cropFromCenter($cropSize) {
371 if($cropSize > $this->currentDimensions['width']) $cropSize = $this->currentDimensions['width'];
372 if($cropSize > $this->currentDimensions['height']) $cropSize = $this->currentDimensions['height'];
373
374 $cropX = intval(($this->currentDimensions['width'] - $cropSize) / 2);
375 $cropY = intval(($this->currentDimensions['height'] - $cropSize) / 2);
376
377 if(function_exists("ImageCreateTrueColor")) {
378 $this->workingImage = ImageCreateTrueColor($cropSize,$cropSize);
379 }
380 else {
381 $this->workingImage = ImageCreate($cropSize,$cropSize);
382 }
383
384 imagecopyresampled(
385 $this->workingImage,
386 $this->oldImage,
387 0,
388 0,
389 $cropX,
390 $cropY,
391 $cropSize,
392 $cropSize,
393 $cropSize,
394 $cropSize
395 );
396
397 $this->oldImage = $this->workingImage;
398 $this->newImage = $this->workingImage;
399 $this->currentDimensions['width'] = $cropSize;
400 $this->currentDimensions['height'] = $cropSize;
401 }
402
403 /**
404 * Advanced cropping function that crops an image using $startX and $startY as the upper-left hand corner.
405 *
406 * @param int $startX
407 * @param int $startY
408 * @param int $width
409 * @param int $height
410 */
411 public function crop($startX,$startY,$width,$height) {
412 //make sure the cropped area is not greater than the size of the image
413 if($width > $this->currentDimensions['width']) $width = $this->currentDimensions['width'];
414 if($height > $this->currentDimensions['height']) $height = $this->currentDimensions['height'];
415 //make sure not starting outside the image
416 if(($startX + $width) > $this->currentDimensions['width']) $startX = ($this->currentDimensions['width'] - $width);
417 if(($startY + $height) > $this->currentDimensions['height']) $startY = ($this->currentDimensions['height'] - $height);
418 if($startX < 0) $startX = 0;
419 if($startY < 0) $startY = 0;
420
421 if(function_exists("ImageCreateTrueColor")) {
422 $this->workingImage = ImageCreateTrueColor($width,$height);
423 }
424 else {
425 $this->workingImage = ImageCreate($width,$height);
426 }
427
428 imagecopyresampled(
429 $this->workingImage,
430 $this->oldImage,
431 0,
432 0,
433 $startX,
434 $startY,
435 $width,
436 $height,
437 $width,
438 $height
439 );
440
441 $this->oldImage = $this->workingImage;
442 $this->newImage = $this->workingImage;
443 $this->currentDimensions['width'] = $width;
444 $this->currentDimensions['height'] = $height;
445 }
446
447 /**
448 * Outputs the image to the screen, or saves to $name if supplied. Quality of JPEG images can be controlled with the $quality variable
449 *
450 * @param int $quality
451 * @param string $name
452 */
453 public function show($quality=100,$name = '',$format='PNG') {
454 switch($format) {
455 case 'GIF':
456 if($name != '') {
457 ImageGif($this->newImage,$name);
458 }
459 else {
460 header('Content-type: image/gif');
461 ImageGif($this->newImage);
462 }
463 break;
464 case 'JPG':
465 if($name != '') {
466 ImageJpeg($this->newImage,$name,$quality);
467 }
468 else {
469 header('Content-type: image/jpeg');
470 ImageJpeg($this->newImage,'',$quality);
471 }
472 break;
473 case 'PNG':
474 if($name != '') {
475 ImagePng($this->newImage,$name);
476 }
477 else {
478 header('Content-type: image/png');
479 ImagePng($this->newImage);
480 }
481 break;
482 }
483 }
484
485 /**
486 * Saves image as $name (can include file path), with quality of # percent if file is a jpeg
487 *
488 * @param string $name
489 * @param int $quality
490 */
491 public function save($name,$quality=100) {
492 $this->show($quality,$name);
493 }
494
495 /**
496 * Creates Apple-style reflection under image, optionally adding a border to main image
497 *
498 * @param int $percent
499 * @param int $reflection
500 * @param int $white
501 * @param bool $border
502 * @param string $borderColor
503 */
504 public function createReflection($percent,$reflection,$white,$border = true,$borderColor = '#a4a4a4') {
505 $width = $this->currentDimensions['width'];
506 $height = $this->currentDimensions['height'];
507
508 $reflectionHeight = intval($height * ($reflection / 100));
509 $newHeight = $height + $reflectionHeight;
510 $reflectedPart = $height * ($percent / 100);
511
512 $this->workingImage = ImageCreateTrueColor($width,$newHeight);
513
514 ImageAlphaBlending($this->workingImage,true);
515
516 $colorToPaint = ImageColorAllocateAlpha($this->workingImage,255,255,255,0);
517 ImageFilledRectangle($this->workingImage,0,0,$width,$newHeight,$colorToPaint);
518
519 imagecopyresampled(
520 $this->workingImage,
521 $this->newImage,
522 0,
523 0,
524 0,
525 $reflectedPart,
526 $width,
527 $reflectionHeight,
528 $width,
529 ($height - $reflectedPart));
530 $this->imageFlipVertical();
531
532 imagecopy($this->workingImage,$this->newImage,0,0,0,0,$width,$height);
533
534 imagealphablending($this->workingImage,true);
535
536 for($i=0;$i<$reflectionHeight;$i++) {
537 $colorToPaint = imagecolorallocatealpha($this->workingImage,255,255,255,($i/$reflectionHeight*-1+1)*$white);
538 imagefilledrectangle($this->workingImage,0,$height+$i,$width,$height+$i,$colorToPaint);
539 }
540
541 if($border == true) {
542 $rgb = $this->hex2rgb($borderColor,false);
543 $colorToPaint = imagecolorallocate($this->workingImage,$rgb[0],$rgb[1],$rgb[2]);
544 imageline($this->workingImage,0,0,$width,0,$colorToPaint); //top line
545 imageline($this->workingImage,0,$height,$width,$height,$colorToPaint); //bottom line
546 imageline($this->workingImage,0,0,0,$height,$colorToPaint); //left line
547 imageline($this->workingImage,$width-1,0,$width-1,$height,$colorToPaint); //right line
548 }
549
550 $this->oldImage = $this->workingImage;
551 $this->newImage = $this->workingImage;
552 $this->currentDimensions['width'] = $width;
553 $this->currentDimensions['height'] = $newHeight;
554 }
555
556 /**
557 * Inverts working image, used by reflection function
558 *
559 */
560 private function imageFlipVertical() {
561 $x_i = imagesx($this->workingImage);
562 $y_i = imagesy($this->workingImage);
563
564 for($x = 0; $x < $x_i; $x++) {
565 for($y = 0; $y < $y_i; $y++) {
566 imagecopy($this->workingImage,$this->workingImage,$x,$y_i - $y - 1, $x, $y, 1, 1);
567 }
568 }
569 }
570
571 /**
572 * Converts hexidecimal color value to rgb values and returns as array/string
573 *
574 * @param string $hex
575 * @param bool $asString
576 * @return array|string
577 */
578 private function hex2rgb($hex, $asString = false) {
579 // strip off any leading #
580 if (0 === strpos($hex, '#')) {
581 $hex = substr($hex, 1);
582 } else if (0 === strpos($hex, '&H')) {
583 $hex = substr($hex, 2);
584 }
585
586 // break into hex 3-tuple
587 $cutpoint = ceil(strlen($hex) / 2)-1;
588 $rgb = explode(':', wordwrap($hex, $cutpoint, ':', $cutpoint), 3);
589
590 // convert each tuple to decimal
591 $rgb[0] = (isset($rgb[0]) ? hexdec($rgb[0]) : 0);
592 $rgb[1] = (isset($rgb[1]) ? hexdec($rgb[1]) : 0);
593 $rgb[2] = (isset($rgb[2]) ? hexdec($rgb[2]) : 0);
594
595 return ($asString ? "{$rgb[0]} {$rgb[1]} {$rgb[2]}" : $rgb);
596 }
597
598 /**
599 * Reads selected exif meta data from jpg images and populates $this->imageMeta with appropriate values if found
600 *
601 */
602 private function gatherImageMeta() {
603 //only attempt to retrieve info if exif exists
604 if(function_exists("exif_read_data") && $this->format == 'JPG') {
605 $imageData = exif_read_data($this->fileName);
606 if(isset($imageData['Make']))
607 $this->imageMeta['make'] = ucwords(strtolower($imageData['Make']));
608 if(isset($imageData['Model']))
609 $this->imageMeta['model'] = $imageData['Model'];
610 if(isset($imageData['COMPUTED']['ApertureFNumber'])) {
611 $this->imageMeta['aperture'] = $imageData['COMPUTED']['ApertureFNumber'];
612 $this->imageMeta['aperture'] = str_replace('/','',$this->imageMeta['aperture']);
613 }
614 if(isset($imageData['ExposureTime'])) {
615 $exposure = explode('/',$imageData['ExposureTime']);
616 $exposure = round($exposure[1]/$exposure[0],-1);
617 $this->imageMeta['exposure'] = '1/' . $exposure . ' second';
618 }
619 if(isset($imageData['Flash'])) {
620 if($imageData['Flash'] > 0) {
621 $this->imageMeta['flash'] = 'Yes';
622 }
623 else {
624 $this->imageMeta['flash'] = 'No';
625 }
626 }
627 if(isset($imageData['FocalLength'])) {
628 $focus = explode('/',$imageData['FocalLength']);
629 $this->imageMeta['focalLength'] = round($focus[0]/$focus[1],2) . ' mm';
630 }
631 if(isset($imageData['DateTime'])) {
632 $date = $imageData['DateTime'];
633 $date = explode(' ',$date);
634 $date = str_replace(':','-',$date[0]) . ' ' . $date[1];
635 $this->imageMeta['dateTaken'] = date('m/d/Y g:i A',strtotime($date));
636 }
637 }
638 }
639
640 /**
641 * Rotates image either 90 degrees clockwise or counter-clockwise
642 *
643 * @param string $direction
644 */
645 public function rotateImage($direction = 'CW') {
646 if($direction == 'CW') {
647 $this->workingImage = imagerotate($this->workingImage,-90,0);
648 }
649 else {
650 $this->workingImage = imagerotate($this->workingImage,90,0);
651 }
652 $newWidth = $this->currentDimensions['height'];
653 $newHeight = $this->currentDimensions['width'];
654 $this->oldImage = $this->workingImage;
655 $this->newImage = $this->workingImage;
656 $this->currentDimensions['width'] = $newWidth;
657 $this->currentDimensions['height'] = $newHeight;
658 }
659}
660?> \ No newline at end of file
diff --git a/exchange/apps/exchange/lib/Tools.class.php b/exchange/apps/exchange/lib/Tools.class.php
new file mode 100644
index 0000000..0c0bf09
--- /dev/null
+++ b/exchange/apps/exchange/lib/Tools.class.php
@@ -0,0 +1,10 @@
1<?php
2
3class Tools {
4
5 public static function get($key)
6 {
7 return sfConfig::get('app_'.$key);
8 }
9}
10?> \ No newline at end of file
diff --git a/exchange/apps/exchange/lib/WikiText.class.php b/exchange/apps/exchange/lib/WikiText.class.php
new file mode 100644
index 0000000..726b442
--- /dev/null
+++ b/exchange/apps/exchange/lib/WikiText.class.php
@@ -0,0 +1,864 @@
1<?php
2/*
3Plugin Name: MediaWiki Markup for WordPress
4Plugin URI: http://zechs.dyndns.org/wordpress/?page_id=126
5Description: Add a subset of MediaWiki markups to WordPress
6Version: 0.0.8
7Author: Ming-Hsien Tsai
8Author URI: http://zechs.dyndns.org/wordpress/
9*/
10
11/* Copyright 2006 Ming-Hsien Tsai (email : mhtsai208@gmail.com)
12
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26*/
27
28class WikiText {
29
30 const LIST_TYPE_OL = "#";
31 const LIST_TYPE_UL = "*";
32 const LIST_TYPE_INDENT = ":";
33 const LIST_TYPE_DEFINITION = ";";
34
35 private $headings = array(); // all headings in the post
36 private $id_suffix = array(); // the suffix to be appended after IDs of duplicate headings
37 private static $option_names = array( // option names
38 'wpwiki_wiki_site',
39 'wpwiki_error_page',
40 'wpwiki_add_prefix_for_id',
41 'wpwiki_toc_mode',
42 'wpwiki_toc_title',
43 'wpwiki_url_backward',
44 'wpwiki_hr_tag',
45 'wpwiki_disable_preformatted',
46 'wpwiki_disable_horizontal',
47 'wpwiki_disable_headings',
48 'wpwiki_disable_lists',
49 'wpwiki_disable_tables',
50 'wpwiki_disable_external_links',
51 'wpwiki_disable_wikilinks',
52 'wpwiki_disable_emphasis'
53 );
54 private $options = array(); // options
55 private $auto_number = 0; // the counter used in anonymous external links
56 private $table_level = 0;
57 private $pagenum = 1; // the page number of a multipaged post
58 private $list_stack = array();
59 private $rmap = array();
60 private $rules = array();
61 private $regex = array ( // the regular expressions of all rules
62 'encode' => array ('/.*/sm', 'encode'),
63 'horizontal' => array ('/^----$/m', 'horizontal_callback'),
64 'headings' => array ('/^(={1,6})(.*?)\1(?:\s|$)$/m', 'heading_callback'),
65 'lists' => array ('/\n((?:\*|#|\;|\:)+.*?\n(?!(?:\*|#|\;|\:)+))/s', 'list_callback'),
66 'preformatted' => array ('/((\n .*)+)/', 'preformatted_callback'),
67 'tables' => array ('#^\{\|(.*?)(?:^\|\+(.*?))?(^(?:((?R))|.)*?)^\|}#msi', 'table_callback'),
68 'external_links' => array ("/(\[)?((http\:\/\/|https\:\/\/|ftp\:\/\/|gopher\:\/\/|news\:\/\/)[\w|\d|\.|_|\-]+[A-Za-z0-9\/?=&%~_\-\.\:#;',]*)(?(1)([ ]+[^\]]+)?\])/i", 'url_callback'),
69 'email' => array ('/(\[)?mailto:([\w|\d|\.|_|\-]+@[\w|\d|\.|_|-]+)(?(1)\])/i', 'email_callback'),
70 'cvs' => array ('/(\[)?cvs:([^\||^\]|^\[]+)(?(1)\])/i', 'cvs_callback'),
71 'theme' => array ('/(\[)?theme:([^\]|^\[]+)(?(1)\])/i', 'theme_callback'),
72 'module' => array ('/(\[)?module:([^\]|^\[]+)(?(1)\])/i', 'module_callback'),
73 'app' => array ('/(\[)?app:([^\]|^\[]+)(?(1)\])/i', 'app_callback'),
74// 'wikilinks' => array ('/\[{2}([^\||^\]|^\[]+)(?:\|([^\||^\[|^\]]+))?\]{2}/', 'wikilink_callback'),
75 'emphasis' => array ("/(?<!')'('{1,4})(.*?)\\1'(?!')/", 'emphasis_callback'),
76// 'paragraph' => array ("/^(.*)\n\n+/Ums", 'paragraph_callback'),
77 'decode' => array ('/.*/sm', 'decode'),
78 'newline' => array ('/(\r\n|\r)/', 'newline_callback'),
79 'raw' => array ('/<pre>(.*)<\/pre>/Ums', 'raw_callback'),
80 'nowiki' => array ('/<nowiki>|<\/nowiki>/i', 'nowiki_callback'),
81 );
82
83 /**
84 * The constructor
85 */
86 public function WikiText() {
87
88 // update options
89 if (empty($this->options['wpwiki_toc_title']))
90 $this->options['wpwiki_toc_title'] = 'Table of Content';
91
92 $this->options['wpwiki_toc_mode'] = 'single';
93 $this->options['wpwiki_url_backward'] = true;
94 $this->options['wpwiki_hr_tag'] = '<hr/>';
95 // update rules
96 foreach (array_keys($this->regex) as $rule)
97 $this->rules[] = $rule;
98
99 // calculate rmap
100 $this->rmap = array (
101 '[' => md5('['), ']' => md5(']'),
102 '<' => md5('<'), '>' => md5('>'),
103 ':' => md5(':'), '/' => md5('/'),
104 '=' => md5('='), '*' => md5('*'),
105 '#' => md5('#'), ';' => md5(';'),
106 "'" => md5("'"), '|' => md5('|'),
107 '!' => md5('!'), '-' => md5('-'),
108 "\n" => md5("\n"), ' ' => md5(' ')
109 );
110 }
111
112 /**
113 * Remove the leading space in the url generated by <!--more-->
114 */
115 private function fix($text) {
116 global $id;
117
118 $more = '<a href="#more-'.$id.'"';
119 return str_replace(" $more", $more, $text);
120 }
121
122 /**
123 * Translate MediaWiki markups
124 */
125 public function transform($text) {
126 global $comment, $page, $pages, $multipage;
127
128 $ret = $this->fix($text);
129
130 // process rules
131
132 foreach ($this->rules as $rule) {
133 $pattern = $this->regex[$rule][0];
134 $callback = $this->regex[$rule][1];
135 $ret = preg_replace_callback($pattern, array($this, $callback), $ret);
136 }
137
138 // gather all headings in multipaged posts
139 if (in_array('headings', $this->rules) && $multipage) {
140 $this->headings = array();
141 foreach ($pages as $p) {
142 $this->id_suffix = array();
143 preg_replace_callback($this->regex['headings'][0], array ($this, $this->regex['headings'][1]), $this->encode(array($p)));
144 $this->pagenum++;
145 }
146 }
147
148 // display toc in a single post or page
149 if (empty($comment)) {
150 if ($this->options['wpwiki_toc_mode'] == 'single' && $page == 1)
151 $ret = $this->generate_toc().$ret;
152 else if ($this->options['wpwiki_toc_mode'] == 'tag')
153 $ret = preg_replace('/<!--toc-->/Umsi', $this->generate_toc(), $ret);
154 }
155
156 return $ret;
157 }
158
159 /**
160 * Get option names
161 */
162 public static function get_option_names() {
163 return self::$option_names;
164 }
165
166 /**
167 * Remove the leading char of a string
168 */
169 private function remove_leading_char($str) {
170 return substr($str, 1);
171 }
172
173 /**
174 * Generate table of content
175 */
176 private function generate_toc() {
177
178 if (empty($this->headings))
179 return;
180
181 $ret = "<div>
182 <table id='_toc' class='toc' summary='toc'>
183 <tr><td id='_tochead'><span id='_toctitle'>".$this->options['wpwiki_toc_title']."</span> [<a href='javascript:toggle_toc()'><span id='_toctoggle'>Hide</span></a>]</td></tr>
184 <tr><td><div id='_toclist' class='toclist'>";
185
186 $min = $this->headings[0]['level'];
187 $level = array();
188 $prev = 0;
189 foreach ($this->headings as $k => $h) {
190 $depth = $h['level'] - $min + 1;
191 $depth = $depth < 1 ? 1 : $depth;
192
193 if ($depth > $prev) { // add one level
194 $toclevel = count($level) + 1;
195 $ret .= "<ul>\n<li class='toclevel-$toclevel'>";
196 $open = true;
197 array_push($level, 1);
198 }
199 else if ($depth == $prev || $depth >= count($level)) { // no change
200 $toclevel = count($level);
201 $ret .= "</li>\n<li class='toclevel-$toclevel'>";
202 $level[count($level) - 1] = ++$level[count($level) - 1];
203 }
204 else {
205 $toclevel = $depth;
206 while(count($level) > $depth) {
207 $ret .= "</li>\n</ul>";
208 array_pop($level);
209 }
210 $level[count($level) - 1] = ++$level[count($level) - 1];
211 $ret .= "</li>\n<li class='toclevel-$toclevel'>";
212 }
213 $prev = $depth;
214
215 $ret .= "<a href='".$h['link']."'><span class='tocnumber'>".implode('.', $level)."</span> <span class='toctext'>".$h['text']."</span></a>";
216 }
217
218 // close left
219 while(count($level) > 0) {
220 $ret .= "</li></ul>";
221 array_pop($level);
222 }
223 $ret .= "</div></td></tr></table></div>\n";
224
225 return $ret;
226 }
227
228 /**
229 * Convert illegal chars in an ID
230 */
231 private function sanitize_id($id) {
232 $ret = str_replace(' ', '_', $id);
233 $ret = str_replace('%', '.', rawurlencode($ret));
234 $ret = $this->options['wpwiki_add_prefix_for_id'] ? '_'.$ret : $ret;
235 return $ret;
236 }
237
238 /**
239 * Get the post object from a post title
240 */
241 private function get_post_from_title($title) {
242 global $wpdb;
243
244 return null;
245 }
246
247 /**
248 * Return the open tag of a list
249 */
250 private function open_list($type) {
251 $ret = "";
252
253 switch ($type) {
254 case self::LIST_TYPE_UL:
255 $ret = "<ul>";
256 break;
257 case self::LIST_TYPE_OL:
258 $ret = "<ol>";
259 break;
260 case self::LIST_TYPE_DEFINITION:
261 case self::LIST_TYPE_INDENT:
262 $ret = "<dl>";
263 break;
264 }
265
266 return $ret;
267 }
268
269 /**
270 * Return the closing tag of a list
271 */
272 private function close_list($type) {
273 $ret = "";
274
275 switch ($type) {
276 case self::LIST_TYPE_UL:
277 $ret = "</ul>";
278 break;
279 case self::LIST_TYPE_OL:
280 $ret = "</ol>";
281 break;
282 case self::LIST_TYPE_DEFINITION:
283 case self::LIST_TYPE_INDENT:
284 $ret = "</dl>";
285 break;
286 }
287 return $ret;
288 }
289
290 /**
291 * Return the open tag for list item
292 */
293 private function open_list_item($type) {
294 $ret = "";
295
296 switch ($type) {
297 case self::LIST_TYPE_UL:
298 case self::LIST_TYPE_OL:
299 $ret = "<li>";
300 break;
301 case self::LIST_TYPE_DEFINITION:
302 $ret = "<dt>";
303 break;
304 case self::LIST_TYPE_INDENT:
305 $ret = "<dd>";
306 break;
307 }
308
309 return $ret;
310 }
311
312 /**
313 * Return the closing tag for list item
314 */
315 private function close_list_item($type) {
316 $ret = "";
317
318 switch ($type) {
319 case self::LIST_TYPE_UL:
320 case self::LIST_TYPE_OL:
321 $ret = "\n</li>";
322 break;
323 case self::LIST_TYPE_DEFINITION:
324 $ret = "\n</dt>";
325 break;
326 case self::LIST_TYPE_INDENT:
327 $ret = "\n</dd>";
328 break;
329 }
330
331 return $ret;
332 }
333
334 /**
335 * Check whether the type of two lists are the same
336 */
337 private function list_type_eq($t1, $t2) {
338 $ret = false;
339 switch ($t1.$t2) {
340 case self::LIST_TYPE_UL.self::LIST_TYPE_UL:
341 case self::LIST_TYPE_OL.self::LIST_TYPE_OL:
342 case self::LIST_TYPE_DEFINITION.self::LIST_TYPE_DEFINITION:
343 case self::LIST_TYPE_DEFINITION.self::LIST_TYPE_INDENT:
344 case self::LIST_TYPE_INDENT.self::LIST_TYPE_INDENT:
345 case self::LIST_TYPE_INDENT.self::LIST_TYPE_DEFINITION:
346 $ret = true;
347 break;
348 }
349 return $ret;
350 }
351
352 /**
353 * Encode special chars in <pre>, <nowiki>, <a> and <img>
354 */
355 private function encode($matches) {
356 if ($this->options['wpwiki_url_backward'])
357 $pattern = '/<(pre|nowiki)>.*<\/\1>|<a\s+[^>]*>(.*)<\/a>|<img\s+[^>]*\/>/Ums';
358 else
359 $pattern = '/<(pre|nowiki)>.*<\/\1>/Ums';
360 return preg_replace_callback($pattern, array($this, 'encode_callback'), $matches[0]);
361 }
362
363 /**
364 * Decode special chars in <pre>, <nowiki>, <a> and <img>
365 */
366 private function decode($matches) {
367 $pattern = '/'.md5('[').'(.*)'.md5(']').'/Ums';
368 return preg_replace_callback($pattern, array($this, 'decode_callback'), $matches[0]);
369 }
370
371 /**
372 * The callback function for encode
373 */
374 private function encode_callback($matches) {
375 $ret = str_replace(array('%', '-'), array(md5('%'), md5('-')), $matches[0]);
376 $ret = rawurlencode($ret);
377 $ret = md5('[').$ret.md5(']');
378 if ($matches[1] == 'pre')
379 $ret = "\n".$ret;
380
381 return $ret;
382 }
383
384 /**
385 * The callback function for decode
386 */
387 private function decode_callback($matches) {
388 $ret = rawurldecode($matches[1]);
389 $ret = str_replace(array(md5('%'), md5('-')), array('%', '-'), $ret);
390
391 return $ret;
392 }
393
394 /**
395 * Replace all continuous newlines to one "\n"
396 */
397 private function newline_callback($matches) {
398 return "<br/>";
399 }
400
401 /**
402 * Convert HTML special cahrs in <pre>
403 */
404 function raw_callback($matches) {
405 $text = htmlspecialchars(htmlspecialchars_decode($matches[1]));
406 $ret = "<pre>$text</pre>";
407 return $ret;
408 }
409
410 /**
411 * The callback function for horizontal line
412 */
413 private function horizontal_callback($matches) {
414 $ret = $this->options['wpwiki_hr_tag'];
415 $ret || $ret = '<hr/>';
416 return $ret;
417 }
418
419 /**
420 * The callback function for headings
421 */
422 private function heading_callback($matches) {
423 global $post;
424
425 $level = strlen($matches[1]);
426 $text = trim($matches[2]);
427
428 $ret = "<h{$level}>{$text}</h{$level}>";
429
430 return $ret;
431 }
432
433 /**
434 * The callback function for lists
435 */
436 private function list_callback($matches) {
437 $list = array();
438 $prev = "";
439 $ret = "";
440
441 preg_match_all('/^((\*|#|\;|\:|\^)+)(.*?)$/ms', $matches[1], $list, PREG_SET_ORDER);
442 foreach ($list as $val) {
443 $whole = $val[0];
444 $type = $val[1];
445 $last_type = $val[2];
446 $text = $val[3];
447 if (substr($text, 0, 1) == " ")
448 $text = substr($text, 1);
449
450 $size = strlen($type);
451
452 // same list level
453 if ($type == $prev) {
454 $ret .= $this->close_list_item($last_type).$this->open_list_item($last_type).$text;
455 }
456 // a continuation of previous list item
457 else if ($type == $prev."^") {
458 $ret .= "\n".$text;
459 }
460 else {
461 // different list level
462 $prev_size = strlen($prev);
463 $min_size = min($size, $prev_size);
464
465 // max common prefix
466 $index = 0;
467
468 // close previous non-common suffix
469 while(count($this->list_stack) > $index) {
470 $close_tag = array_pop($this->list_stack);
471 $ret .= $this->close_list_item($close_tag).$this->close_list($close_tag);
472 }
473
474 // open current non-common suffix
475 $open = false;
476 for ($i = $index; $i < $size; $i++) {
477 $open_tag = $type[$i];
478 array_push($this->list_stack, $open_tag);
479 $open = true;
480 $ret .= $this->open_list($open_tag).$this->open_list_item($open_tag);
481 }
482 if (!$open) {
483 $close_tag = $prev[$index - 1];
484 $open_tag = $type[$index - 1];
485 // exchange stack item
486 array_pop($this->list_stack);
487 array_push($this->list_stack, $open_tag);
488 $ret .= $this->close_list_item($close_tag).$this->open_list_item($open_tag);
489 }
490
491 $ret .= $text;
492
493 $prev = $type;
494 }
495 }
496
497 // close remainder
498 while (count($this->list_stack) > 0) {
499 $close_tag = array_pop($this->list_stack);
500 $ret .= $this->close_list_item($close_tag).$this->close_list($close_tag);
501 }
502
503 return "\n".$ret."\n";
504 }
505
506 /**
507 * The callback function for tables
508 */
509 private function table_callback($matches) {
510 $whole = $matches[0];
511 $attrs = trim($matches[1]);
512 $rows = $matches[3];
513
514 if (array_key_exists(4, $matches)) {
515 $this->table_level += 3;
516 $rows = preg_replace_callback($this->regex['table'][0], array($this, $this->regex['table'][1]), $rows);
517 $this->table_level -= 3;
518 }
519
520 $rregex = '#(?:^(\||!)-|\G)(.*?)^(.*?)(?=(?:\|-|!-|\z))#msi';
521 $rows = preg_replace_callback($rregex, array($this, 'rows_callback'), $rows);
522
523 $start = $attrs == "" ? "<table>" : "<table {$attrs}>";
524 $end = "</table>";
525
526
527// $ret =
528// str_repeat("\t", $this->table_level).$start."\n".
529// $rows.
530// str_repeat("\t", $this->table_level).$end."\n";
531 $ret = $start."\n".$rows.$end."\n";
532
533 return $ret;
534 }
535
536 /**
537 * The callback function for rows in tables
538 */
539 private function rows_callback($matches) {
540 $whole = $matches[0];
541 $attrs = trim($matches[2]);
542 $cells = $matches[3];
543
544 if ($whole == "")
545 return $whole;
546
547 $cregex = '#((?:\||!|\|\||!!|\G))(?:([^|\n]*?)\|(?!\|))?(.+?)(?=\||!|\|\||!!|\z)#msi';
548 $cells = preg_replace_callback($cregex, array(&$this, 'cells_callback'), $cells);
549
550 $start = $attrs == "" ? "<tr>" : "<tr {$attrs}>";
551 $end = "</tr>";
552
553// $ret =
554// str_repeat("\t", $this->table_level + 1).$start."\n".
555// $cells.
556// str_repeat("\t", $this->table_level + 1).$end."\n";
557 $ret = $start."\n".$cells.$end."\n";
558
559 return $ret;
560 }
561
562 /**
563 * The callback function for cols in rows
564 */
565 private function cells_callback($matches) {
566 $whole = $matches[0];
567 $type = $matches[1];
568 $attrs = trim($matches[2]);
569 $cell = trim($matches[3]);
570
571 if($whole == "")
572 return $whole;
573
574 if ($type == '!') {
575 $start = $attrs == "" ? "<th>" : "<th {$attrs}>";
576 $end = "</th>";
577 }
578 else {
579 $start = $attrs == "" ? "<td>" : "<td {$attrs}>";
580 $end = "</td>";
581 }
582
583// $ret =
584// str_repeat("\t", $this->table_level + 2).$start."\n".
585// str_repeat("\t", $this->table_level + 3).$cell."\n".
586// str_repeat("\t", $this->table_level + 2).$end."\n";
587 $ret = $start."\n".$cell."\n".$end."\n";
588
589 return $ret;
590 }
591
592 /**
593 * The callback function for external links
594 */
595 private function url_callback($matches) {
596 $whole = $matches[0];
597 $explicit = $matches[1]; // a left "["
598 $url = $matches[2]; // url
599 $protocol = $matches[3]; // protocol, eq: http://
600 if (count($matches)>4)
601 $desc = $matches[4]; // url description
602
603 if (!isset($desc)) {
604 if($explicit)
605 $desc = "[".$this->auto_number++."]";
606 else
607 $desc = $url;
608 }
609 $desc = trim($desc);
610 $ret = "<a href=\"{$url}\">{$desc}</a>";
611
612 return $ret;
613 }
614
615
616 /**
617 * The callback function for cvs links
618 */
619 private function cvs_callback($matches) {
620 $whole = $matches[0];
621 $addr = $matches[2];
622 $addr2 = urlencode(str_replace('/', '|', $addr));
623 $ret = "<a href=\"/home/cvs/path/{$addr2}\">CVS: $addr</a>";
624
625 return $ret;
626 }
627
628
629 /**
630 * The callback function for theme links
631 */
632 private function theme_callback($matches) {
633 $whole = $matches[0];
634 $name = $matches[2];
635 $theme = Theme::getByName($name);
636 if ($theme)
637 $ret = "<a href=\"/theme/show/{$theme->getId()}\">Theme: $name</a>";
638 else
639 $ret = $name;
640
641 return $ret;
642 }
643
644
645 /**
646 * The callback function for module links
647 */
648 private function module_callback($matches) {
649 $whole = $matches[0];
650 $name = $matches[2];
651 $module = Madule::getByName($name);
652 if ($module)
653 $ret = "<a href=\"/module/show/{$module->getId()}\">Module: $name</a>";
654 else
655 $ret = $name;
656
657 return $ret;
658 }
659
660
661 /**
662 * The callback function for app links
663 */
664 private function app_callback($matches) {
665 $whole = $matches[0];
666 $name = $matches[2];
667 $app = Application::getByName($name);
668 if ($app)
669 $ret = "<a href=\"/application/show/{$app->getId()}\">Application: $name</a>";
670 else
671 $ret = $name;
672
673 return $ret;
674 }
675
676
677 /**
678 * The callback function for email links
679 */
680 private function email_callback($matches) {
681 $whole = $matches[0];
682 $addr = $matches[2];
683
684 $ret = "<a href=\"mailto:{$addr}\">$addr</a>";
685
686 return $ret;
687 }
688
689 /**
690 * Split anchor into the anchor text and the index of the anchor
691 */
692 private function split_anchor($anchor) {
693 $index = strrpos($anchor, '_');
694
695 // get the anchor text and anchor index
696 if ($index != false && $index < strlen($anchor) && is_numeric(substr($anchor, $index + 1))) {
697 $anchor_txt = substr($anchor, 0, $index);
698 $anchor_num = substr($anchor, $index + 1);
699 }
700 else {
701 $anchor_txt = $anchor;
702 $anchor_num = 1;
703 }
704
705 return array ($anchor_txt, $anchor_num);
706 }
707
708 /**
709 * Append page number and anchor to an url to form a valid url
710 */
711 private function append_pagenum_anchor($url, $pagenum = 0, $anchor = '') {
712 $anchor = $anchor ? '#'.$anchor : $anchor;
713 if ($pagenum > 1)
714 $url .= (strpos($url, '?') ? '&' : '?').'page='.$pagenum;
715 $url .= $anchor;
716 return $url;
717 }
718
719 private function is_toc_id($id) {
720 switch ($id) {
721 case "_toc":
722 case "_tochead":
723 case "_toctoggle":
724 case "_toclist":
725 $ret = true; break;
726 default:
727 $ret = false; break;
728 }
729 return $ret;
730 }
731
732 /**
733 * The callback function for wikilinks
734 */
735 private function wikilink_callback($matches) {
736 global $wpdb, $post, $pages;
737
738 // $link: $title#$anchor
739 // $title: the post title
740 // $anchor: the user defined anchor or some heading
741 // $desc: the displayed text
742 $while = $matches[0];
743 $link = $matches[1];
744 $desc = $matches[2];
745 list($title, $anchor) = split('#', $link);
746
747 // set desc if desc is empty
748 $desc = $desc ? $desc : $link;
749
750 // compute url
751 if ($title && $this->options['wpwiki_wiki_site']) {
752 $url = $this->options['wpwiki_wiki_site'].$title.($anchor ? '#'.$anchor : $anchor);
753 }
754 else {
755 // get the post nad post url
756 if ($title) // link to other post
757 $the_post = $this->get_post_from_title($title);
758 else // link to this post
759 $the_post = $post;
760
761 if ($the_post == null) {
762 $url = $this->options['wpwiki_error_page'];
763 }
764 else {
765 $url = get_permalink($the_post->ID);
766 echo "URL = ".$url;
767 // append anchor to url
768 if ($anchor) {
769 // find anchor from headings
770 $pagenum = 1;
771
772 // determine the pages of the post
773 if ($this->is_toc_id($anchor)) {
774 $url .= '#'.$anchor;
775 }
776 else {
777 $tmp = preg_replace_callback($this->regex['preformatted'][0], array($this, $this->regex['preformatted'][1]), $the_post->post_content);
778 $the_pages = explode('<!--nextpage-->', $this->encode(array($tmp)));
779 list($anchor_txt, $anchor_num) = $this->split_anchor($anchor);
780
781 foreach ($the_pages as $p) {
782 // match headings
783 $index = preg_match_all('/^(={1,6})\s*'.preg_quote($anchor_txt).'\s*\1(?:\s*|$)$/m', $p, $tmp);
784 if ($index >= $anchor_num) {
785 $anchor = $this->sanitize_id($anchor_num > 1 ? $anchor_txt.'_'.$anchor_num : $anchor_txt);
786 break;
787 }
788 else if (preg_match('/id="'.preg_quote($anchor).'"/', $p)) { // match user defined id
789 break;
790 }
791 $anchor_num -= $index;
792 $pagenum++;
793 }
794
795 if ($pagenum <= count($the_pages))
796 $url = $this->append_pagenum_anchor($url, $pagenum, $anchor);
797 }
798 }
799 }
800 }
801
802 $ret = "<a href=\"{$url}\">{$desc}</a>";
803
804 return $ret;
805 }
806
807 /**
808 * The callback function for bold and italic
809 */
810 private function emphasis_callback($matches) {
811 $type = $matches[1];
812 $text = $matches[2];
813
814 switch (strlen($type)) {
815 case 1:
816 $ret = "<em>{$text}</em>";
817 break;
818 case 2:
819 $ret = "<strong>{$text}</strong>";
820 break;
821 case 4:
822 $ret = "<em><strong>{$text}</strong></em>";
823 break;
824 case 3:
825 $delim = "'";
826 $ret = "<strong>{$delim}{$text}{$delim}</strong>";
827 break;
828 }
829
830 return $ret;
831 }
832
833 private function paragraph_callback($matches) {
834 $text = trim($matches[1]);
835
836 if ($text == "")
837 return "";
838
839 // skip <pre></pre>
840
841 $regex = '/'.$this->rmap['<'].'(pre|nowiki)'.$this->rmap['>'].'(.*)'.$this->rmap['<'].$this->rmap['/'].'(\1)'.$this->rmap['>'].'/s';
842 if (preg_match($regex, $text))
843 return "$text\n";
844
845 return "<p>\n$text\n</p>\n";;
846 }
847
848 /**
849 * The callback function for nowiki. Simply return nothing
850 */
851 private function nowiki_callback($matches) {
852 return "";
853 }
854
855 /**
856 * The callback function for preformatted text
857 */
858 private function preformatted_callback($matches) {
859 $ret = explode("\n", $matches[0]);
860 $ret = array_map(array($this, 'remove_leading_char'), $ret);
861 $ret = implode("\n", $ret);
862 return $this->encode(array("\n<pre>$ret\n</pre>"));
863 }
864}
diff --git a/exchange/apps/exchange/lib/exchangeActions.php b/exchange/apps/exchange/lib/exchangeActions.php
new file mode 100644
index 0000000..8287f14
--- /dev/null
+++ b/exchange/apps/exchange/lib/exchangeActions.php
@@ -0,0 +1,38 @@
1<?php
2
3/**
4 * exchangeActions for all the controllers.
5 *
6 * This class extends sfActions and is used by all actions classes
7 */
8class exchangeActions extends sfActions
9{
10 public function redirectRaw($url, $statusCode = 302)
11 {
12 if (sfConfig::get('sf_logging_enabled'))
13 {
14 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Redirect to "%s"', $url))));
15 }
16
17 // redirect
18 $response = $this->context->getResponse();
19 $response->clearHttpHeaders();
20 $response->setStatusCode($statusCode);
21 $response->setHttpHeader('Location', $url);
22 $response->setContent(sprintf('<html><head><meta http-equiv="refresh" content="%d;url=%s"/></head></html>', 0, htmlspecialchars($url, ENT_QUOTES, sfConfig::get('sf_charset'))));
23 $response->send();
24
25 throw new sfStopException();
26 }
27
28 public function forwardUnsecure($message = '')
29 {
30 throw new forwardUnsecureException($message);
31 }
32
33 public function forwardUnsecureUnless($condition, $message = '')
34 {
35 if (!$condition)
36 $this->forwardUnsecure($message);
37 }</