Plugin Directory

Changeset 209802


Ignore:
Timestamp:
02/24/2010 01:55:22 PM (16 years ago)
Author:
markowe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordbay/trunk/WordBay.php

    r209790 r209802  
    7979                        $searchterms = urlencode ($searchterms);
    8080
    81                         $WBOptions = $this -> getAdminOptions ( );
    8281                        $search_page_link = $WBOptions['search_page'];
    8382                        if ( preg_match ( '#=[0-9]+#', $search_page_link ) ) // Cheap and nasty check to see if we are using non-rewritten URLs
     
    544543
    545544
    546 $WBCSSdata = $postedCSS;
    547 file_put_contents($WBCSSfile, $WBCSSdata);
     545                                          $WBCSSdata = $postedCSS;
     546                                       file_put_contents($WBCSSfile, $WBCSSdata);
    548547                                        }
    549548                                update_option ( $this -> adminOptionsName, $WBOptions );
     
    796795<?php
    797796// check if there is already a stylesheet in memory, if so, retrieve and skip the rest
    798 if ($WBOptions['WordBayCSS'])
     797if (array_key_exists ('WordBayCSS', $WBOptions))
    799798{
    800 $varWBCSS = $WBOptions['WordBayCSS'];
    801 if (!file_exists(getPluginPath() . '/WordBay.css'))
    802 
    803 {
    804 ?><p style="color: red;">No existing <strong>WordBay.css</strong> was found in your plugin directory (either you have just installed a new version of WordBay, or you deleted it for some reason). A previous css file was found in memory and saved as <strong>WordBay.css</strong>.</p><?php
    805 file_put_contents(getPluginPath() . '/WordBay.css', $varWBCSS);
    806 }
     799   $varWBCSS = $WBOptions['WordBayCSS'];
     800   if (!file_exists(getPluginPath() . '/WordBay.css')) 
     801
     802   {
     803      ?><p style="color: red;">No existing <strong>WordBay.css</strong> was found in your plugin directory (either you have just installed a new version of WordBay, or you deleted it for some reason). A previous css file was found in memory and saved as <strong>WordBay.css</strong>.</p><?php
     804      file_put_contents(getPluginPath() . '/WordBay.css', $varWBCSS);   
     805   }
    807806
    808807
     
    811810else if (file_exists(getPluginPath() . '/WordBay.css'))
    812811   {
    813     $WBCSSdata = stripslashes(file_get_contents(getPluginPath() . '/WordBay.css'));
    814     $WBOptions['WordBayCSS'] = $WBCSSdata;
    815    update_option ( $this -> adminOptionsName, $WBOptions );
    816    $varWBCSS = $WBCSSdata;
    817    ?>
     812      $WBCSSdata = stripslashes(file_get_contents(getPluginPath() . '/WordBay.css'));
     813      $WBOptions['WordBayCSS'] = $WBCSSdata;
     814     update_option ( $this -> adminOptionsName, $WBOptions );
     815     $varWBCSS = $WBCSSdata;
     816     ?>
    818817   
    819818   
Note: See TracChangeset for help on using the changeset viewer.