Skip to content

Loading…

D2 workflows #407

Closed
wants to merge 2,573 commits into from

9 participants

@paustian

My attempt at updating workflows to Doctrine 2.

Drak and others added some commits
Drak Merge remote-tracking branch 'origin/release-1.3'
Resolved conflicts with:
	src/util/ModUtil.php
	web/system/Admin/Api/AdminApi.php
	web/system/Search/Controller/UserController.php
4862aa2
Drak First steps to migrating to Zikula CoreBundle. 81cd2fb
Drak Add back admin header/footer API (accidentally removed during last me…
…rge).
2f2323a
Drak Refactor controllers. c2407c9
Drak Added back methods incorrectly marked by netbeans as unused. cd2f650
Drak Remove dependency on FrameworkBundle, for the time being at least. 9649b6e
Drak Fix search replace error. af10f39
Drak Add new services and added installation SQL as the installer is broke…
…n (and going to be replaced).
7f448c8
Drak Notes on installation. dfc4bd0
Drak Add DoctrineBundle. 412ade1
Drak Update config for doctrinebundle 2b40b6c
Drak Switch database initialisation to DoctrineBundle.
Please note the service has changed from $container->get('doctrine.entitymanager')
to $container->get('doctrine')->getEntityManager();

I don't understand why we need to add all these namespaces to the annotations driver
because our own DoctrineListener doesn't need it.  For another day though...
d91507c
Drak Dump the database. 9fa7233
Drak Merge branch 'release-1.3' dbf4626
Drak Fix block scan. Need to strip Block.php from the end of the file name. 4a06d0f
Drak Refactor Admin and Blocks modules entities to namespaces. 576e96f
Drak Removed unused repository classes. b5f3a05
Drak [HookManager] Change API to better match the EventDispatcher 911de99
Drak Harmonise HookManager with EventDispatcher API. c18fe01
Drak Docblock. 26588e4
Drak Merge pull request #302 from matheo/plugin_img
Update the plugin img to support the new core elements
5a00878
@planetenkiller planetenkiller added simple implementation of a module system
Modules == Symfony bundles
Custom kernel loads active modules from DB. This custom kernel add bundles to the bundle list *before* symfony's bundle loading starts.
A custom routing loader automatically add modules routes (controllers of modules have to use annotations).
0c952b3
@planetenkiller planetenkiller stop module loading in command line mode 0421285
@planetenkiller planetenkiller added missing file 78190a9
@planetenkiller planetenkiller improved module system, added themes support bf3c884
@planetenkiller planetenkiller switch to new bundle loading approach
Zikula kernel loads all bundles (modules and themes) every time.
A custom event dispatcher skipps service listeners of inactive modules.
A custom controller resolver skipps controllers of inactive modules.
A container builder sandbox forbidds taggs other than 'kernel.event_listener'.
310aa42
Drak Relocate files f76d379
Drak Apply naming conventions. f22c640
Drak Coding standards.
Removed whitespace
Fixed braces
Fixed line-spacing
Class naming standards
bbcf292
@nmpetkov nmpetkov Function to clears all view cache for a module 3458b32
@nmpetkov nmpetkov Default is changed to 'ON' for view (render) caching. 72c1672
Drak Merge pull request #346 from nmpetkov/Ticket_346
Function to clears all view cache for a module
be62020
Drak Bump version number. b2cdd7e
Drak Force load of tables.php refs #340 a97dfe0
Drak Remove invalid call. 0cc2244
Drak Refactor of modules ad subsystems to PHP 5.3 namespaces. 005e24b
Drak Update SQL for installation during transition period. e13e128
Drak Refactoring for namespaces. 74fc935
Mateo TibaPalacios mo2json not detecting custom catalogs because a path error. Refs ziku… 3893584
Drak Refactoring fixes. cb9c87b
Drak Remove old autoloader calls 31ff12b
Drak Remove composer from repo b5a9f3a
Drak Documentation bd9c51f
Drak Documentation a8dbfa0
Drak Naming conventions and added a static way of determining the
module/theme path.
9222d7c
Drak Fixed namespaces b48fda7
Drak Sync code d365944
Drak Fixes c387c71
Drak Add module and theme bundle stubs 2222155
Drak Revert method name change and added some bundles to the app 6fb75eb
Drak Removed linebreak c078e1c
Drak Merge pull request #296 from matheo/installer_lang
Improved language detection in the installer
3933159
Drak Merge remote-tracking branch 'origin/release-1.3'
Conflicts:
	src/Zikula/Core/Core.php
	src/viewplugins/function.img.php
a3617e8
Drak Shift boot process to DIC. 4346d63
Drak Get request in front controller. f5d1bf2
Drak Activate frameworkbundle and switch away several services to Symfony2. 962d4b9
@craigh craigh update jQuery to 1.7.2. refs #353 1f01ada
Drak Merge remote-tracking branch 'origin/release-1.3' 6c01e6c
Drak Update travis.yml f99c691
Drak Remove tests dir 6467112
Drak Fix build by adding a stub test 9c53424
Drak Update readme cc16390
Drak Replace failed argument checks returning boolean + flash message, wit…
…h exception.

APIs should either return a result or throw an exception.
7f2dc96
Drak Throw exception on forbidden resources. 918a537
Drak Always return responses. 7184c3f
Drak Refactor ajax responses to namespaced classes. eb2bddb
Drak Setup routing to ajax controller resolver. 4a08fcb
@phaidon phaidon A caps lock detector for the user login added, closes #85. 324f176
@craigh craigh correct array key fixes #357 d53fc6d
Drak Merge remote-tracking branch 'origin/release-1.3' ecb6b6e
@phaidon phaidon A caps lock detector for the user login added - type="text/javascript…
…" added, refs #85.
efdbfed
Drak Merge pull request #361 from phaidon/patch-1
A caps lock detector for the user login added, closes #85.
6e39c32
Drak Fix response workflow.
Removed support for boolean controller response, must return a Response object.
Use PlainResponse to override the theme.

Fixed some E_NOTICES in Users while I was at it.
Removed distinction between meta and WCAG redirects, this is nonesense, the right way is to
issue a redirect header with a meta refresh which is done by the RedirectResponse already.
c4290da
Drak Temporary fix.
Waiting on the fixed file being merged upstream.
a273a88
Drak Sync upstream Composer changes.
Please run `php composer.phar self-update` followed by
`php composer.phar update`
f50bb69
Drak Lots of Zikula-Ajax fixes.
In the process of consolidating. Eventually we should just have one front controller.
d5ac304
Drak Activate DoctrineExtensions efff9ae
Drak Removed fix now that it's been merged upstream. 62f9bdd
Drak Remove obsolete file. ce88333
Drak Apply naming convention. 3108a9c
Drak Refactor module namespaces for module namechanges 4e0e70a
Drak Rename themes dba008b
Drak Fix namespaces 6e8df89
Drak Refactored for module naming standard 450fdb2
Drak Updated SQL for recent changes. 8e426d6
Drak Fixed namespace 35a59b5
Drak Refactor all ModUtil::*func() calls to new module names 561c6ef
Drak Refactor templates to use new module names 61bba55
Drak Get rid of ajax.php front controller, everything goes through one ent…
…ry-point now
7f266f7
Drak Namespace fixes. 572033e
Drak Better detection of ajax requests. 9196c68
Drak More namespace fixces. 3ae4722
Drak change constant c41550f
Drak Update installation instructions. 8ecdb23
Drak Docblock. c5e6695
Drak Remove method. 6e6ff65
Drak Refactor ModUtil::available() calls with new module names. 4e2a005
Drak Update documentation. 84bc0f5
Drak Activate bundle debug routing fadc5f9
Drak [HookManager] Docblocks and interface changes. 4689715
Drak and others added some commits
Drak Update readme. f330598
Drak Move module javascripts to a folder called js 2b1a898
Drak Update readme f57bf17
Drak Update documentation 2fa4bee
Drak Update readme b33f65e
@tfotis tfotis Refactor Users module to Doctrine 2
UPGRADE NEEDED
-------------------------
a new table 'users_attributes' has been added to store all the attributes of the user.
so either run upgrade.php or run the following query

`
CREATE TABLE IF NOT EXISTS `users_attributes` (
  `user_id` int(11) NOT NULL,
  `name` varchar(80) NOT NULL,
  `value` longtext NOT NULL,
  PRIMARY KEY (`user_id`,`name`),
  KEY `IDX_E6F031E4A76ED395` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`
9683767
@tfotis tfotis Merge branch 'Users_Doctrine2'
Conflicts:
	src/legacy/util/UserUtil.php
	web/system/UsersModule/Api/AdminApi.php
	web/system/UsersModule/Api/UserApi.php
	web/system/UsersModule/Controller/AdminController.php
	web/system/UsersModule/Controller/AjaxController.php
	web/system/UsersModule/Resources/view/users_admin_approveregistration.tpl
	web/system/UsersModule/Resources/view/users_admin_newuser.tpl
	web/system/UsersModule/Resources/view/users_admin_viewregistrations.tpl
	web/system/UsersModule/Resources/view/users_user_register.tpl
	web/system/UsersModule/tables.php
3f5a1e4
@tfotis tfotis minor fix a9f15b8
Drak Fix entity name after merge 2580c0e
@tfotis tfotis add table `users_attributes` to sql file 98b7e0b
Phaidon Tabs replaced by spaces, refs #85. e316c0d
Drak Merge pull request #367 from phaidon/release-1.3
Tabs replaced by spaces, refs #85.
07cedb0
@tfotis tfotis fix constants in user's module templates d04ba68
@tfotis tfotis search and replace errors c7480de
Drak Update vendors cf1dbe4
Drak Rename folder view -> views (sf2 standards) 02d3c69
Drak Rename folder view -> views (sf2 standards) 570af31
Drak Update paths 02863eb
Drak Merge remote-tracking branch 'origin/release-1.3' 9a41dcc
@dmm1 dmm1 :-) a13375b
Drak Merge pull request #372 from dmm1/release-1.3
Webkit css fixes in installer Fixes #369
f2c1228
@dmm1 dmm1 template fixes and more trendy logo for footer c925073
Drak Merge pull request #374 from dmm1/fixes
teplate fixes make use of own logo
f107b96
Phaidon {userlinks} url fixed, closes #332. 4e6745e
Phaidon Fix pagetype, closes #314. c8d31b2
Phaidon Fix wrong modname with shorturls, closes #362. 418ffa1
Drak Merge pull request #375 from phaidon/fix1
{userlinks} url fixed, closes #332.
b2a2fbb
Drak Merge pull request #376 from phaidon/fix2
Fix pagetype, closes #314.
90fc32f
Phaidon Save the sorting of blocks after editing, closes #304. b5af818
Drak Merge remote-tracking branch 'origin/release-1.3' 25867d0
Drak Merge pull request #378 from phaidon/fix4
Save the sorting of blocks after editing, closes #304.
00fc9fb
Drak Merge remote-tracking branch 'origin/release-1.3' 2c10f61
Phaidon Check for irregular themes, refs #278. 65d4a5f
Drak Merge pull request #377 from phaidon/fix3
Fix wrong modname with shorturls, closes #362.
885222f
Drak Merge remote-tracking branch 'origin/release-1.3' cc02e79
Drak Merge pull request #379 from phaidon/fix5
Check for irregular themes, refs #278.
7febda1
Drak Merge remote-tracking branch 'origin/release-1.3' 974af21
Drak Get rid of two more useless controllers. 545e6f1
Drak Remove installer. de1bef8
Phaidon overrides.yml creator added. 7765825
Drak Merge pull request #381 from phaidon/fix7
overrides.yml creator added.
7c89cb2
Mateo TibaPalacios Special path treatment for module admin icons. Closes #276 97e8c82
Phaidon Sort countryMap, closes #303. b7b0f6e
Drak Merge pull request #383 from phaidon/fix8
Sort countryMap, closes #303.
41ac439
Drak Merge pull request #382 from matheo/modicon_imgpath
Special treatment for modules' admin icons on {img}
a72ba01
@tfotis tfotis delete tables.php and rename entity 74908fd
Drak Always return true on dbInfoLoad() refs #340 0665e5e
Phaidon Add width and height parameter to {useravatar}, closes #94. 9fc0b40
Drak Merge pull request #384 from phaidon/fix9
Add width and height parameter to {useravatar}, closes #94.
fb513b9
Drak Return values as before but don't return false refs #340 cd64e64
Drak Added missing vendor file 98e9227
Drak Fix typo 6eee972
Phaidon Block filtering with multiple function args fixed, closes #341. 6cee4f0
Phaidon Display error if password is to short, closes #283. 158b4a7
@craigh craigh another hack to solve dbModInfoLoad() refs #340 94aeca6
Phaidon Check for irregular themes, closes #278. 25e8dea
Phaidon Check for irregular themes, closes #278. 1c0e713
Drak Merge pull request #388 from phaidon/fix5
Check for irregular themes, closes #278.
c930077
Drak Merge pull request #385 from phaidon/fix10
Block filtering with multiple function args fixed, closes #341.
1701b73
Drak Merge pull request #386 from phaidon/fix11
Display error if password is to short, closes #283.
179747e
Drak Fixes the upgrader refs #340 1c3ddda
Drak Merge pull request #387 from craigh/Ticket_340
refs #340
a97924b
Drak Merge remote-tracking branch 'origin/release-1.3' ad730e9
Drak Removed files after merge 55c599b
Phaidon Pager for user theme gallery added, closes #175. 1b3afa6
@jusuff jusuff Do not reset stylesheet select when no stylesheet is selected (closes…
… #176)
a32497c
Phaidon Code formatting. c99344f
Drak Merge pull request #390 from phaidon/fix1
Code formatting.
8dc9736
@hvorragend hvorragend More examples added to the docblock of pageaddvar 8d3db0f
@tfotis tfotis refactor SecurityCenter module to Doctrine 2 ec4aa4d
@tfotis tfotis Merge branch 'SC_Doctrine2' 44e5749
Phaidon Deactivate file based shorturls during upgrade, closes #248. c52a4a2
Drak Merge pull request #391 from phaidon/fix2
Deactivate file based shorturls during upgrade, closes #248.
eab609e
Drak Regenerated translation catalogs 2b03ef2
Phaidon Pager for user theme gallery added, closes #175. 8af6ea4
@jusuff jusuff Do not reset stylesheet select when no stylesheet is selected (closes…
… #176)
85aed1a
Phaidon Code formatting. c268a08
@hvorragend hvorragend More examples added to the docblock of pageaddvar 2be58a8
Drak Regenerated translation catalogs 2962f7e
Drak move image after merge 9232b58
Drak moved file after merge 74eaad3
Drak Relocate paths after merge bbbaa48
Drak Fixed upgrade path.
Since the Blocks module API was refactored to Doctrine 2 this
API returns Doctrine 2 entities and not an array for use with DBUtil.
e0b9f6a
Drak Merge remote-tracking branch 'origin/release-1.3' a8af7fc
@paustian paustian Added the changes as I see them for workflow. I need to get 1.4 up an…
…d running and then be able to debug the code to make sure it does what it is supposed to.
27c5ff8
@paustian paustian Updated the install directions adding information for using MAMP.
There is a Working version of Util.php with the Doctrine Code now.
Code is added to Workflow to use Doctrine 2. Testing of adding workflows still needed, but the code has been tested to actually delete things form the database.
I also added a few files to ignore including .DS_Storeto .gitignore. I work on a mac system
74768cf
@paustian paustian Updated the install directions adding information for using MAMP.
There is a Working version of Util.php with the Doctrine Code now.
Code is added to Workflow to use Doctrine 2. Testing of adding workflows still needed, but the code has been tested to actually delete things form the database.
I also added a few files to ignore including .DS_Store. I work on a mac system
708d624
@ghost Unknown commented on an outdated diff
README.md
((9 lines not shown))
- Configuring the database settings in `app/config/database.yml`
- - Install vendors with `php composer.phar install`
+ - Also configure the database settings in app/config/core_legacy.yml
+ - Install vendors with `php composer.phar install`
+ If you are using MAMP on a mac, you will need the full path to php
+ /Applications/MAMP/bin/php/php5.3.6/bin/php install-composer.php
+ /Applications/MAMP/bin/php/php5.3.6/bin/php composer.phar install
@ghost
ghost added a note

This is too version specific. /path/to/php would be better.

I made it more general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ghost Unknown commented on the diff
.gitignore
@@ -26,3 +26,10 @@ composer.phar
/web/ztemp/Theme_Config/!\.index.html
/web/ztemp/doctrinemodels/!\.index.html
+/web/nbproject/private/
+/nbproject/
+/app/config/core_legacy.yml
+/app/config/database.yml
+/app/console
+/web/.htaccess
+.DS_Store
@ghost
ghost added a note

These additions are not OK. The additions of the netbeans ignores and DS_Store should be added to your local git settings global ignore - see http://help.github.com/ignore-files/

.gitignore deleted and global ignore created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ghost Unknown commented on an outdated diff
src/legacy/Zikula/Workflow/Util.php
@@ -367,6 +380,7 @@ public static function getWorkflowForObject(&$obj, $dbTable, $idcolumn = 'id', $
}
// attach workflow to object
+ //I should be able to dump this since I am using doctrine
@ghost
ghost added a note

Please remove personal comments/notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ghost Unknown commented on an outdated diff
src/legacy/Zikula/Workflow/Util.php
@@ -349,14 +355,21 @@ public static function getWorkflowForObject(&$obj, $dbTable, $idcolumn = 'id', $
if (!empty($obj[$idcolumn])) {
// get workflow data from DB
- $dbtables = DBUtil::getTables();
+ $dbtables = ServiceUtil::getManager()->getParameter('dbtables');
@ghost
ghost added a note

This lookup should be removed as it relates to tables.php which is being removed.

Done

@ghost
ghost added a note

Did you push the changes yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@tfotis tfotis commented on an outdated diff
README.md
@@ -22,11 +22,19 @@ Regularly run composer also to make sure dependencies are up to date.
## Manual installation process
- - Install the database manually from `docs/installation.sql`
- The username and password are `admin` / `zikula1`
+ - Install the database manually from `docs/installation.sql`.
+ If you are using phpmyadmin, you can copy and paste into an SQL field and just hit go. Make sure you
+ have created the database and you are in the correct database.
@tfotis Zikula Project member
tfotis added a note

imo, if using phpmyadmin, it's better to use the import function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@tfotis tfotis commented on an outdated diff
src/legacy/Zikula/Workflow/Util.php
@@ -185,9 +185,13 @@ public static function deleteWorkflowsForModule($module)
if (!isset($module)) {
$module = ModUtil::getName();
}
-
- // this is a cheat to delete all items in table with value $module
- return (bool)DBUtil::deleteObjectByID('workflows', $module, 'module');
+ //This is a static function, so we have to user ServiceUtil to get the entity manager
+ $em = ServiceUtil::getManager()->get('doctrine')->getEntityManager();
+ //crete the dql query.
+ $dql = "DELETE Zikula\Core\Doctrine\Entity\Workflows w WHERE w.module = '$module'";
@tfotis Zikula Project member
tfotis added a note

some extra spaces here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@paustian paustian commented on an outdated diff
app/config/core_legacy.yml
@@ -17,7 +17,7 @@ System:
dbcache.cache_result: 0
dbcache.cache_result_ttl: 30
DBInfo:
- databases: { default: { host: localhost, user: root, password: '', dbname: z140, dbdriver: mysql, dbtabletype: myisam, charset: utf8, collate: utf8_general_ci } }
+ databases: { default: { host: localhost, user: root, password: root, dbname: zikula_1_4, dbdriver: mysql, dbtabletype: myisam, charset: utf8, collate: utf8_general_ci } }
Debug:
error_reporting_development: 30719
error_reporting_production: 30709

Grr. These are in my ignore file. WHY DID THEY GET PUSHED???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@paustian

Ugh, this became a mess. Learning git still

@paustian paustian closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.