• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Ritchy_Purple
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    Ritchy_Purple

    @Ritchy_Purple

    1
    Reputation
    137
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location Paris FRANCE Age 64

    Ritchy_Purple Unfollow Follow

    Latest posts made by Ritchy_Purple

    • RE: Call to undefined method Group::addMember

      Hello,

      I modified my post,
      I forgot to say that we
      also comment below

      [ATTACH]551[/ATTACH]

      Its Work
      sorry

      [url=“/_imported_xf_attachments/0/551_Capture du 2014-02-19 23_19_53.png?:”]Capture du 2014-02-19 23_19_53.png[/url]

      posted in Bug Reports
      R
      Ritchy_Purple
    • RE: Call to undefined method Group::addMember

      Modify FOGCore.class.php

      line 137

      else if ( $group != null )
      {
      [B]//add copy from below[/B]
      [B]$task = new ScheduledTask( $host, $group, $timer, $ar[“stTaskType”], $ar[“stID”] );[/B]
      [B]$task->setShutdownAfterTask( $ar[“stShutDown”] == 1 );[/B]
      [B]$task->setOther1( $ar[“stOther1”] );[/B]
      [B]$task->setOther2( $ar[“stOther2”] );[/B]
      [B]$task->setOther3( $ar[“stOther3”] );[/B]
      [B]$task->setOther4( $ar[“stOther4”] );[/B]
      [B]$task->setOther5( $ar[“stOther5”] );[/B]
      [B]$arTasks[] = $task;[/B]
      [B]// start Comment[/B]
      [B]/* if ( $group->getCount() > 0 )[/B]
      [B]{[/B]
      [B]$arRm = array();[/B]
      [B]$hosts = $group->getMembers();[/B]
      [B]for( $i = 0; $i < count($hosts); $i++ )[/B]
      [B]{[/B]
      [B]if ( $hosts[$i] != null )[/B]
      [B]{[/B]
      [B]$h = $hosts[$i];[/B]
      [B]if ( ! ($h->isReadyToImage() && $h->getImage()->getStorageGroup()->getID() == $groupid ) )[/B]
      [B]{[/B]
      [B]$arRm[] = $h;[/B]
      [B]}[/B]
      [B]}[/B]
      [B]}[/B]

      [B]//echo ( "Before: " . $group->getCount() );[/B]
      [B]for( $i = 0; $i < count($arRm); $i++ )[/B]
      [B]{[/B]
      [B]$group->removeMember( $arRm[$i] );[/B]
      [B]}[/B]
      [B]//echo ( "After: " . $group->getCount() );[/B]

      [B]$task = new ScheduledTask( $host, $group, $timer, $ar[“stTaskType”], $ar[“stID”] );[/B]
      [B]$task->setShutdownAfterTask( $ar[“stShutDown”] == 1 );[/B]
      [B]$task->setOther1( $ar[“stOther1”] );[/B]
      [B]$task->setOther2( $ar[“stOther2”] );[/B]
      [B]$task->setOther3( $ar[“stOther3”] );[/B]
      [B]$task->setOther4( $ar[“stOther4”] );[/B]
      [B]$task->setOther5( $ar[“stOther5”] );[/B]
      [B]$arTasks[] = $task;[/B]
      [B]} */[/B]
      [B]//end comment[/B]


      [B]//and comment also from below (Line 212 for me) BOLD[/B]
      $group = null;
      while( $ar = mysql_fetch_array( $res ) )
      {
      if ( $group == null )
      {
      $group = new Group($ar[“groupID”], $ar[“groupName”], $ar[“groupDesc”] );
      }
      [B] /* $hid = $ar[“hostid”];[/B]
      [B] if ( $hid !== null && is_numeric( $hid ) )[/B]
      [B] {[/B]
      [B] $host = $this->getHostById( $hid );[/B]
      [B] if ( $host != null ) [/B]
      [B] $group->addMember( $host );[/B]
      [B] } */[/B]
      }
      return $group;

      Test OK for me

      posted in Bug Reports
      R
      Ritchy_Purple