Author Topic: [SOLVED] Total Videos = Inaccurate  (Read 3893 times)

cajunkyard

  • Guest
[SOLVED] Total Videos = Inaccurate
« on: October 05, 2007, 12:28:52 PM »
Bug Description: - A member has 20 uploaded videos.  On the cpanel it says they have 30.  I deleted 10 of their videos.
« Last Edit: November 05, 2007, 07:23:35 PM by CarAudioClips »

crankydog

  • Jr. Member
  • **
  • Posts: 141
Re: Total Videos = Inaccurate
« Reply #1 on: October 05, 2007, 12:35:26 PM »
I have this problem too. Nobody has offered any insights yet...

http://phpmotion.com/forum/index.php?topic=1050.0


oac

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2342
Re: Total Videos = Inaccurate
« Reply #2 on: October 05, 2007, 01:13:42 PM »
I have this problem too. Nobody has offered any insights yet...

http://phpmotion.com/forum/index.php?topic=1050.0



I just have ;)

crankydog

  • Jr. Member
  • **
  • Posts: 141
Re: Total Videos = Inaccurate
« Reply #3 on: October 05, 2007, 01:24:14 PM »
Thanks, OAC -- when do you sleep?  ;D

I'll look through the files, but I'm a hacker. If anyone has time to find the right line, I'd appreciate it!

In the meantime I'll check manage.php and siteadmin/inner_management.htm

oac

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2342
Re: Total Videos = Inaccurate
« Reply #4 on: October 05, 2007, 01:28:40 PM »
Thanks, OAC -- when do you sleep?  ;D

Sleep what is that? ??? I'll try and find which lines you need to change when I get some spare time :) I've got the new theme to finish first  ;)

AL

  • Jr. Member
  • **
  • Posts: 105
Re: Total Videos = Inaccurate
« Reply #5 on: October 31, 2007, 08:38:07 PM »
Just checking any updates on fixing this......Any Ideas ........ ???

cajunkyard

  • Guest
Re: Total Videos = Inaccurate
« Reply #6 on: November 01, 2007, 10:51:35 AM »
For now, we need to manually enter our phpmyadmin and delete it from their.  :-\

AL

  • Jr. Member
  • **
  • Posts: 105
Re: Total Videos = Inaccurate
« Reply #7 on: November 01, 2007, 04:51:33 PM »
 :-[ thats just sad

frankie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5947
  • PHPmotion Developer
Re: Total Videos = Inaccurate
« Reply #8 on: November 01, 2007, 07:56:25 PM »
I thought I posted a fix for this a while ago.
I must have forgot, but I solved this sometime back.

Here is the fix:

The problem/bug is in maintain.php
after a member or admin deletes a video, it gets
marked 'pendingdelete' in the database.
Then when your in the admin page maintain
and go to System Maintenance, you see
"Deleted video awaiting removal from server"
so when you click to "delete completely"
the script does this:
//set file to "deleted" in database
$sql = "UPDATE videos SET approved ='deleted' WHERE indexer = $video_id";
@mysql_query($sql);
So they are still records in the database, but they are marked deleted,
but all querys to the video table will still show them as a video record.

open maintain.php
look for:
//set file to "deleted" in database
$sql = "UPDATE videos SET approved ='deleted' WHERE indexer = $video_id";
@mysql_query($sql);

change to:
//delete videos by $video_id (deleted)
$sql = "DELETE FROM videos WHERE indexer = $video_id";
@mysql_query($sql);

then the video records are actually deleted from the database
and all the errors / problems are solved.

cheers........



Bug Description: - A member has 20 uploaded videos.  On the cpanel it says they have 30.  I deleted 10 of their videos.

Artist3d

  • Newbie
  • *
  • Posts: 14
Re: [SOLVED] Total Videos = Inaccurate
« Reply #9 on: August 01, 2008, 10:50:01 PM »
Thank you Frankie
These archived solutions are invaluable and just want you to know - still appreciated many months later!