Ignore:
Timestamp:
Oct 7, 2010, 8:04:43 PM (14 years ago)
Author:
grum
Message:

Admin interface + Gallery integration finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/maintain.inc.php

    r7054 r7125  
    4040}
    4141
    42 function gpcMsgError(&$errors)
     42function gpcMsgError(&$errors, $errorMessage)
    4343{
    44   global $gpcNeeded;
    45   $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), GMAPS_GPC_NEEDED);
     44  switch($errorMessage)
     45  {
     46    case 'gpc':
     47      $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), GMAPS_GPC_NEEDED);
     48      break;
     49    case 'amd':
     50      $msg=sprintf(l10n('To install this plugin, you need to install Advanced Metadata %s before'), GMAPS_AMD_NEEDED);
     51      break;
     52  }
     53
    4654  if(is_array($errors))
    4755  {
     
    6472{
    6573  global $prefixeTable, $gpcInstalled;
    66   if($gpcInstalled)
     74  if(!$gpcInstalled)
    6775  {
    68     $gmaps=new GMaps_Install($prefixeTable, __FILE__);
    69     $result=$gmaps->install();
     76    gpcMsgError($errors, 'gpc');
     77    return(false);
    7078  }
    71   else
     79  if(GMaps_root::checkAMDActivated()=='none')
    7280  {
    73     gpcMsgError($errors);
     81    amdMsgError($errors, 'amd');
     82    return(false);
    7483  }
     84
     85  $gmaps=new GMaps_Install($prefixeTable, __FILE__);
     86  $result=$gmaps->install();
    7587}
    7688
     
    107119  else
    108120  {
    109     gpcMsgError($errors);
     121    gpcMsgError($errors, 'gpc');
    110122  }
    111123}
Note: See TracChangeset for help on using the changeset viewer.