Project

General

Profile

« Previous | Next » 

Revision 1893

Added by Dietmar over 11 years ago

  1. little issue on handing the cache in TranslationTable
  2. fix missing block or block0 issue in /admin/pages/section.php

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16
19 Mar-2013 Build 1893 Dietmar Woellbrink (Luisehahne)
17

  
16 18
19 Mar-2013 Build 1892 Dietmar Woellbrink (Luisehahne)
17 19
! update output_filter module set version to 0.4.1 
18 20
19 Mar-2013 Build 1891 Dietmar Woellbrink (Luisehahne)
branches/2.8.x/wb/upgrade-script.php
702 702
	 * Modify Administrator on groups table
703 703
	 */
704 704
	echo '<div style="margin-left:2em;">';
705
	echo "<h4>Update group Administrator on table groups</h4>";
705
	echo "<h4>Updating Administrator group permissions on table groups</h4>";
706 706
	$aDebugMessage[] = "<span>Modify Administrator on groups table</span>";
707 707
	$sModulePermissions = '';
708 708
	$sTemplatePermissions = '';
......
726 726
        echo implode(PHP_EOL,$aDebugMessage);
727 727
    }
728 728
    echo '</div>';
729

  
729
    $aDebugMessage = array();
730 730
    /**********************************************************
731 731
	$aDebugMessage = array();
732 732
	/**********************************************************
......
749 749
        echo implode(PHP_EOL,$aDebugMessage);
750 750
    }
751 751
    echo '</div>';
752

  
752 753
    $aDebugMessage = array();
753

  
754 754
   /**********************************************************
755 755
    * Updating group_id in table users
756 756
    */
757 757
	echo '<div style="margin-left:2em;">';
758
	echo "<h4>Change field structure on table users</h4>";
758
	echo "<h4>Updating users groups permissions on table groups</h4>";
759 759
        $aUsers = array();
760 760
		// Get existing values
761 761
        $sql  = 'SELECT * FROM `'.TABLE_PREFIX.'users` ' ;
......
791 791
    // $aDebugMessage[] =
792 792
        echo implode(PHP_EOL,$aDebugMessage);
793 793
    }else {
794
        echo '<span><strong>'.$iTotalUsers.' users updating the group_id</strong></span>'." $OK<br />";
794
        echo '<span><strong>'.$iTotalUsers.' users updating the groups</strong></span>'." $OK<br />";
795 795
        echo '</div>';
796 796
    }
797 797
}
branches/2.8.x/wb/admin/pages/sections_save.php
102 102
	$section_id  = $section['section_id'];
103 103
	$sid = 'wb'.$section_id;
104 104
	$dst = date('I') ? ' UTC' : ''; // daylight saving time? date('P')
105
	$iBlock      = $admin->get_post_escaped('block'.$section_id);
106
// be sure it's numeric, can failed if block is disabled
107
	$iBlock      = (is_numeric($iBlock) ? $iBlock : $section['block']);
108
//workout set block to default if you add a section
109
	$iBlock      = ( ( $iBlock!==0 ) ? $iBlock : '1');
105
	$iBlock      = intval($admin->get_post('block'.$section_id));
106
	$iBlock      = ($iBlock==0) ? $section['block'] : $iBlock;
107

  
110 108
	$sStartDate  = $admin->get_post_escaped('start_date'.$section_id);
111 109
	$sStartDate  = ($sStartDate==null)||($sStartDate=='') ? 0 : jscalendar_to_timestamp($sStartDate)-TIMEZONE;
112 110
	$sEndDate    = $admin->get_post_escaped('end_date'.$section_id);
branches/2.8.x/wb/admin/pages/sections.php
213 213
		{
214 214
			require($template_location);
215 215
		}
216
		// Check if $menu is set
217
		if(!isset($block[1]) || $block[1] == '')
218
		{
219
			// Make our own menu list
220
			$block[1] = $TEXT['MAIN'];
216
 // check block settings from template/info.php
217
	if(isset($block) && is_array($block) && sizeof($block) > 0) {
218
		if(isset($block[0])) {
219
		throw new AppException('Invalid index 0 for $block[] in '.str_replace(WB_PATH,'',$template_location).'. '
220
		                     . 'The list must start with $block[1]. Please correct it!');
221 221
		}
222

  
222
		foreach($block as $iIndex=>$sBlockTitle) {
223
			if(trim($sBlockTitle) == '' ) {
224
			 $block[$iIndex] = $TEXT['BLOCK'].'_'.$iIndex;
225
			}
226
		}
227
	}else {
228
		// Make our own menu list
229
		$block = array(1, $TEXT['MAIN']);
230
	}
223 231
		/*-- load css files with jquery --*/
224 232
		// include jscalendar-setup
225 233
		$jscal_use_time = true; // whether to use a clock, too
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1892');
54
if(!defined('REVISION')) define('REVISION', '1893');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/framework/TranslationTable.php
80 80
 */	
81 81
	public function load($sAdaptor)
82 82
	{
83
		$sCachePath	= $this->getCachePath();
84
		$sCacheFile = $sCachePath.md5($this->sAddon.$this->sSystemLang.
85
		                              $this->sDefaultLang.$this->sUserLang).'.php';
83
		$sCacheFile = '';
84
		if($this->bUseCache) {
85
			$sCachePath	= $this->getCachePath();
86
			$sCacheFile = $sCachePath.md5($this->sAddon.$this->sSystemLang.
87
										  $this->sDefaultLang.$this->sUserLang).'.php';
88
		}
86 89
		if($this->bUseCache && is_readable($sCacheFile)) {
87
			$this->aTranslations = $this->loadCacheFile($sCacheFile);
90
				$this->aTranslations = $this->loadCacheFile($sCacheFile);
88 91
		}else {
89 92
			$bLanguageFound = false;
90 93
			$oAdaptor= new $sAdaptor($this->sAddon);
......
147 150
				                                    $this->aLanguages['system'],
148 151
				                                    $this->aLanguages['default'],
149 152
				                                    $this->aLanguages['user']);
150
				if($this->bUseCache) {
151
					$this->writeCacheFile($sCacheFile);
152
				}
153
				$this->writeCacheFile($sCacheFile);
153 154
			}
154 155
		}
155 156
		return $this;
......
242 243
 */	
243 244
	protected function writeCacheFile($sCacheFile)
244 245
	{
245
		$sOutput = '<?php'."\n".'/* autogenerated cachefile */'."\n";
246
		while (list($key, $value) = each($this->aTranslations)) {
247
			$sOutput .= '$aTranslation[\''.$key.'\'] = \''.addslashes($value).'\';'."\n";
246
		if($this->bUseCache) {
247
			$sOutput = '<?php'."\n".'/* autogenerated cachefile */'."\n";
248
			while (list($key, $value) = each($this->aTranslations)) {
249
				$sOutput .= '$aTranslation[\''.$key.'\'] = \''.addslashes($value).'\';'."\n";
250
			}
251
			file_put_contents($sCacheFile, $sOutput, LOCK_EX);
248 252
		}
249
		file_put_contents($sCacheFile, $sOutput, LOCK_EX);
250 253
	}
251 254
} // end of class TranslationTable
branches/2.8.x/wb/framework/globalExceptionHandler.php
36 36
				$result .= print_r($trace, true)."\n";
37 37
				$result .= '</pre>'."\n";
38 38
			}else {
39
				$result = 'Exception: "'.$this->getMessage().'" in ['.$file.']<br />'."\n";
39
				$result = 'Exception: "'.$this->getMessage().'" >> Exception detected in: ['.$file.']<br />'."\n";
40 40
			}
41 41
			return $result;
42 42
		}

Also available in: Unified diff