[MKDoc-dev] Patch to remove lib::sql module from MKDoc-1.6

Bruno Postle bruno at mkdoc.com
Fri Feb 10 16:38:12 GMT 2006


For historical reasons there is a generic SQL database abstraction 
layer in the MKDoc-1.6 source called lib::sql.

This code was removed from the 1.8 development version and replaced 
with the MKDoc::SQL CPAN module.  This patch does much the same for 
1.6 though internally it still uses the lib::sql naming scheme to be 
backwards compatible with existing database configurations.

-- 
Bruno
-------------- next part --------------
Index: MKDoc.pm
===================================================================
RCS file: /var/spool/cvs/mkd/Attic/MKDoc.pm,v
retrieving revision 1.15.2.36
diff -r1.15.2.36 MKDoc.pm
37,38c37
< use lib::sql::DBH;
< use lib::sql::Table;
---
> use MKDoc::SQL;
Index: MKDoc/Handler/GroupAuthz.pm
===================================================================
RCS file: /var/spool/cvs/mkd/MKDoc/Handler/Attic/GroupAuthz.pm,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 GroupAuthz.pm
28a29
> use MKDoc::SQL;
99c100
<     my $con          = lib::sql::Condition->new(Editor_ID => $user->id);
---
>     my $con          = MKDoc::SQL::Condition->new(Editor_ID => $user->id);
128c129
<         where => lib::sql::Condition->new(Document_ID => $doc->id)
---
>         where => MKDoc::SQL::Condition->new(Document_ID => $doc->id)
Index: MKDoc/Handler/Initialize.pm
===================================================================
RCS file: /var/spool/cvs/mkd/MKDoc/Handler/Initialize.pm,v
retrieving revision 1.1.2.20
diff -r1.1.2.20 Initialize.pm
31,32c31
< use lib::sql::DBH;
< use lib::sql::Table;
---
> use MKDoc::SQL;
Index: MKDoc/Site/Deploy/DB/Driver.pm
===================================================================
RCS file: /var/spool/cvs/mkd/MKDoc/Site/Deploy/DB/Driver.pm,v
retrieving revision 1.1.2.6
diff -r1.1.2.6 Driver.pm
197,204c197
< use lib::sql::Category;
< use lib::sql::Table;
< use lib::sql::type::Char;
< use lib::sql::type::DateTime;
< use lib::sql::type::Int;
< use lib::sql::type::Text;
< use lib::sql::type::LongText;
< use lib::sql::DBH;
---
> use MKDoc::SQL;
Index: MKDoc/Site/Deploy/DB/Schema.pm
===================================================================
RCS file: /var/spool/cvs/mkd/MKDoc/Site/Deploy/DB/Schema.pm,v
retrieving revision 1.1.2.7
diff -r1.1.2.7 Schema.pm
37,44c37
< use lib::sql::Table;
< use lib::sql::Category;
< 
< use lib::sql::type::Char;
< use lib::sql::type::DateTime;
< use lib::sql::type::Int;
< use lib::sql::type::Text;
< use lib::sql::type::LongText;
---
> use MKDoc::SQL;
Index: MKDoc/Util/LinkParser.pm
===================================================================
RCS file: /var/spool/cvs/mkd/MKDoc/Util/Attic/LinkParser.pm,v
retrieving revision 1.1.2.7
diff -r1.1.2.7 LinkParser.pm
135c135
< use lib::sql::DBH;
---
> use MKDoc::SQL;
Index: flo/Standard.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/Standard.pm,v
retrieving revision 1.12.2.14
diff -r1.12.2.14 Standard.pm
37c37
< use lib::sql::Table;
---
> use MKDoc::SQL;
Index: flo/Record/Ticket.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/Record/Ticket.pm,v
retrieving revision 1.16.2.7
diff -r1.16.2.7 Ticket.pm
75c75,76
< use lib::sql::Condition;
---
> use MKDoc::SQL::Condition;
> use MKDoc::SQL;
330c331
<     # note: using NOW() doesn't work (it's quoted by lib::sql::Condition) so
---
>     # note: using NOW() doesn't work (it's quoted by MKDoc::SQL::Condition) so
332c333
<     my $cond = new lib::sql::Condition;
---
>     my $cond = new MKDoc::SQL::Condition;
Index: flo/editor/Headlines.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/editor/Headlines.pm,v
retrieving revision 1.4.2.34
diff -r1.4.2.34 Headlines.pm
485,486c485,486
<     use lib::sql::Condition;
<     my $cond = new lib::sql::Condition;
---
>     use MKDoc::SQL::Condition;
>     my $cond = new MKDoc::SQL::Condition;
Index: flo/plugin/Headlines.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/plugin/Headlines.pm,v
retrieving revision 1.1.2.11
diff -r1.1.2.11 Headlines.pm
97,98c97,98
<     use lib::sql::Condition;
<     my $cond = new lib::sql::Condition;
---
>     use MKDoc::SQL::Condition;
>     my $cond = new MKDoc::SQL::Condition;
Index: flo/plugin/Sitemap.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/plugin/Sitemap.pm,v
retrieving revision 1.7.2.15
diff -r1.7.2.15 Sitemap.pm
50c50
< use lib::sql::Condition;
---
> use MKDoc::SQL;
Index: flo/plugin/Account/Reminder.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/plugin/Account/Attic/Reminder.pm,v
retrieving revision 1.14.2.9
diff -r1.14.2.9 Reminder.pm
81c81
<     my $condition = new lib::sql::Condition();
---
>     my $condition = new MKDoc::SQL::Condition();
Index: flo/plugin/Admin/Move.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/plugin/Admin/Move.pm,v
retrieving revision 1.1.2.8
diff -r1.1.2.8 Move.pm
163c163
<     use lib::sql::Condition;
---
>     use MKDoc::SQL::Condition;
166c166
<     my $condition  = new lib::sql::Condition();
---
>     my $condition  = new MKDoc::SQL::Condition();
Index: flo/plugin/Admin/UserModify.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/plugin/Admin/UserModify.pm,v
retrieving revision 1.1.2.6
diff -r1.1.2.6 UserModify.pm
152c152
<         where => lib::sql::Condition->new(Grp_ID    => $id,
---
>         where => MKDoc::SQL::Condition->new(Grp_ID    => $id,


More information about the MKDoc-dev mailing list