Development

Changeset 24534

You must first sign up to be able to contribute.

Changeset 24534

Show
Ignore:
Timestamp:
11/29/09 17:48:40 (4 years ago)
Author:
ornicar2
Message:

[Diem]
- made admin ajax logs hash keys more robust
- disabled request logging for admin ajax requests
- fixed notices in installer
- switched to ALPHA4
- fixed typo in dmWebResponse
- fixed Zend_CodeGenerator breaks methods body by overriding Zend_Reflection_Method
- fixed media helper for remote resources
- styled error dialog

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/log/dmLogView.php

    r24340 r24534  
    8989  public function getHash() 
    9090  { 
    91     return substr(md5(serialize($this->getEntries(array('hydrate' => false)))), -4); 
     91    return substr(md5(serialize($this->getEntries(array('hydrate' => false)))), -6); 
    9292  } 
    9393   
  • plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminLogs.js

    r23290 r24534  
    2323      url:   $.dm.ctrl.getHref('+/dmLog/refresh'), 
    2424      data:  { 
    25         rh: $.dm.adminLogs.request.hash, 
    26         eh: $.dm.adminLogs.event.hash 
     25        rh:       $.dm.adminLogs.request.hash, 
     26        eh:       $.dm.adminLogs.event.hash, 
     27        dm_nolog: 1 
    2728      }, 
    2829      success: function(data) { 
  • plugins/diemPlugin/trunk/dmCorePlugin/config/installer.php

    r24469 r24534  
    167167try 
    168168{ 
     169  $out = $err = null; 
    169170  $this->getFilesystem()->execute(sprintf( 
    170171    '%s "%s" %s', 
  • plugins/diemPlugin/trunk/dmCorePlugin/lib/core/dmBase.php

    r24510 r24534  
    44 * The current Diem version. 
    55 */ 
    6 define('DIEM_VERSION', '5.0.0-ALPHA3'); 
     6define('DIEM_VERSION', '5.0.0-ALPHA4'); 
    77 
    88class dmBase 
  • plugins/diemPlugin/trunk/dmCorePlugin/lib/log/event/dmEventLog.php

    r23450 r24534  
    3232  { 
    3333    $dispatcher = $this->serviceContainer->getService('dispatcher'); 
    34      
     34 
    3535    foreach($this->getConnections() as $event => $method) 
    3636    { 
  • plugins/diemPlugin/trunk/dmCorePlugin/lib/log/request/dmRequestLog.php

    r23250 r24534  
    1919  public function listenToContextEndEvent(sfEvent $event) 
    2020  { 
    21     $this->log(array( 
    22       'context' => $this->serviceContainer->getService('context'), 
    23       'server'  => $_SERVER 
    24     )); 
     21    if (!$event->getSubject()->getRequest()->getParameter('dm_nolog')) 
     22    { 
     23      $this->log(array( 
     24        'context' => $event->getSubject(), 
     25        'server'  => $_SERVER 
     26      )); 
     27    } 
    2528  } 
    2629} 
  • plugins/diemPlugin/trunk/dmCorePlugin/lib/response/dmWebResponse.php

    r24196 r24534  
    150150      $assetAliases = $this->getAssetAliases(); 
    151151       
    152       if($this->cdnConfig[$type]['enabled'] && isset($cdnConfig[$type][$asset])) 
     152      if($cdnConfig[$type]['enabled'] && isset($cdnConfig[$type][$asset])) 
    153153      { 
    154154        $path = $cdnConfig[$type][$asset]; 
  • plugins/diemPlugin/trunk/dmCorePlugin/lib/vendor/dmZend/CodeGenerator/Php/Class.php

    r22681 r24534  
    55class dmZendCodeGeneratorPhpClass extends Zend_CodeGenerator_Php_Class 
    66{ 
     7  /** 
     8   * fromReflection() - build a Code Generation PHP Object from a Class Reflection 
     9   * 
     10   * @param Zend_Reflection_Class $reflectionClass 
     11   * @return dmZendCodeGeneratorPhpClass 
     12   */ 
    713  public static function fromReflection(Zend_Reflection_Class $reflectionClass) 
    814  { 
     
    3743 
    3844    $methods = array(); 
    39     foreach ($reflectionClass->getMethods() as $reflectionMethod) { 
     45    foreach ($reflectionClass->getMethods(-1, 'dmZendReflectionMethod') as $reflectionMethod) { 
    4046      if ($reflectionMethod->getDeclaringClass()->getName() == $class->getName()) { 
    4147        $methods[] = dmZendCodeGeneratorPhpMethod::fromReflection($reflectionMethod); 
  • plugins/diemPlugin/trunk/dmCorePlugin/lib/vendor/dmZend/CodeGenerator/Php/Method.php

    r22681 r24534  
    9090 
    9191    $output .= $indent . '}' . self::LINE_FEED; 
    92  
     92     
    9393    return $output; 
    9494  } 
  • plugins/diemPlugin/trunk/dmCorePlugin/lib/view/html/media/dmMediaResource.php

    r24469 r24534  
    1010    $type, 
    1111    $mime, 
    12     $pathFromWebDir; 
     12    $pathFromWebDir, 
     13    $remotePath; 
    1314 
    1415  const 
    15   MEDIA = 'media', 
    16   FILE  = 'file', 
    17  
    18   IMAGE = 'image', 
    19   VIDEO = 'video', 
    20   AUDIO = 'audio', 
    21   FLASH = 'flash'; 
     16  MEDIA   = 'media', 
     17  FILE    = 'file', 
     18  REMOTE  = 'remote', 
     19   
     20  IMAGE   = 'image', 
     21  VIDEO   = 'video', 
     22  AUDIO   = 'audio', 
     23  FLASH   = 'flash'; 
    2224 
    2325  public function __construct(dmTheme $theme, $culture, array $requestContext) 
     
    6062  public function getWebPath() 
    6163  { 
    62     return $this->requestContext['relative_url_root'].$this->pathFromWebDir; 
     64    if($this->type === self::REMOTE) 
     65    { 
     66      $webPath = $this->remotePath; 
     67    } 
     68    else 
     69    { 
     70      $webPath = $this->requestContext['relative_url_root'].$this->pathFromWebDir; 
     71    } 
     72    return $webPath; 
    6373  } 
    6474 
     
    7181      case self::FILE: 
    7282        return dmOs::join(sfConfig::get('sf_web_dir'), $this->getPathFromWebDir()); 
     83      case self::REMOTE: 
     84        return $this->remotePath; 
    7385    } 
    7486  } 
     
    7688  public function initialize($source, $isDefault = false) 
    7789  { 
    78     $this->source = $source; 
     90    $this->source   = $source; 
    7991     
    8092    if (empty($source)) 
     
    94106          throw new dmException(sprintf('%s is not a valid media resource. The media with id %s does not exist', $source, $mediaId)); 
    95107        } 
     108      } 
     109      elseif (0 === strncmp($source, 'http://', 7)) 
     110      { 
     111        $this->type = self::REMOTE; 
     112        $this->remotePath = $source; 
     113   
     114        $this->mime = $this->getSimpleMime(dmOs::getFileMime($source)); 
    96115      } 
    97116      else 
     
    184203  } 
    185204   
    186    
    187205} 
  • plugins/diemPlugin/trunk/dmCorePlugin/web/css/editMode.css

    r24510 r24534  
    8686} 
    8787 
    88 div.dm.ui-dialog .dm_error { 
     88#dm_error_dialog { 
     89  border: 3px solid red; 
     90
     91 
     92#dm_error_dialog div.ui-dialog_content { 
    8993  max-height: 400px; 
    9094} 
  • plugins/diemPlugin/trunk/dmCorePlugin/web/js/dmCoreEditCtrl.js

    r24510 r24534  
    131131        } 
    132132      }, opt || {}); 
     133       
     134      if ($existing = $('#dm_error_dialog div.dm_error')) 
     135      { 
     136        $existing.dialog('close'); 
     137      } 
    133138           
    134       $('<div class="dm_error">').html(body).dialog(opt)
     139      $('<div class="dm_error">').html(body).dialog(opt).parent().attr('id', 'dm_error_dialog')
    135140    } 
    136141  }); 
  • plugins/diemPlugin/trunk/dmCorePlugin/web/lib/jquery-ui/css/jquery-ui-dialog.1.7.2.css

    r22786 r24534  
    88.dm.ui-dialog .ui-dialog-titlebar-close:hover, .dm.ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 
    99.dm.ui-dialog .ui-dialog-content { border: 0; overflow: hidden; padding: 5px; background: none; zoom: 1; } 
    10 .dm.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 
     10.dm.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background: transparent; } 
    1111.dm.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } 
    1212.dm.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }