Jump to content

Recommended Posts

Возникла ситуация удалить потерянные файлы и миниатюры с целью экономии места.

 

Загрузку файлов делал с помощью

 

Стандартный скрипт через Пересчет и обновление работает только для постов на форуме. А для Ip.Content не хочет

Хочу изменить размер миниатюр, у удалить потеряные вложения.

 

/uploads/monthly_07_2013/post--1-1-1111111.

 

А с таким названием не проверяет. Я так понимаю rebuild.php

 

/uploads/monthly_07_2013/ccs-1-1-1111111.jpg

 

Если кто-то владеет информацией подскажите пожалуйста.

Link to comment
Share on other sites

Я так понимаю нужно прописать.

 

Найти:

$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) );
	$outer = $this->DB->execute();

Заменить:

$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg','ccs')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) );
	$outer = $this->DB->execute();

Link to comment
Share on other sites

cleanattachments Не работает. Что-то пропустил.

 

strstr( $nfile->getFilename(), 'post-' )

заменить на: strstr( $nfile->getFilename(), 'post-' ) OR strstr( $nfile->getFilename(), 'ccs-' )

 

strstr( $file, 'post-' )

заменить на: strstr( $file, 'post-' ) OR strstr( $file, 'ccs-' )

  • Upvote 1
Link to comment
Share on other sites

Правим: rebuild.php (\admin\applications\core\modules_admin\tools)

 

Ищем:

$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) );
       $outer = $this->DB->execute();

 

Меняем:

$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg','ccs')", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) );
       $outer = $this->DB->execute();


Ищем:

$tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg')", 'limit' => array($dis,1)  ) );
	$max = intval( $tmp['attach_id'] );

 

Меняем:

$tmp = $this->DB->buildAndFetch( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_rel_module IN('post','msg','ccs')", 'limit' => array($dis,1)  ) );
	$max = intval( $tmp['attach_id'] );


Ищем:

strstr( $nfile->getFilename(), 'post-' )

Меняем:

strstr( $nfile->getFilename(), 'post-' ) OR strstr( $nfile->getFilename(), 'ccs-' )


Ищем:

strstr( $file, 'post-' )

Меняем:

strstr( $file, 'post-' ) OR strstr( $file, 'ccs-' )

  • Upvote 1
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...