Ticket #7 (closed defect: fixed)

Opened 7 months ago

Last modified 6 months ago

[BUG SOLUTION] Settings saving problem

Reported by: k.ciesielski@… Owned by: ady
Priority: critical Milestone: wp-esprit-picasa-0.0.2
Component: WP ESPR!T Picasa Keywords:
Cc:

Description

Hi, It's quite hard to get your/authors email :( so I'm posting solution to #5 and #6. cut here:

diff -crB wp-esprit-picasa/wp-esprit-picasa-admin.php wp-esprit-picasa.new/wp-esprit-picasa-admin.php
*** wp-esprit-picasa/wp-esprit-picasa-admin.php	2009-06-29 19:52:00.000000000 -0700
--- wp-esprit-picasa.new/wp-esprit-picasa-admin.php	2009-08-23 03:26:24.547266000 -0700
***************
*** 41,47 ****
  $ThumbnailSize = get_option(WpEspritPicasa::$WP_OPTION_THUMBNAIL_SIZE);
  $FullSize = get_option(WpEspritPicasa::$WP_OPTION_FULL_SIZE);
  
! if (strlen($message)) {
    echo '<div id="message" class="updated fade"><p><strong>'.$message.'</strong></p></div>';
    unset($message);
  }
--- 43,49 ----
  $ThumbnailSize = get_option(WpEspritPicasa::$WP_OPTION_THUMBNAIL_SIZE);
  $FullSize = get_option(WpEspritPicasa::$WP_OPTION_FULL_SIZE);
  
! if (isset($message) and strlen($message)) {
    echo '<div id="message" class="updated fade"><p><strong>'.$message.'</strong></p></div>';
    unset($message);
  }
***************
*** 106,112 ****
  	id="TestButton" name="submit" class="button-primary"
  	value="Test Settings" /> <img class="AjaxLoader"
  	src="<? echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__))."images/ajax-loader.gif"; ?>">
! <span id="TestResult"><?php echo $testMessage; ?></span></p>
  
  </form>
  
--- 108,118 ----
  	id="TestButton" name="submit" class="button-primary"
  	value="Test Settings" /> <img class="AjaxLoader"
  	src="<? echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__))."images/ajax-loader.gif"; ?>">
! <span id="TestResult"><?php 
! if (isset($testMessage)) {
!     echo $testMessage; 
! }
! ?></span></p>
  
  </form>
  
diff -crB wp-esprit-picasa/wp-esprit-picasa.php wp-esprit-picasa.new/wp-esprit-picasa.php
*** wp-esprit-picasa/wp-esprit-picasa.php	2009-06-29 19:52:00.000000000 -0700
--- wp-esprit-picasa.new/wp-esprit-picasa.php	2009-08-23 03:40:10.488331000 -0700
***************
*** 65,75 ****
  define('ESPRIT_PICASA_FILE', basename(__FILE__));
  define('ESPRIT_PICASA_DIR', dirname(__FILE__));
  define('ESPRIT_PICASA_PATH', ESPRIT_PICASA_DIR.'/'.ESPRIT_PICASA_FILE);
! define('ESPRIT_PICASA_ADMIN_URL', $_SERVER[PHP_SELF]."?page=".basename(ESPRIT_PICASA_DIR).'/'.ESPRIT_PICASA_FILE);
  
  
  function wpEspritPicasaAdminActions() {
    add_options_page("ePicasa", "ESPR!T Picasa", 1, "esprit-picasa", "picasaAdminMenu");
  }
  
  function wpEspritPicasaAddMediaButton() {
--- 65,76 ----
  define('ESPRIT_PICASA_FILE', basename(__FILE__));
  define('ESPRIT_PICASA_DIR', dirname(__FILE__));
  define('ESPRIT_PICASA_PATH', ESPRIT_PICASA_DIR.'/'.ESPRIT_PICASA_FILE);
! define('ESPRIT_PICASA_ADMIN_URL', $_SERVER['PHP_SELF']."?page=".basename(ESPRIT_PICASA_DIR).'/'.ESPRIT_PICASA_FILE);
  
  
  function wpEspritPicasaAdminActions() {
    add_options_page("ePicasa", "ESPR!T Picasa", 1, "esprit-picasa", "picasaAdminMenu");
+   add_options_page("ePicasa", "ESPR!T Picasa", 1, "wp-esprit-picasa/wp-esprit-picasa-admin", "picasaAdminMenu");
  }
  
  function wpEspritPicasaAddMediaButton() {

Paste it into picasa.patch and then run: patch -p1 -i picasa.patch

and everything works ok. This patch also removes annoying notices about references to undelared variables. Please verify if I haven't made any mistakes (I have not coded in php for at least five years) and please mail me feedback if it's ok.

Anyway I'm happy user of your plugin :D you can add http://www.pydev.pl to your users list, Thanks & regards, Chris

Change History

Changed 6 months ago by ady

  • status changed from new to closed
  • resolution set to fixed

(In [12]) Bugfix version, fixes #5, #6 and #7

Changed 6 months ago by ady

  • milestone changed from wp-esprit-picasa-0.1.0 to wp-esprit-picasa-0.0.1

Thank you, I have implemented the changes.

There was another problem in 3rd party library for accessing Picasa feeds which took me lot of time so the fix wasn't so quick as it should be.

Note: See TracTickets for help on using tickets.