Login / integration from non-php system (zope) - Seems to work fine - Sanity check please?
|
Alias_Knagg
Joined: 2008-04-04
Posts: 2 |
Posted: Sun, 2008-04-06 13:57
|
|
Hi. Basically we have used G1 for our CMS's image handling for several years, and now we want to try G2. I expect our setup will be either multisite, with one site per customer, or mulitisite + multiroot for the smaller sites. a new window pops open with the url to a python script that Here's where the hackish part happens I guess what I really want to ask about is what the "correct" way of logging in to an embedded G2 via http redirect would be.
function runGallery() {
$cid = $_REQUEST['cid'];
if (!$cid) { die('An error occurred'); }
require_once ("../mx3g/$cid/embed.php");
$data = array();
$uid = $_REQUEST['uid'];
if ($uid) {
$ret = GalleryEmbed::logout();
$ret = GalleryEmbed::init(array('fullInit' => true,'embedUri' => '/mx3/main.php'));
if ($ret) { die('An error occurred'); }
$ret = GalleryEmbed::login($uid);
if ($ret) { die('An error occurred'); }
$ret = GalleryEmbed::done();
if ($ret) { die('An error occurred'); }
GalleryUtilities::setResponseHeader("Location: /mx3/main.php");
GalleryEmbed::handleRequest();
exit;
}
else {
$ret = GalleryEmbed::init(array('fullInit' => true,'embedUri' => '/mx3/main.php'));
if ($ret) {
$data['bodyHtml'] = $ret->getAsHtml();
return $data;
}
}
$g2moddata = GalleryEmbed::handleRequest();
...
|
|
| Login or register to post comments |
