Ignore:
Timestamp:
10/23/07 14:40:15 (5 years ago)
Author:
hverton
Message:

Check if the advertising module is installed before attempting to get an ad from the database

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/ad_side_panel/php-files/modules/ad_side_panel/ad_side_panel.php

    r971 r996  
    2020    require_once PATH_LOCALE.LOCALESET."admin/adverts.php"; 
    2121 
    22     // load the advertisement include module 
    23     require_once PATH_INCLUDES."advertisement.php"; 
     22    // check if the advertising module is installed 
     23    if (file_exists(PATH_INCLUDES."advertisement.php")) { 
     24         
     25        // load the advertisement include module 
     26        require_once PATH_INCLUDES."advertisement.php"; 
    2427     
    25     // array's to store the variables for this panel 
    26     $ad = get_advert(0,0,0); 
     28        // array's to store the variables for this panel 
     29        $ad = get_advert(0,0,0); 
     30 
     31    } else { 
     32        $ad = ""; 
     33    } 
    2734 
    2835    if ($ad == "") { 
Note: See TracChangeset for help on using the changeset viewer.