Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1069733
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 20, 6:31 AM
Size
21 KB
Mime Type
text/x-diff
Expires
Tue, Jul 22, 6:31 AM (5 h, 19 m)
Engine
blob
Format
Raw Data
Handle
692629
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/incs/just_close.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/incs/just_close.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/incs/just_close.tpl (revision 4465)
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>
+
+</title>
+</head>
+<body>
+<script type="text/javascript">
+ //alert('<inp2:m_t t="dummy" opener="u" escape="escape"/>');
+ window.close();
+ window.opener.focus();
+</script>
+</body>
+</html>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/incs/just_close.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/readme_1_1_9.txt
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/readme_1_1_9.txt (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/readme_1_1_9.txt (revision 4465)
@@ -0,0 +1 @@
+0008038 Common email footer tamplate
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/admin/install/upgrades/readme_1_1_9.txt
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/units/images/image_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/images/image_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/images/image_tag_processor.php (revision 4465)
@@ -0,0 +1,206 @@
+<?php
+
+class ImageTagProcessor extends kDBTagProcessor {
+
+ function Image($params)
+ {
+ $params['img_path'] = $this->ImageSrc($params);
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ $params['name'] = $this->SelectParam($params, 'block,render_as');
+
+ return $this->Application->ParseBlock($params);
+ }
+
+ function ItemImage($params)
+ {
+ $this->LoadItemImage($params);
+ $params['img_path'] = $this->ImageSrc($params);
+ $params['img_size'] = $this->ImageSize($params);
+ if (!$params['img_size']){
+ if (isset($params['DefaultWidth'])) {
+ $params['img_size'] = ' width="'.getArrayValue($params, 'DefaultWidth').'"';
+ }
+ }
+ $params['name'] = $this->SelectParam($params, 'render_as,block');
+ $object =& $this->Application->recallObject($this->getPrefixSpecial());
+ if ( !$object->isLoaded() && !$this->SelectParam($params, 'default_image,DefaultImage') ) return false;
+
+ $params['alt'] = htmlspecialchars($object->GetField('AltName'));
+ return $this->Application->ParseBlock($params);
+ }
+
+ function LargeImageExists($params) {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ( $object->GetDBField('SameImages') == null || $object->GetDBField('SameImages')=='1' )
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ function LoadItemImage($params)
+ {
+ $parent_item =& $this->Application->recallObject($params['PrefixSpecial']);
+
+ $this->Application->setUnitOption($this->Prefix,'AutoLoad',false);
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+
+ // if we need primary thumbnail which is preloaded with products list
+ $object->Clear();
+
+ // if we need primary thumbnail which is preloaded with products list
+ if (
+ $this->SelectParam($params, 'thumbnail,Thumbnail') &&
+ (
+ (
+ $this->SelectParam($params, 'primary,Primary')
+ ||
+ !isset($params['name'])
+ )
+ &&
+ !$this->Application->GetVar('img_id')
+ &&
+ isset($parent_item->Fields['LocalThumb'])
+ )
+ )
+ {
+ $object->SetDefaultValues();
+ $object->SetDBFieldsFromHash($parent_item->GetFieldValues(), Array('SameImages', 'LocalThumb', 'ThumbPath', 'ThumbUrl', 'LocalImage', 'LocalPath', 'Url') );
+ $object->Loaded = true;
+ }
+ else { // if requested image is not primary thumbnail - load it directly
+ $id_field = $this->Application->getUnitOption($this->Prefix, 'ForeignKey');
+ $parent_table_key = $this->Application->getUnitOption($this->Prefix, 'ParentTableKey');
+
+ $keys[$id_field] = $parent_item->GetDBField($parent_table_key);
+
+ // which image to load?
+ if ( getArrayValue($params, 'Primary') ) { //load primary image
+ $keys['DefaultImg'] = 1;
+ }
+ elseif ( getArrayValue($params, 'name') ) { //load by name
+ $keys['Name'] = $params['name'];
+ }
+ elseif ( $image_id = $this->Application->GetVar($this->Prefix.'_id') ) {
+ $keys['ImageId'] = $image_id;
+ }
+ else {
+ $keys['DefaultImg'] = 1; //if primary was not set explicity and name was also not passed - load primary
+ }
+
+ $object->Load($keys);
+ }
+ }
+
+ function ImageSrc($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), null);
+ $ret = '';
+ // if we need thumb, or full image is same as thumb
+ if ( $this->SelectParam($params, 'thumbnail,Thumbnail') || $object->GetDBField('SameImages') )
+ {
+ // return local image or url
+ $ret = $object->GetDBField('LocalThumb') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('ThumbPath') : $object->GetDBField('ThumbUrl');
+ if ( $object->GetDBField('LocalThumb') && !file_exists(FULL_PATH.'/'.$object->GetDBField('ThumbPath')) ) $ret = '';
+ }
+ else { // if we need full which is not the same as thumb
+ $ret = $object->GetDBField('LocalImage') ? PROTOCOL.SERVER_NAME.BASE_PATH.'/'.$object->GetDBField('LocalPath') : $object->GetDBField('Url');
+ if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.'/'.$object->GetDBField('LocalPath')) ) $ret = '';
+ }
+
+ return ($ret && $ret != PROTOCOL.SERVER_NAME.BASE_PATH && $ret != PROTOCOL.SERVER_NAME.BASE_PATH.'/') ? $ret : PROTOCOL.SERVER_NAME.BASE_PATH.THEMES_PATH.'/'.$this->SelectParam($params, 'default_image,DefaultImage');
+ }
+
+ function GetFullPath($path)
+ {
+ if(!$path) return $path;
+
+ // absolute url
+ if( preg_match('/^(.*):\/\/(.*)$/U', $path) )
+ {
+ if(strpos($path, PROTOCOL.SERVER_NAME.BASE_PATH) === 0)
+ {
+ $path = str_replace(PROTOCOL.SERVER_NAME.BASE_PATH, FULL_PATH.'/', $path);
+ }
+ return $path;
+ }
+
+ // relative url
+ return FULL_PATH.'/'.substr(THEMES_PATH,1).'/'.$path;
+ }
+
+ /**
+ * Makes size clause for img tag, such as
+ * ' width="80" height="100"' according to max_width
+ * and max_heght limits.
+ *
+ * @param array $params
+ * @return string
+ */
+ function ImageSize($params)
+ {
+ $img_path = $this->GetFullPath( getArrayValue($params, 'img_path') );
+
+ $image_info = @getimagesize($img_path);
+
+// if( !($img_path && file_exists($img_path) && isset($image_info) ) )
+ if( !$image_info )
+ {
+ trigger_error('Image <b>'.$img_path.'</b> <span class="debug_error">missing or invalid</span>', E_USER_WARNING);
+ return false;
+ }
+
+ $orig_width = getArrayValue($image_info, 0);
+ $orig_height = getArrayValue($image_info, 1);
+ $max_width = getArrayValue($params, 'MaxWidth');
+ $max_height = getArrayValue($params, 'MaxHeight');
+
+ $too_large = is_numeric($max_width) ? ($orig_width > $max_width) : false;
+ $too_large = $too_large || (is_numeric($max_height) ? ($orig_height > $max_height) : false);
+
+ if($too_large)
+ {
+ $width_ratio = $max_width ? $max_width / $orig_width : 1;
+ $height_ratio = $max_height ? $max_height / $orig_height : 1;
+ $ratio = min($width_ratio, $height_ratio);
+
+ $width = ceil($orig_width * $ratio);
+ $height = ceil($orig_height * $ratio);
+ }
+ else
+ {
+ $width = $orig_width;
+ $height = $orig_height;
+ }
+
+ $size_clause = ' width="'.$width.'" height="'.$height.'"';
+ return $size_clause;
+ }
+
+
+ // used in admin
+ function ImageUrl($params)
+ {
+ $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
+ if ($object->GetDBField('SameImages') ? $object->GetDBField('LocalThumb') : $object->GetDBField('LocalImage') )
+ {
+ $ret = $this->Application->Phrase(getArrayValue($params,'local_phrase'));
+ }
+ else
+ {
+ $ret = $object->GetDBField('SameImages') ? $object->GetDBField('ThumbUrl') : $object->GetDBField('Url');
+ }
+ return $ret;
+ }
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/images/image_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/units/images/image_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/images/image_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/images/image_event_handler.php (revision 4465)
@@ -0,0 +1,336 @@
+<?php
+class ImageEventHandler extends InpDBEventHandler {
+
+ function mapEvents()
+ {
+ parent::mapEvents(); // ensure auto-adding of approve/decine and so on events
+ $image_events = Array(
+ 'OnAfterCopyToTemp'=>'ImageAction',
+ 'OnBeforeDeleteFromLive'=>'ImageAction',
+ 'OnBeforeCopyToLive'=>'ImageAction',
+ 'OnBeforeItemDelete'=>'ImageAction',
+ 'OnAfterClone'=>'ImageAction',
+ );
+
+ $this->eventMethods = array_merge($this->eventMethods, $image_events);
+ }
+
+ function customProcessing(&$event, $type)
+ {
+ $object =& $event->GetObject();
+ switch ($type)
+ {
+ case 'before' :
+ if ($object->GetDBField('LocalImage'))
+ {
+ $object->SetDBField('Url', '');
+ }
+ else
+ {
+ $object->SetDBField('LocalPath', '');
+ }
+
+ if ($object->GetDBField('LocalThumb'))
+ {
+ $object->SetDBField('ThumbUrl', '');
+ }
+ else
+ {
+ $object->SetDBField('ThumbPath', '');
+ }
+
+ if ($object->GetDBField('SameImages'))
+ {
+ $object->SetDBField('LocalImage', 1);
+ $object->SetDBField('LocalPath', '');
+ $object->SetDBField('Url', '');
+ }
+ break;
+ case 'after' :
+ if ($object->GetDBField('DefaultImg') )
+ {
+ $sql = 'UPDATE '.$object->TableName.' SET DefaultImg=0 WHERE ResourceId='.
+ $object->GetDBField('ResourceId').' AND ImageId<>'.
+ $object->GetId();
+ $res = $this->Conn->Query($sql);
+ }
+ break;
+ default:
+ }
+ }
+
+ function ImageAction(&$event)
+ {
+ $id = $event->getEventParam('id');
+ $object =& $this->Application->recallObject($event->Prefix.'.-item', $event->Prefix);
+ if (in_array($event->Name, Array('OnBeforeDeleteFromLive','OnAfterClone')) ) {
+ $object->SwitchToLive();
+ }
+ elseif ($event->Name == 'OnBeforeItemDelete') {
+ // keep current table
+ }
+ else {
+ $object->SwitchToTemp();
+ }
+
+ $object->Load($id);
+
+ $fields = Array('LocalPath' => 'LocalImage', 'ThumbPath' => 'LocalThumb');
+ foreach ($fields as $a_field => $mode_field) {
+ $file = $object->GetField($a_field);
+ if (!$file) continue;
+ $source_file = FULL_PATH.$file;
+
+ switch ($event->Name) {
+ // Copy image files to pending dir and update corresponding fields in temp record
+ // Checking for existing files and renaming if nessessary - two users may upload same pending files at the same time!
+ case 'OnAfterCopyToTemp':
+ $new_file = IMAGES_PENDING_PATH . $this->ValidateFileName(FULL_PATH.IMAGES_PENDING_PATH, basename($file));
+ $dest_file = FULL_PATH.$new_file;
+ copy($source_file, $dest_file);
+ $object->Fields[$a_field]['skip_empty'] = false;
+ $object->SetDBField($a_field, $new_file);
+ break;
+
+ // Copy image files to live dir (checking if fileexists and renameing if nessessary)
+ // and update corresponding fields in temp record (which gets copied to live automatically)
+ case 'OnBeforeCopyToLive':
+ if ( $object->GetDBField($mode_field) ) { // if image is local
+ // rename file if it exists in live folder
+ $new_file = IMAGES_PATH . $this->ValidateFileName(FULL_PATH.IMAGES_PATH, basename($file));
+ $dest_file = FULL_PATH.$new_file;
+ rename($source_file, $dest_file);
+ }
+ else { // if image is remote url - remove local file (if any), update local file field with empty value
+ if (file_exists($source_file)) @unlink($source_file);
+ $new_file = '';
+ }
+ $object->Fields[$a_field]['skip_empty'] = false;
+ $object->SetDBField($a_field, $new_file);
+ break;
+
+ case 'OnBeforeDeleteFromLive': // Delete image files from live folder before copying over from temp
+ case 'OnBeforeItemDelete': // Delete image files when deleteing Image object
+ @unlink(FULL_PATH.$file);
+ break;
+
+ case 'OnAfterClone': // Copy files when cloning objects, renaming it on the fly
+ $path_info = pathinfo($file);
+ $new_file = $path_info['dirname'].'/'.$this->ValidateFileName(FULL_PATH.$path_info['dirname'], $path_info['basename']);
+ $dest_file = FULL_PATH . $new_file;
+ copy($source_file, $dest_file);
+ $object->Fields[$a_field]['skip_empty'] = false;
+ $object->SetDBField($a_field, $new_file);
+ break;
+ }
+ }
+ if ( in_array($event->Name, Array('OnAfterClone', 'OnBeforeCopyToLive', 'OnAfterCopyToTemp')) ) {
+ $object->Update(null, true);
+ }
+ }
+
+ function ValidateFileName($path, $name)
+ {
+ $parts = pathinfo($name);
+ $ext = '.'.$parts['extension'];
+ $filename = substr($parts['basename'], 0, -strlen($ext));
+ $new_name = $filename.$ext;
+ while ( file_exists($path.'/'.$new_name) )
+ {
+ if ( preg_match("/({$filename}_)([0-9]*)($ext)/", $new_name, $regs) ) {
+ $new_name = $regs[1].($regs[2]+1).$regs[3];
+ }
+ else {
+ $new_name = $filename.'_1'.$ext;
+ }
+ }
+ return $new_name;
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param kEvent $event
+ */
+ function OnSetPrimary(&$event)
+ {
+ $object =& $event->getObject();
+ $object->SetDBField('DefaultImg', 1);
+ $object->Update();
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ $object =& $event->getObject();
+// $parent_info = $object->getLinkedInfo();
+ $id = $object->GetDBField('ResourceId');
+// $id = $parent_info['ParentId'] ? $parent_info['ParentId'] : $this->Application->GetVar('p_id');
+ $sql = 'SELECT ImageId FROM '.$object->TableName.' WHERE ResourceId='.$id.' AND DefaultImg=1';
+ if(!$this->Conn->GetOne($sql))
+ {
+ $object->SetDBField('DefaultImg', 1);
+ }
+ if($object->GetDBField('DefaultImg') && $object->Validate())
+ {
+
+ $sql = 'UPDATE '.$object->TableName.'
+ SET DefaultImg = 0
+ WHERE ResourceId = '.$id.' AND ImageId <> '.$object->GetDBField('ImageId');
+ $this->Conn->Query($sql);
+ $object->SetDBField('Enabled', 1);
+ }
+ }
+
+ function OnAfterItemCreate(&$event)
+ {
+ $event->CallSubEvent('OnBeforeItemUpdate');
+ $object =& $event->getObject();
+ $object->Update();
+ }
+
+ /**
+ * Deletes all selected items.
+ * Automatically recurse into sub-items using temp handler, and deletes sub-items
+ * by calling its Delete method if sub-item has AutoDelete set to true in its config file
+ *
+ * @param kEvent $event
+ */
+ function OnMassDelete(&$event)
+ {
+ $event->status=erSUCCESS;
+
+ $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+
+ $this->StoreSelectedIDs($event);
+
+ $event->setEventParam('ids', $this->getSelectedIDs($event) );
+ $this->customProcessing($event, 'before');
+ $ids = $event->getEventParam('ids');
+
+ $object =& $event->getObject();
+ $sql = 'SELECT ImageId FROM '.$object->TableName.' WHERE DefaultImg=1';
+ $primary = $this->Conn->GetOne($sql);
+ if( $primary && ($key = array_search($primary, $ids)) )
+ {
+ $sql = 'SELECT ImageId FROM '.$object->TableName.' WHERE DefaultImg=0';
+ $res = $this->Conn->Query($sql);
+ if($res)
+ {
+ unset($ids[$key]);
+ }
+ }
+
+ if($ids)
+ {
+ $temp->DeleteItems($event->Prefix, $event->Special, $ids);
+ }
+ $this->clearSelectedIDs($event);
+ }
+
+ /*function OnAfterItemLoad(&$event)
+ {
+ $object =& $event->getObject();
+
+ if ( $object->GetDBField('ThumbPath') || $object->GetDBField('SameImages') )
+ {
+ // return local image or url
+ $path = $object->GetDBField('LocalThumb') ? PROTOCOL.SERVER_NAME.BASE_PATH.$object->GetDBField('ThumbPath') : $object->GetDBField('ThumbUrl');
+ if ( $object->GetDBField('LocalThumb') && !file_exists(FULL_PATH.$object->GetDBField('ThumbPath')) ) $path = '';
+ }
+ else { // if we need full which is not the same as thumb
+ $path = $object->GetDBField('LocalImage') ? PROTOCOL.SERVER_NAME.BASE_PATH.$object->GetDBField('LocalPath') : $object->GetDBField('Url');
+ if ( $object->GetDBField('LocalImage') && !file_exists(FULL_PATH.$object->GetDBField('LocalPath')) ) $path = '';
+ }
+
+ $object->SetDBField('ImageUrl', $path);
+ }*/
+
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $types=$event->getEventParam('types');
+ $except_types=$event->getEventParam('except');
+ $object =& $event->getObject();
+ $type_clauses = Array();
+
+ if( !$this->Application->IsAdmin() )
+ {
+ $object->addFilter('active', '%1$s.Enabled = 1');
+ }
+
+ if($product_id = $event->getEventParam('product_id'))
+ {
+ $object->removeFilter('parent_filter');
+ $sql = 'SELECT ResourceId FROM '.$this->Application->getUnitOption('p', 'TableName').'
+ WHERE ProductId = '.$product_id;
+ $resource_id = (int) $this->Conn->GetOne($sql);
+ $object->addFilter('product_images', '%1$s.ResourceId = '.$resource_id);
+ }
+
+ $type_clauses['additional']['include'] = '%1$s.DefaultImg != 1';
+ $type_clauses['additional']['except'] = '%1$s.DefaultImg = 1';
+ $type_clauses['additional']['having_filter'] = false;
+
+ /********************************************/
+
+ $includes_or_filter =& $this->Application->makeClass('kMultipleFilter');
+ $includes_or_filter->setType(FLT_TYPE_OR);
+
+ $excepts_and_filter =& $this->Application->makeClass('kMultipleFilter');
+ $excepts_and_filter->setType(FLT_TYPE_AND);
+
+ $includes_or_filter_h =& $this->Application->makeClass('kMultipleFilter');
+ $includes_or_filter_h->setType(FLT_TYPE_OR);
+
+ $excepts_and_filter_h =& $this->Application->makeClass('kMultipleFilter');
+ $excepts_and_filter_h->setType(FLT_TYPE_AND);
+
+ $except_types_array=explode(',', $types);
+
+ if ($types){
+ $types_array=explode(',', $types);
+ for ($i=0; $i<sizeof($types_array); $i++){
+ $type=trim($types_array[$i]);
+ if (isset($type_clauses[$type])){
+ if ($type_clauses[$type]['having_filter']){
+ $includes_or_filter_h->removeFilter('filter_'.$type);
+ $includes_or_filter_h->addFilter('filter_'.$type, $type_clauses[$type]['include']);
+ }else{
+ $includes_or_filter->removeFilter('filter_'.$type);
+ $includes_or_filter->addFilter('filter_'.$type, $type_clauses[$type]['include']);
+ }
+ }
+ }
+ }
+
+ if ($except_types){
+ $except_types_array=explode(',', $except_types);
+ for ($i=0; $i<sizeof($except_types_array); $i++){
+ $type=trim($except_types_array[$i]);
+ if (isset($type_clauses[$type])){
+ if ($type_clauses[$type]['having_filter']){
+ $excepts_and_filter_h->removeFilter('filter_'.$type);
+ $excepts_and_filter_h->addFilter('filter_'.$type, $type_clauses[$type]['except']);
+ }else{
+ $excepts_and_filter->removeFilter('filter_'.$type);
+ $excepts_and_filter->addFilter('filter_'.$type, $type_clauses[$type]['except']);
+ }
+ }
+ }
+ }
+
+ $object->addFilter('includes_filter', $includes_or_filter);
+ $object->addFilter('excepts_filter', $excepts_and_filter);
+
+ $object->addFilter('includes_filter_h', $includes_or_filter_h, HAVING_FILTER);
+ $object->addFilter('excepts_filter_h', $excepts_and_filter_h, HAVING_FILTER);
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/images/image_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/core/units/images/images.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/images/images.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/images/images.php (revision 4465)
@@ -0,0 +1,23 @@
+<?php
+
+class ImagesItem extends kDBItem {
+
+ function Delete($id)
+ {
+ $this->Load($id);
+ $local_path = FULL_PATH.$this->GetDBField('LocalPath');
+ $thumb_path = FULL_PATH.$this->GetDBField('ThumbPath');
+ if(file_exists($local_path))
+ {
+ unlink($local_path);
+ }
+ if(file_exists($thumb_path))
+ {
+ unlink($thumb_path);
+ }
+ return parent::Delete($id);
+ }
+
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/images/images.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Event Timeline
Log In to Comment