Upgrade versioning....and database variable access

Permalink 1 user found helpful
Hello! New C5 developer and lovin it so far although i'm having a very hard time navigating the documentation. I've never found API docs that useful and....welll....the 5.7 docs are a work in progress -

Two questions i hope someone can help me with

Q1: i'm developing. In my package controller.php upgrade function how to i pull out the current and the new version of the package so i can set the upgrade path for some of my components

Q2: What is the concrete5.7 way of making a connection to a second / additional database using a second set of connection parameters in database.php? My database.php is below.

Q3: How do i access the parameters array below directly from within a C5 package?

return array(
'default-connection' => 'concrete',
'connections' => array(
'concrete' => array(
'driver' => 'c5_pdo_mysql',
'server' => 'localhost',
'database' => 'db1',
'username' => 'db1_k4kDevel',
'password' => 'am-i-that',
'charset' => 'utf8'
),
'k4k' => array(
'driver' => 'c5_pdo_mysql',
'server' => 'localhost',
'database' => 'db2',
'username' => 'db1_k4kDevel',
'password' => 'stupid?',
'charset' => 'utf8'
)
)
);

 
Jupiter replied on at Permalink Reply
Jupiter
hi dbuerer

please contact concrete5 core team member..you can PM to them..