MaN@L #KaK A S3!r0 1118 ارسال شده در 5 بهمن، ۱۳۸۹ اشتراک گذاری ارسال شده در 5 بهمن، ۱۳۸۹ خب توی تست كه رفتم يه خطای اين كد به من ميده ظاهرش كه مشكلی نداره فقط نميدونم چرا خطا FATAL ميده : اين كد رو نگاه كنيد اگه چيزی به نظرتون ميرسه بگيد <?php class contentDeleteComment extends TagssModerateLib { /** * Rebuild a topic * * @access public * @param integer Topic id * @param boolean Rebuild forum afterwards * @return boolean Rebuild complete */ public function rebuildTopic( $tid, $doforum=1, $search_index=1 ) { $_result = parent::rebuildTopic( $tid, $doforum, $search_index ); //----------------------------------------- // Array of topic ids returned on success //----------------------------------------- $records = array(); $_needRebuild = false; //----------------------------------------- // Get databases cache and loop //----------------------------------------- $_databases = $this->cache->getCache('ccs_databases'); if( is_array($_databases) AND count($_databases) ) { foreach( $_databases as $_k => $_database ) { $records[ $_k ] = array(); //----------------------------------------- // Check if any records in this DB map to these topics //----------------------------------------- $this->DB->build( array( 'select' => 'primary_id_field, record_topicid', 'from' => $_database['database_database'], 'where' => "record_topicid=" . $tid ) ); $this->DB->execute(); while( $r = $this->DB->fetch() ) { $records[ $_k ][] = $r; $_needRebuild = true; } } } //----------------------------------------- // Do any need to be rebuilt?.. //----------------------------------------- if( $_needRebuild ) { foreach( $records as $_db => $_records ) { if( count($_records) AND is_array($_records) ) { foreach( $_records as $_aRecord ) { $topic = $this->DB->buildAndFetch( array( 'select' => 'title, topic_firstpost', 'from' => 'topics', 'where' => 'tid=' . $_aRecord['record_topicid'] ) ); $count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'posts', 'where' => "queued=0 AND pid <> {$topic['topic_firstpost']} AND topic_id={$_aRecord['record_topicid']}" ) ); $this->DB->update( $_databases[ $_db ]['database_database'], array( 'record_comments' => intval($count['total']) ), 'primary_id_field=' . $_aRecord['primary_id_field'] ); } } } } return $_result; } } نقل قول لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
ارسالهای توصیه شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .
توجه: strong> مطلب ارسالی شما پس از تایید مدیریت برای همه قابل رویت خواهد بود.