From: Jesse M. <jm...@us...> - 2004-04-20 06:01:57
|
Update of /cvsroot/gallery/gallery2/modules/migrate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12733 Modified Files: ConfirmImport.inc Log Message: Correcting patch malfunctions that I should have caught last night. Sorry, folks. Index: ConfirmImport.inc =================================================================== RCS file: /cvsroot/gallery/gallery2/modules/migrate/ConfirmImport.inc,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- ConfirmImport.inc 19 Apr 2004 07:36:03 -0000 1.47 +++ ConfirmImport.inc 20 Apr 2004 06:01:48 -0000 1.48 @@ -551,18 +551,19 @@ $newItem->setownerId($owner->getId()); } } - - /* delete group perm actions - $allPerms = array('core.view','core.viewSource','core.viewResizes'); - foreach ($allPerms as $perm) { - $ret = GalleryCoreApi::removeGroupPermission($newItem->getId(), $groupId, $permissionId, FALSE); - if ($ret->isError()) { - return array($ret->wrap(__FILE__, __LINE__), null); + if (isset($importAlbumItem->hidden) && $importAlbumItem->hidden) { + /* delete group perm actions + $allPerms = array('core.view','core.viewSource','core.viewResizes'); + foreach ($allPerms as $perm) { + $ret = GalleryCoreApi::removeGroupPermission($newItem->getId(), 'All Users', $permissionId, FALSE); + if ($ret->isError()) { + return array($ret->wrap(__FILE__, __LINE__), null); + } } + */ } - */ + $ret = $newItem->save(); - if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } @@ -642,20 +643,21 @@ return array(GalleryStatus::success(), $results); } - $item = preg_replace('/<br\s*[\/]?>/i', "\n", $item); - $item = preg_replace('/<strong>/i', '[b]', $item); /** - $item = preg_replace('/<\/strong>/i', '[/b]', $item); + * * Converts HTML to BBCode - $item = preg_replace('/<em>/i', '[i]', $item); - * - $item = preg_replace('/<\/em>/i', '[/i]', $item); + * * @param string $item item to convert * @return string */ function convertHtmlToBbcode($item) { - $item = preg_replace('/<b>/i', '[b]', $item); + $item = preg_replace('/<br\s*[\/]?>/i', "\n", $item); + $item = preg_replace('/<strong>/i', '[b]', $item); + $item = preg_replace('/<\/strong>/i', '[/b]', $item); + $item = preg_replace('/<em>/i', '[i]', $item); + $item = preg_replace('/<\/em>/i', '[/i]', $item); + $item = preg_replace('/<b>/i', '[b]', $item); $item = preg_replace('/<\/b>/i', '[/b]', $item); $item = preg_replace('/<i>/i', '[i]', $item); $item = preg_replace('/<\/i>/i', '[/i]', $item); |